@jsonjoy.com/json-type
Version:
High-performance JSON Pointer implementation
16 lines (15 loc) • 1.02 kB
TypeScript
import { JsExpression } from '@jsonjoy.com/codegen/lib/util/JsExpression';
import { JsonEncoder } from '@jsonjoy.com/json-pack/lib/json/JsonEncoder';
import { type ArrType, type MapType, type KeyType, type ObjType, type Type } from '../../../type';
import { AbstractBinaryCodegen } from '../AbstractBinaryCodegen';
import type { CompiledBinaryEncoder, SchemaPath } from '../../types';
export declare class JsonCodegen extends AbstractBinaryCodegen<JsonEncoder> {
static readonly get: (this: unknown, type: Type, name?: string | undefined) => CompiledBinaryEncoder;
protected encoder: JsonEncoder;
protected linkGet(): void;
protected onArr(path: SchemaPath, r: JsExpression, type: ArrType): void;
protected onObj(path: SchemaPath, value: JsExpression, type: ObjType): void;
protected onMap(path: SchemaPath, val: JsExpression, type: MapType): void;
protected onKey(path: SchemaPath, r: JsExpression, type: KeyType<any, any>): void;
protected genEncoder(type: Type): CompiledBinaryEncoder;
}