UNPKG

webglimpse

Version:

Webglimpse is a data visualization library for the web.

59 lines (58 loc) 2.47 kB
export interface MultiKeyCacheHelper<V> { create(keyParts: string[]): V; dispose(value: V, keyParts: string[]): void; } export declare class MultiKeyCache<V> { private helper; private map; constructor(helper: MultiKeyCacheHelper<V>); private combineKeyParts; value(...keyParts: string[]): V; remove(...keyParts: string[]): void; retain(...keyParts: string[]): void; resetTouches(): void; retainTouched(): void; clear(): void; } export interface TwoKeyCacheHelper<V> { create(keyPart1: string, keyPart2: string): V; dispose(value: V, keyPart1: string, keyPart2: string): void; } export declare class TwoKeyCache<V> { private cache; constructor(helper: TwoKeyCacheHelper<V>); value(keyPart1: string, keyPart2: string): V; remove(keyPart1: string, keyPart2: string): void; retain(keyPart1: string, keyPart2: string): void; resetTouches(): void; retainTouched(): void; clear(): void; } export interface ThreeKeyCacheHelper<V> { create(keyPart1: string, keyPart2: string, keyPart3: string): V; dispose(value: V, keyPart1: string, keyPart2: string, keyPart3: string): void; } export declare class ThreeKeyCache<V> { private cache; constructor(helper: ThreeKeyCacheHelper<V>); value(keyPart1: string, keyPart2: string, keyPart3: string): V; remove(keyPart1: string, keyPart2: string, keyPart3: string): void; retain(keyPart1: string, keyPart2: string, keyPart3: string): void; resetTouches(): void; retainTouched(): void; clear(): void; } export interface SixKeyCacheHelper<V> { create(keyPart1: string, keyPart2: string, keyPart3: string, keyPart4: string, keyPart5: string, keyPart6: string): V; dispose(value: V, keyPart1: string, keyPart2: string, keyPart3: string, keyPart4: string, keyPart5: string, keyPart6: string): void; } export declare class SixKeyCache<V> { private cache; constructor(helper: SixKeyCacheHelper<V>); value(keyPart1: string, keyPart2: string, keyPart3: string, keyPart4: string, keyPart5: string, keyPart6: string): V; remove(keyPart1: string, keyPart2: string, keyPart3: string, keyPart4: string, keyPart5: string, keyPart6: string): void; retain(keyPart1: string, keyPart2: string, keyPart3: string, keyPart4: string, keyPart5: string, keyPart6: string): void; resetTouches(): void; retainTouched(): void; clear(): void; }