Skip to content

Commit

Permalink
feat(types): 新增 AnyAsyncFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jul 15, 2020
1 parent 3da57a0 commit b6d0602
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/types/AnyAsyncFunction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* 任意异步函数。
*
* @public
*/
export type AnyAsyncFunction = Record<any, any> & {
(...args: any[]): Promise<any>
}
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type {
} from 'ts-essentials'

// @index(['./**/*.ts', '!./**/*.test.*'], f => `export * from '${f.path}'`)
export * from './AnyAsyncFunction'
export * from './AnyFunction'
export * from './AnyObject'
export * from './Defined'
Expand Down

0 comments on commit b6d0602

Please sign in to comment.