import { TimeoutError } from '../errors/timeoutErrors'; import type { Node } from '../types'; import { Chapter, type ChapterStrings, Variant } from '../langs'; export declare class PromiseTimeoutError extends TimeoutError { explain(): string; } export declare const timeoutPromise: (promise: Promise, timeout: number, node?: Node) => Promise; /** * Run the mapping function over the items, filtering out any items that * that the mapping function returned `undefined` for */ export declare function mapAndFilter(items: T[], mapper: (input: T) => U | undefined): U[]; /** * Type safe `Object.keys` */ export declare function objectKeys(obj: Record): T[]; /** * Given the chapter value, return the string name of that chapter */ export declare function getChapterName(chapter: Chapter): ChapterStrings; /** * Given the variant value, return the string name of that variant */ export declare function getVariantName(variant: Variant): "DEFAULT" | "TYPED" | "NATIVE" | "WASM" | "EXPLICIT_CONTROL";