-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export TypeScript types for the
execa
method (#1066)
- Loading branch information
Showing
7 changed files
with
85 additions
and
14 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import {expectAssignable} from 'tsd'; | ||
import { | ||
type ExecaMethod, | ||
type ExecaSyncMethod, | ||
type ExecaNodeMethod, | ||
type ExecaScriptMethod, | ||
type ExecaScriptSyncMethod, | ||
execa, | ||
execaSync, | ||
execaNode, | ||
$, | ||
} from '../../index.js'; | ||
|
||
const options = {preferLocal: true} as const; | ||
const secondOptions = {node: true} as const; | ||
|
||
expectAssignable<ExecaMethod>(execa); | ||
expectAssignable<ExecaMethod>(execa({})); | ||
expectAssignable<ExecaMethod>(execa({})({})); | ||
expectAssignable<ExecaMethod>(execa(options)); | ||
expectAssignable<ExecaMethod>(execa(options)(secondOptions)); | ||
expectAssignable<ExecaMethod>(execa(options)({})); | ||
expectAssignable<ExecaMethod>(execa({})(options)); | ||
|
||
expectAssignable<ExecaSyncMethod>(execaSync); | ||
expectAssignable<ExecaSyncMethod>(execaSync({})); | ||
expectAssignable<ExecaSyncMethod>(execaSync({})({})); | ||
expectAssignable<ExecaSyncMethod>(execaSync(options)); | ||
expectAssignable<ExecaSyncMethod>(execaSync(options)(secondOptions)); | ||
expectAssignable<ExecaSyncMethod>(execaSync(options)({})); | ||
expectAssignable<ExecaSyncMethod>(execaSync({})(options)); | ||
|
||
expectAssignable<ExecaNodeMethod>(execaNode); | ||
expectAssignable<ExecaNodeMethod>(execaNode({})); | ||
expectAssignable<ExecaNodeMethod>(execaNode({})({})); | ||
expectAssignable<ExecaNodeMethod>(execaNode(options)); | ||
expectAssignable<ExecaNodeMethod>(execaNode(options)(secondOptions)); | ||
expectAssignable<ExecaNodeMethod>(execaNode(options)({})); | ||
expectAssignable<ExecaNodeMethod>(execaNode({})(options)); | ||
|
||
expectAssignable<ExecaScriptMethod>($); | ||
expectAssignable<ExecaScriptMethod>($({})); | ||
expectAssignable<ExecaScriptMethod>($({})({})); | ||
expectAssignable<ExecaScriptMethod>($(options)); | ||
expectAssignable<ExecaScriptMethod>($(options)(secondOptions)); | ||
expectAssignable<ExecaScriptMethod>($(options)({})); | ||
expectAssignable<ExecaScriptMethod>($({})(options)); | ||
|
||
expectAssignable<ExecaScriptSyncMethod>($.sync); | ||
expectAssignable<ExecaScriptSyncMethod>($.sync({})); | ||
expectAssignable<ExecaScriptSyncMethod>($.sync({})({})); | ||
expectAssignable<ExecaScriptSyncMethod>($.sync(options)); | ||
expectAssignable<ExecaScriptSyncMethod>($.sync(options)(secondOptions)); | ||
expectAssignable<ExecaScriptSyncMethod>($.sync(options)({})); | ||
expectAssignable<ExecaScriptSyncMethod>($.sync({})(options)); | ||
|
||
expectAssignable<ExecaScriptSyncMethod>($.s); | ||
expectAssignable<ExecaScriptSyncMethod>($.s({})); | ||
expectAssignable<ExecaScriptSyncMethod>($.s({})({})); | ||
expectAssignable<ExecaScriptSyncMethod>($.s(options)); | ||
expectAssignable<ExecaScriptSyncMethod>($.s(options)(secondOptions)); | ||
expectAssignable<ExecaScriptSyncMethod>($.s(options)({})); | ||
expectAssignable<ExecaScriptSyncMethod>($.s({})(options)); |
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
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