UNPKG

s2-tools

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

39 lines 1.21 kB
import type { KVStore } from '.'; import type { Stringifiable } from '..'; import type { Uint64 } from '../../dataStructures/uint64'; /** File based multimap store */ export declare class FileKV<V = Stringifiable> implements KVStore<V> { #private; /** * Builds a new MultiMap file store * @param fileName - the path + file name without the extension */ constructor(fileName?: string); /** @returns - the length of the map */ get length(): number; /** * Adds a value to the list of values associated with a key * @param key - the key * @param value - the value to store */ set(key: Uint64, value: V): void; /** * Gets the list of values associated with a key * @param key - the key * @returns the list of values if the map contains values for the key */ get(key: Uint64): Promise<V | undefined>; /** * iterate through the values * @yields an iterator */ values(): AsyncGenerator<V>; /** * iterate through the values * @returns an iterator */ [Symbol.asyncIterator](): AsyncGenerator<V>; /** Closes the store */ close(): void; } //# sourceMappingURL=file.d.ts.map