securityos/node_modules/next/dist/lib/coalesced-function.d.ts

8 lines
327 B
TypeScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
type CoalescedInvoke<T> = {
isOrigin: boolean;
value: T;
};
export type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;
export declare function withCoalescedInvoke<F extends (...args: any) => any>(func: F): (key: string, args: Parameters<F>) => Promise<CoalescedInvoke<UnwrapPromise<ReturnType<F>>>>;
export {};