-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRY all commands, correct overload signature types
This moves the repetitive overload definitions into a single type created by a makeCommand method. This also means that all of the repetitive setup and validation can be moved to one place as well. Corrects a bug where TS thought that a `Promise<void>` would be returned, which actually it was an instance of Unpack (or whatever). The type calculus is rather baroque. The next major will replace the overloaded function signatures with separately named functions, so there'll be `createFile`, `createSync`, `createFileSync`, etc.
- Loading branch information
Showing
20 changed files
with
743 additions
and
540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
export * from './create.js' | ||
export * from './replace.js' | ||
export * from './list.js' | ||
export * from './update.js' | ||
export * from './extract.js' | ||
export { | ||
type TarOptionsWithAliasesAsync, | ||
type TarOptionsWithAliasesAsyncFile, | ||
type TarOptionsWithAliasesAsyncNoFile, | ||
type TarOptionsWithAliasesSyncNoFile, | ||
type TarOptionsWithAliases, | ||
type TarOptionsWithAliasesFile, | ||
type TarOptionsWithAliasesSync, | ||
type TarOptionsWithAliasesSyncFile, | ||
} from './options.js' | ||
|
||
export * from './create.js' | ||
export { create as c } from './create.js' | ||
export { replace as r } from './replace.js' | ||
export { list as t } from './list.js' | ||
export { update as u } from './update.js' | ||
export * from './extract.js' | ||
export { extract as x } from './extract.js' | ||
|
||
export * from './header.js' | ||
export * from './list.js' | ||
export { list as t } from './list.js' | ||
// classes | ||
export * from './pack.js' | ||
export * from './unpack.js' | ||
export * from './parse.js' | ||
export * from './read-entry.js' | ||
export * from './write-entry.js' | ||
export * from './header.js' | ||
export * from './pax.js' | ||
export * from './read-entry.js' | ||
export * from './replace.js' | ||
export { replace as r } from './replace.js' | ||
export * as types from './types.js' | ||
export * from './unpack.js' | ||
export * from './update.js' | ||
export { update as u } from './update.js' | ||
export * from './write-entry.js' |
Oops, something went wrong.