import { Decorator } from "../decorator/decorator.js"; export declare enum Kind { Primitive = 1, Literal = 2, Array = 11, Object = 12, Union = 21, Decorator = 31 } export declare enum PrimitiveType { Any = 0, Null = 1, Undefined = 2, String = 3, Number = 4, Boolean = 5, BigInt = 6, Symbol = 7 } export type Ast = AstSugarPrimitive | AstSugarLiteral | AstSugarArray | AstSugarAnyArray | AstSugarObject | AstStrict; export type AstSugarPrimitive = null | undefined | StringConstructor | NumberConstructor | BooleanConstructor | BigIntConstructor | SymbolConstructor; export type AstSugarLiteral = string | number | boolean | bigint; export type AstSugarArray = [Ast]; export type AstSugarAnyArray = ArrayConstructor; export interface AstSugarObject { [key: string]: Ast; } export type AstStrict = AstPrimitive | AstLiteral | AstArray | AstObject | AstUnion | AstDecorator; export type AstPrimitive = [kind: Kind.Primitive, type: PrimitiveType]; export type AstLiteral = [ kind: Kind.Literal, type: string | number | boolean | bigint ]; export type AstArray = [kind: Kind.Array, of: T]; export type AstObject = [ kind: Kind.Object, obj: { [key: string]: T; } ]; export type AstUnion = [kind: Kind.Union, types: T[]]; export type AstDecorator = [ kind: Kind.Decorator, of: T, decorators: Decorator[] ];