UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

14 lines (11 loc) 392 B
import { getNestedErrorCtor, INestedErrorCtorConfig } from "./nested-error-factory.js"; import { fpIdentity } from "../fp/impl/fp-identity.js"; const config: INestedErrorCtorConfig<string> = { getTxFallback: fpIdentity, defaultError: "An unknown error occurred.", }; /** * @public * A non-localized {@link INestedError}. */ export const NestedError = getNestedErrorCtor(config);