@aurbi/ts-binding
Version:
bidirectionally bind serialized & simplified objects to full-featured runtime objects. kinda like a subset of zod, but it goes both ways.
12 lines (11 loc) • 597 B
TypeScript
import { Bound, DefaultStackType, Stack, ToStringable } from "./types";
export declare class TransformationError<T extends ToStringable> {
message: string;
offender?: any | undefined;
constructor(message: string, customStack?: Stack<T>, offender?: any | undefined);
location: string;
toString(): string;
}
export declare function stack<T extends ToStringable = DefaultStackType>(existing?: T[]): Stack<T>;
/** convenience wrapper to push a stack message on simple alias types */
export declare function stackwrap<T, U>(upstream: Bound<T, U>, thisMessage: string): Bound<T, U>;