@stringsync/vexml
Version:
MusicXML to Vexflow
14 lines (13 loc) • 511 B
TypeScript
/**
* Memoizes a method.
*
* This decorator is backed by an LRU cache to avoid memory leaks. Each argument provided can yield another LRU true if
* there are arguments after it. The `degree` parameter is the capacity of each LRU cache "level". It must be declared
* statically.
*
* NOTE: LRU caches depend on _identity_ for indexing. If you need values to resolve based on _equivalency_, do not use
* this decorator.
*/
export declare function memoize(opts?: {
degree: number;
}): MethodDecorator;