-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use TS for rebuild-test-project-fixture script (#9804)
- Loading branch information
Showing
5 changed files
with
57 additions
and
93 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
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
export interface TuiTaskDef { | ||
/** 0 based step number */ | ||
step: number | ||
/** The parent task to this task. */ | ||
parent?: string | ||
/** Title of this task. */ | ||
title: string | ||
/** Reactive content */ | ||
content?: string | ||
/** | ||
* Whether this task is enabled or not. Disabled tasks don't show up in the | ||
* list | ||
*/ | ||
enabled?: boolean | (() => boolean) | ||
/** The task to run. Will be passed an instance of TUI when called */ | ||
task: () => Promise<unknown> | void | ||
} | ||
|
||
export function isAwaitable(promise: unknown): promise is Promise<unknown> { | ||
return typeof promise !== 'undefined' && 'then' in promise | ||
} |