@waiting/shared-types
Advanced tools
Comparing version 23.6.0 to 23.12.0
@@ -12,11 +12,11 @@ export interface Func { | ||
*/ | ||
export type MethodType<ArgsType extends unknown[] = any[], ReturnType = any | Promise<any>> = (...input: ArgsType) => ReturnType; | ||
export type MethodType<ArgsType extends unknown[] = any[], ReturnType = any | Promise<any>, TThis extends unknown = void> = (this: TThis, ...input: ArgsType) => ReturnType; | ||
/** | ||
* ReturnType is unknown | ||
*/ | ||
export type MethodTypeUnknown<ArgsType extends any[] = any[], ReturnType extends unknown = unknown> = (...input: ArgsType) => ReturnType; | ||
export type MethodTypeUnknown<ArgsType extends any[] = any[], ReturnType extends unknown = unknown, TThis extends unknown = void> = (this: TThis, ...input: ArgsType) => ReturnType; | ||
/** | ||
* ReturnType is Promise<unknown> | ||
*/ | ||
export type AsyncMethodType<ArgsType extends any[] = any[], ResultType extends unknown = unknown> = (...input: ArgsType) => Promise<ResultType>; | ||
export type AsyncMethodType<ArgsType extends any[] = any[], ResultType extends unknown = unknown, TThis extends unknown = void> = (this: TThis, ...input: ArgsType) => Promise<ResultType>; | ||
//# sourceMappingURL=func.d.ts.map |
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "23.6.0", | ||
"version": "23.12.0", | ||
"description": "shared typescript types", | ||
@@ -70,3 +70,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "8c2868045846f7045fe02fe9fac8f66d8994ffc5" | ||
"gitHead": "9218536c22fdd89084cd5ed86eebefaf6eddc670" | ||
} |
@@ -17,7 +17,15 @@ /* eslint-disable @typescript-eslint/no-redundant-type-constituents */ | ||
*/ | ||
export type MethodType<ArgsType extends unknown[] = any[], ReturnType = any | Promise<any>> = (...input: ArgsType) => ReturnType | ||
export type MethodType< | ||
ArgsType extends unknown[] = any[], | ||
ReturnType = any | Promise<any>, | ||
TThis extends unknown = void, | ||
> = (this: TThis, ...input: ArgsType) => ReturnType | ||
/** | ||
* ReturnType is unknown | ||
*/ | ||
export type MethodTypeUnknown<ArgsType extends any[] = any[], ReturnType extends unknown = unknown> = (...input: ArgsType) => ReturnType | ||
export type MethodTypeUnknown< | ||
ArgsType extends any[] = any[], | ||
ReturnType extends unknown = unknown, | ||
TThis extends unknown = void, | ||
> = (this: TThis, ...input: ArgsType) => ReturnType | ||
@@ -27,3 +35,7 @@ /** | ||
*/ | ||
export type AsyncMethodType<ArgsType extends any[] = any[], ResultType extends unknown = unknown> = (...input: ArgsType) => Promise<ResultType> | ||
export type AsyncMethodType< | ||
ArgsType extends any[] = any[], | ||
ResultType extends unknown = unknown, | ||
TThis extends unknown = void, | ||
> = (this: TThis, ...input: ArgsType) => Promise<ResultType> | ||
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
76860
1335