Skip to content

Commit

Permalink
feat(types): allows circular renference as Array and falsy values for…
Browse files Browse the repository at this point in the history
… TScript
  • Loading branch information
rafamel committed Apr 20, 2019
1 parent 3f0ae47 commit 657ad24
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ export interface IOfType<T> {

export type TLogger = LogLevelDesc;

export type TScript = string | (() => Promise<void> | void);
export type TScript =
| undefined
| null
| false
| string
| (() => Promise<TScript> | TScript)
| IScriptsArray;

// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface IScriptsArray extends Array<TScript> {}

export interface IScripts {
[key: string]: TScript | TScript[] | IScripts;
Expand Down

0 comments on commit 657ad24

Please sign in to comment.