softkave-js-utils
Version:
JavaScript & Typescript utility functions, types, and classes
5 lines (4 loc) • 333 B
TypeScript
import { AnyFn } from '../types.js';
/** Returns a function that calls `afterFn` with the result of, and arguments of
* `fn`. */
export declare function callAfterAsync<TFn extends AnyFn, TAfterFn extends AnyFn<[Awaited<ReturnType<TFn>>, ...Parameters<TFn>]>>(fn: TFn, afterFn: TAfterFn): (...args: Parameters<TFn>) => Promise<any>;