/** * Spawn an error replacing %s in format string with other arguments. * * @hidden */ export declare function spawnUnexpectedError(errorMessageFormat: string, ...errorMessageArgs: ReadonlyArray): Error; export interface UserError extends Error { __userInfo: T; } /** * Spawn an error with an object with error info to render to the user. * * @hidden */ export declare function spawnUserError(errorInfo: T): UserError; /** * An alternative to facebook's invariant that's safe to use with base data * * If the first argument after the format string may be used to look up a way to * format the arguments into a more human digestible message that can include * links, styling, or emojis. See {@link verbose_message.ts} and * {@link airtable_api.ts} for examples. * * @hidden */ export declare function invariant(condition: unknown, errorMessageFormat: string, ...errorMessageArgs: Array): asserts condition; /** * @internal */ export declare function spawnUnknownSwitchCaseError(valueDescription: string, providedValue: never, key: string): Error; /** * @internal */ export declare function spawnAbstractMethodError(): Error; /** * This is used to pass errors across separate processes. If you try to send an * `Error` object across processes, you will lose information since * JSON.stringify(err) produces {} since `Error` has no enumerable properties. * Instead you should send a SerializedError across processes. * * @internal */ export interface SerializedError { __serializedError: true; name: string; message: string; stack?: string; } /** * @internal */ export declare function serializeError(err: Error): SerializedError; /** * @internal */ export declare function deserializeError(jsonErr: SerializedError): Error;