ThemeCache.d.ts 811 B

1234567891011121314151617181920
  1. import type Theme from './Theme';
  2. import type { DerivativeFunc } from './interface';
  3. type DerivativeOptions = DerivativeFunc<any, any>[];
  4. export declare function sameDerivativeOption(left: DerivativeOptions, right: DerivativeOptions): boolean;
  5. export default class ThemeCache {
  6. static MAX_CACHE_SIZE: number;
  7. static MAX_CACHE_OFFSET: number;
  8. private readonly cache;
  9. private keys;
  10. private cacheCallTimes;
  11. constructor();
  12. size(): number;
  13. private internalGet;
  14. get(derivativeOption: DerivativeOptions): Theme<any, any> | undefined;
  15. has(derivativeOption: DerivativeOptions): boolean;
  16. set(derivativeOption: DerivativeOptions, value: Theme<any, any>): void;
  17. private deleteByPath;
  18. delete(derivativeOption: DerivativeOptions): Theme<any, any> | undefined;
  19. }
  20. export {};