@waiting/shared-types
Advanced tools
Comparing version 23.18.0 to 23.19.0
@@ -21,2 +21,6 @@ export interface Func { | ||
export type AsyncMethodType<ArgsType extends any[] = any[], ResultType = unknown, TThis = any> = (this: TThis, ...input: ArgsType) => Promise<ResultType>; | ||
/** | ||
* Convert a function type to an async function type | ||
*/ | ||
export type ToAsyncFunction<T extends (...args: any) => any> = T extends (...args: infer A) => infer R ? (...args: A) => Promise<R> : never; | ||
//# sourceMappingURL=func.d.ts.map |
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "23.18.0", | ||
"version": "23.19.0", | ||
"description": "shared typescript types", | ||
@@ -70,3 +70,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "d924f37d896368b0c2caa2a592afbb9b7df0b806" | ||
"gitHead": "ded0b93acfe02e9ad308adcbf4df852b49193584" | ||
} |
@@ -40,1 +40,9 @@ /* eslint-disable @typescript-eslint/no-redundant-type-constituents */ | ||
/** | ||
* Convert a function type to an async function type | ||
*/ | ||
export type ToAsyncFunction<T extends (...args: any) => any> = T extends (...args: infer A) => infer R | ||
? (...args: A) => Promise<R> | ||
: never | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78571
1375