import { JSONValue } from "./types" ; ignore export class Box < T extends Readonly < JSONValue > > { constructor ( public readonly value ) { } } export function boxed < T extends JSONValue > ( value ) { return new Box ( Object . freeze ( value ) as T ) ; }