Type Alias PromisifyInterface<ServiceType, ExcludeKeys>
PromisifyInterface: {
[K in Exclude<keyof ServiceType, ExcludeKeys> as ServiceType[K] extends (
...a: any,
) => any
? K
: never]: ServiceType[K] extends (...a: any[]) => void
? PromisifyFunctionReturnType<ServiceType[K]>
: never
}
[K in Exclude<keyof ServiceType, ExcludeKeys> as ServiceType[K] extends (
...a: any,
) => any
? K
: never]: ServiceType[K] extends (...a: any[]) => void
? PromisifyFunctionReturnType<ServiceType[K]>
: never
}
Type Parameters
- ServiceType
The interface type whose functions will be promisified
- ExcludeKeys extends string = never
Keys to exclude from promisification
Promisify all functions in an interface