typedash
Version:
modern, type-safe collection of utility functions
14 lines (13 loc) • 598 B
TypeScript
import { t as AnyFunction } from "./AnyFunction-DygJG5Tn.js";
//#region src/functions/once/once.d.ts
/**
* Invokes the given function only once, no matter how many times it's called.
* If it was already invoked before, returns the result from the first invocation.
* @template TFunction The type of the function to be invoked.
* @param fn The function to be invoked.
* @returns The result of the first invocation of the function.
*/
declare function once<TFunction extends AnyFunction>(fn: TFunction): TFunction;
//#endregion
export { once as t };
//# sourceMappingURL=once-GaJMEvEp.d.ts.map