import { type DynamicBuffer } from '@platformatic/dynamic-buffer'; import { Ajv2020 } from 'ajv/dist/2020.js'; import debug from 'debug'; export interface EnumerationDefinition { allowed: T[]; errorMessage?: string; } export type KeywordSchema = { schema: T; }; export interface DataValidationContext { parentData: { [k: string | number]: any; }; } export type DebugDumpLogger = (...args: any[]) => void; export { setTimeout as sleep } from 'node:timers/promises'; interface PromiseWithResolvers { promise: Promise; resolve: (value: T | PromiseLike) => void; reject: (reason?: any) => void; } export declare const promiseWithResolvers: () => PromiseWithResolvers; export declare const ajv: Ajv2020; export declare const loggers: Record; export declare class NumericMap extends Map { getWithDefault(key: string, fallback: number): number; preIncrement(key: string, value: number, fallback: number): number; postIncrement(key: string, value: number, fallback: number): number; } export declare function niceJoin(array: string[], lastSeparator?: string, separator?: string): string; export declare function listErrorMessage(type: string[]): string; export declare function enumErrorMessage(type: Record, keysOnly?: boolean): string; export declare function groupByProperty(entries: readonly Value[], property: keyof Value): [Key, Value[]][]; export declare function humanize(label: string, buffer: Buffer | DynamicBuffer): string; export declare function setDebugDumpLogger(logger: DebugDumpLogger): void; export declare function debugDump(...values: unknown[]): void; export declare function emitExperimentalApiWarning(api: string): void;