UNPKG

@opra/common

Version:
40 lines (39 loc) 1.48 kB
export interface ResponsiveMapOptions { wellKnownKeys?: string[]; caseSensitive?: boolean; } export type ResponsiveMapInit<V> = ResponsiveMap<V> | Map<string, V> | Record<any, V>; declare const kEntries: unique symbol; declare const kKeyMap: unique symbol; declare const kWellKnownKeys: unique symbol; declare const kOptions: unique symbol; declare const kSize: unique symbol; /** * A Map implementation that supports case-insensitivity and ordered keys */ export declare class ResponsiveMap<V> { private [kSize]; private [kEntries]; private [kKeyMap]; private [kWellKnownKeys]; private [kOptions]; constructor(init?: ResponsiveMapInit<V> | null, options?: ResponsiveMapOptions); get size(): number; clear(): void; forEach(callbackfn: (value: V, key: string, map: ResponsiveMap<V>) => void, thisArg?: any): void; get(key: string): V | undefined; has(key: string): boolean; set(key: string, value: V): this; setAll(source: ResponsiveMapInit<V>): this; keys(): IterableIterator<string>; values(): IterableIterator<V>; entries(): IterableIterator<[string, V]>; delete(key: string): boolean; sort(compareFn?: (a: string, b: string) => number): this; toObject(): Record<string, V>; [Symbol.iterator](): IterableIterator<[string, V]>; get [Symbol.toStringTag](): string; protected _getOriginalKey(key: string): string; protected _getStoringKey(key: string): string; } export {};