UNPKG

kangaroo-expression

Version:

Secure expression evaluator with AST-based execution - A fast, safe, and powerful JavaScript-like expression language

25 lines 778 B
export type SerializationStrategy = 'json' | 'string' | 'object'; export interface TypeSchema { type: 'object'; properties: Record<string, TypePropertySchema>; required: string[]; } export interface TypePropertySchema { type: 'string' | 'number' | 'boolean' | 'object' | 'array'; } export interface TypeConfig { schema: TypeSchema; serialization: SerializationStrategy; } export interface RegisteredType { name: string; config: TypeConfig; } export interface TypeRegistry { register(name: string, config: TypeConfig): void; detectType(value: any): string | null; serialize(value: any, typeName: string): any; getRegisteredTypes(): RegisteredType[]; hasType(name: string): boolean; } //# sourceMappingURL=type-registry.d.ts.map