export interface SortOptions { comparer: (a: T, b: T) => number; sort: 'insertion' | 'comparison'; } export declare class SortedMap { private _comparer; private _keys; private _values; private _order; private _version; private _copyOnWrite; constructor(comparer: ((a: K, b: K) => number) | SortOptions, iterable?: Iterable<[K, V]>); get size(): number; get comparer(): (a: K, b: K) => number; get [Symbol.toStringTag](): string; has(key: K): boolean; get(key: K): V | undefined; set(key: K, value: V): this; delete(key: K): boolean; clear(): void; forEach(callback: (value: V, key: K, collection: this) => void, thisArg?: any): void; keys(): Generator; values(): Generator; entries(): Generator<[K, V], void, unknown>; [Symbol.iterator](): Generator<[K, V], void, unknown>; private _writePreamble; private _writePostScript; private _getIterationOrder; /** Remove an item by index from an array, moving everything to its right one space left. */ private _orderedRemoveItemAt; } export declare function getIterator(iterable: Iterable): Iterator; export declare function nextResult(iterator: Iterator): IteratorResult | undefined; export declare function closeIterator(iterator: Iterator): void; /** * A collection of metadata that supports inheritance. */ export declare class Metadata { private static readonly _undefinedValue; private _parent; private _map; private _version; private _size; private _parentVersion; constructor(parent?: Metadata); get size(): number; get parent(): Metadata | undefined; has(key: string): boolean; get(key: string): any; set(key: string, value: any): this; delete(key: string): boolean; clear(): void; forEach(callback: (value: any, key: string, map: this) => void): void; private static _escapeKey; private static _unescapeKey; } export declare function bufferFrom(input: string, encoding?: BufferEncoding): Buffer; export declare const IO_ERROR_MESSAGE: Readonly<{ EACCES: "access denied"; EIO: "an I/O error occurred"; ENOENT: "no such file or directory"; EEXIST: "file already exists"; ELOOP: "too many symbolic links encountered"; ENOTDIR: "no such directory"; EISDIR: "path is a directory"; EBADF: "invalid file descriptor"; EINVAL: "invalid value"; ENOTEMPTY: "directory not empty"; EPERM: "operation not permitted"; EROFS: "file system is read-only"; }>; export declare function createIOError(code: keyof typeof IO_ERROR_MESSAGE, details?: string): NodeJS.ErrnoException; export declare function stringify(data: any, replacer?: (key: string, value: any) => any): string;