UNPKG

@jsonjoy.com/json-type

Version:

High-performance JSON Pointer implementation

10 lines (9 loc) 594 B
export declare const normalizeAccessor: (key: string) => string; /** * Creates a lazily evaluated factory function that caches results based on the * first argument. * * @param factory A factory function that takes a key as the first argument, * potentially more arguments, and returns a function. */ export declare const lazyKeyedFactory: <K extends WeakKey, FactoryThis, FactoryArgs extends [key: K, ...args: any[]], Method extends (...args: any[]) => any>(factory: (this: FactoryThis, ...args: FactoryArgs) => Method) => (this: FactoryThis, ...factoryArgs: FactoryArgs) => Method;