@worker-tools/structured-json
Version:
Stringify and parse JavaScript values according to Structured Clone Algorithm.
8 lines (7 loc) • 486 B
TypeScript
export declare function parse(s: string): any;
export declare function stringify(value: any): string;
export declare function stringifyAsync(value: any): string | Promise<string>;
export declare function toJSON(value: any): any;
export declare function toJSONAsync(value: any): any | Promise<any>;
export declare function fromJSON(json: any): any;
export { toJSON as toJSONValue, fromJSON as fromJSONValue, fromJSON as revive, toJSON as encapsulate, toJSONAsync as encapsulateAsync, };