Skip to content

Commit

Permalink
feat(types): improves TScript typings
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 26, 2019
1 parent 316da0e commit 57bfc0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/core/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { open } from '~/utils/errors';
export default async function run(
script: TScript,
runner: (
item: string | ((args: string[]) => Promise<TScript> | TScript)
item:
| string
| ((args: string[]) => Promise<TScript | void> | TScript | void)
) => Promise<any>
): Promise<void> {
if (!script) {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type TScript =
| null
| false
| string
| ((args: string[]) => Promise<TScript> | TScript)
| ((args: string[]) => Promise<TScript | void> | TScript | void)
| IScriptsArray;

// eslint-disable-next-line @typescript-eslint/no-empty-interface
Expand Down

0 comments on commit 57bfc0c

Please sign in to comment.