@bemedev/basifun
Version:
Basic ts functions
25 lines • 928 B
TypeScript
/**
* PromisifyMethod type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type PromisifyMethod<T> = T extends (...args: infer P) => infer R ? R extends Promise<any> ? T : (...args: P) => Promise<R> : never;
/**
* PromisifyObject type - Auto-generated expression
*
* ⚠️ WARNING: This expression is auto-generated and should not be modified.
* Any manual changes will be overwritten during the next generation.
*
* @generated
* @readonly
* @author chlbri (bri_lvi@icloud.com)
*/
export type PromisifyObject<T extends Record<string, unknown>> = T & {
[P in keyof T as PromisifyMethod<T[P]> extends never ? never : `${string & P}Async`]: PromisifyMethod<T[P]>;
};
//# sourceMappingURL=types.d.ts.map