import type * as types from "./types"; type ESMap = globalThis.Map; declare const ESMap: MapConstructor; type ESSet = globalThis.Set; declare const ESSet: SetConstructor; type ESIterable = globalThis.Iterable; type DOMNode = globalThis.Node; declare const DOMNode: { new (): globalThis.Node; prototype: globalThis.Node; readonly ELEMENT_NODE: 1; readonly ATTRIBUTE_NODE: 2; readonly TEXT_NODE: 3; readonly CDATA_SECTION_NODE: 4; readonly ENTITY_REFERENCE_NODE: 5; readonly ENTITY_NODE: 6; readonly PROCESSING_INSTRUCTION_NODE: 7; readonly COMMENT_NODE: 8; readonly DOCUMENT_NODE: 9; readonly DOCUMENT_TYPE_NODE: 10; readonly DOCUMENT_FRAGMENT_NODE: 11; readonly NOTATION_NODE: 12; readonly DOCUMENT_POSITION_DISCONNECTED: 1; readonly DOCUMENT_POSITION_PRECEDING: 2; readonly DOCUMENT_POSITION_FOLLOWING: 4; readonly DOCUMENT_POSITION_CONTAINS: 8; readonly DOCUMENT_POSITION_CONTAINED_BY: 16; readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32; }; export interface Kind { constructor: Function & { __name__: string; }; } export declare abstract class Kind { __type__: T; coerce?(value: unknown): unknown; abstract valid(value: unknown): value is this["__type__"]; abstract may_have_refs(): boolean; static readonly __name__: string; get kind_name(): string; get kind_args(): unknown[]; toString(): string; } export type Constructor = Function & { prototype: T; }; export declare namespace Kinds { abstract class Primitive extends Kind { may_have_refs(): boolean; } class Any extends Primitive { valid(value: unknown): value is any; may_have_refs(): boolean; } class Unknown extends Primitive { valid(value: unknown): value is unknown; may_have_refs(): boolean; } class Bool extends Primitive { valid(value: unknown): value is boolean; } class Ref extends Kind { readonly obj_type: Constructor; constructor(obj_type: Constructor); valid(value: unknown): value is ObjType; get type_name(): string; toString(): string; may_have_refs(): boolean; } class AnyRef extends Kind { valid(value: unknown): value is ObjType; may_have_refs(): boolean; } class Float extends Primitive { valid(value: unknown): value is number; } class Int extends Float { valid(value: unknown): value is number; } class Percent extends Float { valid(value: unknown): value is number; } type TupleKind = { [K in keyof T]: Kind; }; type ObjectKind = { [K in keyof T]: Kind; }; class Or extends Kind { readonly types: TupleKind; constructor(types: TupleKind); valid(value: unknown): value is T[number]; get kind_args(): unknown[]; may_have_refs(): boolean; } class And extends Kind { readonly types: [Kind, Kind]; constructor(type0: Kind, type1: Kind); valid(value: unknown): value is T0 & T1; get kind_args(): unknown[]; may_have_refs(): boolean; } class Tuple extends Kind { readonly types: TupleKind; constructor(types: TupleKind); valid(value: unknown): value is T; get kind_args(): unknown[]; may_have_refs(): boolean; } class Struct extends Kind { readonly struct_type: ObjectKind; constructor(struct_type: ObjectKind); valid(value: unknown): value is this["__type__"]; toString(): string; may_have_refs(): boolean; } class PartialStruct extends Kind> { readonly struct_type: ObjectKind; constructor(struct_type: ObjectKind); valid(value: unknown): value is this["__type__"]; toString(): string; may_have_refs(): boolean; } class Iterable extends Kind> { readonly item_type: Kind; constructor(item_type: Kind); valid(value: unknown): value is ESIterable; get kind_args(): unknown[]; may_have_refs(): boolean; } class Arrayable extends Kind> { readonly item_type: Kind; constructor(item_type: Kind); valid(value: unknown): value is types.Arrayable; get kind_args(): unknown[]; may_have_refs(): boolean; } class List extends Kind { readonly item_type: Kind; constructor(item_type: Kind); valid(value: unknown): value is ItemType[]; get kind_args(): unknown[]; may_have_refs(): boolean; } class NonEmptyList extends List { valid(value: unknown): value is ItemType[]; get kind_args(): unknown[]; } class Null extends Primitive { valid(value: unknown): value is null; } class Nullable extends Kind { readonly base_type: Kind; constructor(base_type: Kind); valid(value: unknown): value is BaseType | null; get kind_args(): unknown[]; may_have_refs(): boolean; } class Opt extends Kind { readonly base_type: Kind; constructor(base_type: Kind); valid(value: unknown): value is BaseType | undefined; get kind_args(): unknown[]; may_have_refs(): boolean; } class Bytes extends Kind { valid(value: unknown): value is ArrayBuffer; may_have_refs(): boolean; } class Str extends Primitive { valid(value: unknown): value is string; } class PrefixedStr

extends Primitive<`${P}${string}`> { readonly prefix: P; constructor(prefix: P); valid(value: unknown): value is this["__type__"]; get kind_args(): unknown[]; } class Regex extends Str { readonly regex: RegExp; constructor(regex: RegExp); valid(value: unknown): value is string; get kind_args(): unknown[]; } class Enum extends Primitive { readonly values: ESSet; constructor(values: ESIterable); valid(value: unknown): value is T; [Symbol.iterator](): Generator; get kind_args(): unknown[]; } class Dict extends Kind> { readonly item_type: Kind; constructor(item_type: Kind); valid(value: unknown): value is this["__type__"]; get kind_args(): unknown[]; may_have_refs(): boolean; } class KeyVal extends Kind> { readonly key_type: Kind; readonly item_type: Kind; constructor(key_type: Kind, item_type: Kind); valid(value: unknown): value is this["__type__"]; get kind_args(): unknown[]; may_have_refs(): boolean; } class Mapping extends Kind> { readonly key_type: Kind; readonly item_type: Kind; constructor(key_type: Kind, item_type: Kind); coerce(value: unknown): unknown; valid(value: unknown): value is this["__type__"]; get kind_args(): unknown[]; may_have_refs(): boolean; } class Set extends Kind> { readonly item_type: Kind; constructor(item_type: Kind); valid(value: unknown): value is this["__type__"]; get kind_args(): unknown[]; may_have_refs(): boolean; } class Color extends Kind { valid(value: unknown): value is types.Color; may_have_refs(): boolean; } class CSSLength extends Str { } class Func extends Kind<(...args: Args) => Ret> { readonly args_types?: TupleKind | undefined; readonly ret_type?: Kind | undefined; constructor(args_types?: TupleKind | undefined, ret_type?: Kind | undefined); valid(value: unknown): value is this["__type__"]; toString(): string; may_have_refs(): boolean; } class NonNegative extends Kind { readonly base_type: Kind; constructor(base_type: Kind); valid(value: unknown): value is BaseType; get kind_args(): unknown[]; may_have_refs(): boolean; } class Positive extends Kind { readonly base_type: Kind; constructor(base_type: Kind); valid(value: unknown): value is BaseType; get kind_args(): unknown[]; may_have_refs(): boolean; } class Node extends Kind { valid(value: unknown): value is DOMNode; may_have_refs(): boolean; } } export declare const Any: Kinds.Any; export declare const Unknown: Kinds.Unknown; export declare const Bool: Kinds.Bool; export declare const Float: Kinds.Float; export declare const Int: Kinds.Int; export declare const Bytes: Kinds.Bytes; export declare const Str: Kinds.Str; export declare const PrefixedStr: (prefix: Prefix) => Kinds.PrefixedStr; export declare const Regex: (regex: RegExp) => Kinds.Regex; export declare const Null: Kinds.Null; export declare const Nullable: (base_type: Kind) => Kinds.Nullable; export declare const Opt: (base_type: Kind) => Kinds.Opt; export declare const Or: (...types: Kinds.TupleKind) => Kinds.Or; export declare const And: (type0: Kind, type1: Kind) => Kinds.And; export declare const Tuple: (...types: Kinds.TupleKind) => Kinds.Tuple; export declare const Struct: (struct_type: Kinds.ObjectKind) => Kinds.Struct; export declare const PartialStruct: (struct_type: Kinds.ObjectKind) => Kinds.PartialStruct; export declare const Iterable: (item_type: Kind) => Kinds.Iterable; export declare const Arrayable: (item_type: Kind) => Kinds.Arrayable; export declare const List: (item_type: Kind) => Kinds.List; export declare const NonEmptyList: (item_type: Kind) => Kinds.NonEmptyList; export declare const Dict: (item_type: Kind) => Kinds.Dict; export declare const KeyVal: (key_type: Kind, item_type: Kind) => Kinds.KeyVal; export declare const Mapping: (key_type: Kind, item_type: Kind) => Kinds.Mapping; export declare const Set: (item_type: Kind) => Kinds.Set; export declare const Enum: (...values: T[]) => Kinds.Enum; export declare const Ref: (obj_type: Constructor) => Kinds.Ref; export declare const AnyRef: () => Kinds.AnyRef; export declare const Func: (args_types?: Kinds.TupleKind, ret_type?: Kind) => Kinds.Func; export declare const Func0: (ret_type: Kind) => Kinds.Func<[], Ret>; export declare const Node: Kinds.Node; export declare const NonNegative: (base_type: Kind) => Kinds.NonNegative; export declare const Positive: (base_type: Kind) => Kinds.Positive; export declare const Percent: Kinds.Percent; export declare const Alpha: Kinds.Percent; export declare const Color: Kinds.Color; export declare const Auto: Kinds.Enum<"auto">; export declare const CSSLength: Kinds.CSSLength; export declare const FontSize: Kinds.Str; export declare const Font: Kinds.Str; export declare const Angle: Kinds.Float; export type Float = typeof Float["__type__"]; export type Dict = Kinds.Dict["__type__"]; /** @deprecated */ export declare const Boolean: Kinds.Bool; /** @deprecated */ export declare const String: Kinds.Str; /** @deprecated */ export declare const Number: Kinds.Float; /** @deprecated */ export declare const Array: (item_type: Kind) => Kinds.List; /** @deprecated */ export declare const Map: (key_type: Kind, item_type: Kind) => Kinds.Mapping; /** @deprecated */ export declare const Function: (args_types?: Kinds.TupleKind, ret_type?: Kind) => Kinds.Func; export {}; //# sourceMappingURL=kinds.d.ts.map