UNPKG

typegpu

Version:

A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.

12 lines (11 loc) 360 B
/** * Caches results of the function passed in as * the argument to the constructor. * * If the key can be garbage collected, it will be. */ export declare class WeakMemo<TKey extends object, TValue, TArgs extends unknown[]> { #private; constructor(make: (key: TKey, ...args: TArgs) => TValue); getOrMake(key: TKey, ...args: TArgs): TValue; }