import { apply, parse, stringify } from "avril:fjson"; const value: unknown = parse("answer: 42"); const source: string = stringify(value); const unchanged: string = apply(source); const changed: string = apply(source, { answer: 43 }, { obsolete: undefined }); // @ts-expect-error The parsed value is unknown, not any. const unchecked: string = parse(source); // @ts-expect-error Source text is required. parse(); // @ts-expect-error Runtime coercion does not broaden the public string contract. parse(123); // @ts-expect-error Runtime coercion does not broaden the public string contract. apply(123, {}); // @ts-expect-error Overrides must be records. apply(source, 123); // @ts-expect-error Internal ops are not part of the public declaration graph. import { op_fjson_parse } from "ext:core/ops";