UNPKG

1.05 kBTypeScriptView Raw
1import { EventsKey } from './events';
2import BaseEvent from './events/Event';
3import LRUCache from './structs/LRUCache';
4
5export default class TileCache extends LRUCache<any> {
6 constructor();
7 expireCache(usedTiles: { [key: string]: boolean }): void;
8 /**
9 * Prune all tiles from the cache that don't have the same z as the newest tile.
10 */
11 pruneExceptNewestZ(): void;
12 on(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
13 once(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[];
14 un(type: string | string[], listener: (p0: any) => any): void;
15 on(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
16 once(type: 'change', listener: (evt: BaseEvent) => void): EventsKey;
17 un(type: 'change', listener: (evt: BaseEvent) => void): void;
18 on(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
19 once(type: 'error', listener: (evt: BaseEvent) => void): EventsKey;
20 un(type: 'error', listener: (evt: BaseEvent) => void): void;
21}