import { DatagramInitObject } from "../../Independents/Datagram/datagram-types.js"; declare type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array; export declare let encoder: TextEncoder; export declare let decoder: TextDecoder; /** * Creates a binary message blob for an object that may contain a body property in binary format. * The object must otherwise be jsonable. * @param json The otherwise jsonable object * @returns A byte array */ export declare function encodeMessage(dg: DatagramInitObject): ArrayBuffer; /** * Converts the byte array generated by encodeMessage() back to its * original form. * @param message The raw data * @returns */ export declare function decodeMessage(message: ArrayBuffer): DatagramInitObject; export declare function encodeBody(body: object | string | undefined): { body: Uint8Array; type?: string; }; export declare function decodeBody(body: ArrayBuffer, type: string | null): any; export declare function concatenate(resultConstructor: new (length: number) => TypedArray, ...arrays: T[]): T; export declare function evalESM(js: string): Promise; export declare function evalFunction(js: string, type: string): Promise<(...args: any[]) => any>; export {};