r19
Version:
Simple remote procedure calls in TypeScript
7 lines (6 loc) • 367 B
TypeScript
type Replacer = (value: unknown) => unknown | Promise<unknown>;
type ReplaceLeavesReturnValue<TInput> = TInput extends any[] ? unknown[] : TInput extends Record<PropertyKey, any> ? {
[P in keyof TInput]: unknown;
} : unknown;
export declare const replaceLeaves: <TInput>(input: TInput, replacer: Replacer) => Promise<ReplaceLeavesReturnValue<TInput>>;
export {};