UNPKG

501 BTypeScriptView Raw
1declare module '@ember/routing/lib/cache' {
2 /**
3 A two-tiered cache with support for fallback values when doing lookups.
4 Uses "buckets" and then "keys" to cache values.
5
6 @private
7 @class BucketCache
8 */
9 export default class BucketCache {
10 cache: Map<string, Map<string, any>>;
11 constructor();
12 has(bucketKey: string): boolean;
13 stash(bucketKey: string, key: string, value: any): void;
14 lookup(bucketKey: string, prop: string, defaultValue: any): any;
15 }
16}