import type * as ts from "typescript"; export declare const F_READONLY: 'R'; export declare const F_ABSTRACT: 'A'; export declare const F_PUBLIC: '$'; export declare const F_PRIVATE: '#'; export declare const F_PROTECTED: '@'; export declare const F_PROPERTY: 'P'; export declare const F_METHOD: 'M'; export declare const F_STATIC: 'S'; export declare const F_CLASS: 'C'; export declare const F_INTERFACE: 'I'; export declare const F_FUNCTION: 'F'; export declare const F_ARROW_FUNCTION: '>'; export declare const F_OPTIONAL: '?'; export declare const F_REST: '3'; export declare const F_ASYNC: 'a'; export declare const F_EXPORTED: 'e'; export declare const F_INFERRED: '.'; export declare const F_OMITTED: ','; /** * Flag attached to parameters which indicates that the parameter * is actually an array binding expression (aka destructured assignment). */ export declare const F_ARRAY_BINDING: '['; /** * Flag attached to parameters which indicates that the parameter * is actually an object binding expression (aka destructured assignment). */ export declare const F_OBJECT_BINDING: 'O'; export declare const T_UNION: '|'; export declare const T_INTERSECTION: '&'; export declare const T_ANY: '~'; export declare const T_UNKNOWN: 'U'; export declare const T_VOID: 'V'; export declare const T_UNDEFINED: 'u'; export declare const T_NULL: 'n'; export declare const T_TUPLE: 'T'; export declare const T_ARRAY: '['; export declare const T_THIS: 't'; export declare const T_GENERIC: 'g'; export declare const T_MAPPED: 'm'; export declare const T_TRUE: '1'; export declare const T_FALSE: '0'; export declare const T_CALLSITE: 'c'; export declare const T_STAND_IN: '5'; export declare const T_OBJECT: 'O'; export declare const T_ENUM: 'e'; export declare const T_FUNCTION: 'F'; export declare const T_INTRINSICS: ("~" | "U" | "V" | "u" | "n" | "t" | "1" | "0")[]; export declare const TI_VOID: RtIntrinsicType; export declare const TI_ANY: RtIntrinsicType; export declare const TI_UNKNOWN: RtIntrinsicType; export declare const TI_UNDEFINED: RtIntrinsicType; export declare const TI_TRUE: RtIntrinsicType; export declare const TI_FALSE: RtIntrinsicType; export declare const TI_THIS: RtIntrinsicType; export declare const TI_NULL: RtIntrinsicType; export type Literal = number | string | bigint; export interface InterfaceToken { name: string; prototype: any; identity: symbol; } /** * Represents a type within the serialized emit RTTI format. */ export type RtType = RtDeferrableStructuralType | RtDeferrableValueType | RtDeferredType; export type RtDeferrableStructuralType = RtIntrinsicType | RtObjectType | RtUnionType | RtIntersectionType | RtTupleType | RtArrayType | RtGenericType | RtMappedType | RtEnumType | RtCallSite | { TΦ: typeof T_STAND_IN; } | RtFunctionType | Literal; export type RtDeferrableValueType = Function | InterfaceToken; export type RtDeferredType = RtDeferrableStructuralType | RtDeferredValueType; export interface RtDeferredStructuralType { RΦ: () => RtDeferrableStructuralType; } export interface RtDeferredValueType { LΦ: () => RtDeferrableValueType; } export type RtBrandedType = { TΦ: typeof T_UNION | typeof T_INTERSECTION | typeof T_ANY | typeof T_UNKNOWN | typeof T_VOID | typeof T_UNDEFINED | typeof T_NULL | typeof T_TUPLE | typeof T_ARRAY | typeof T_THIS | typeof T_GENERIC | typeof T_MAPPED | typeof T_TRUE | typeof T_FALSE | typeof T_CALLSITE | typeof T_ENUM | typeof T_STAND_IN; }; export type RtIntrinsicIndicator = typeof T_VOID | typeof T_ANY | typeof T_UNKNOWN | typeof T_UNDEFINED | typeof T_TRUE | typeof T_FALSE | typeof T_THIS | typeof T_NULL; export type RtIntrinsicType = { TΦ: T; }; export type RtVoidType = RtIntrinsicType; export type RtNullType = RtIntrinsicType; export type RtUndefinedType = RtIntrinsicType; export type RtFalseType = RtIntrinsicType; export type RtTrueType = RtIntrinsicType; export type RtUnknownType = RtIntrinsicType; export type RtAnyType = RtIntrinsicType; export type RtThisType = RtIntrinsicType; export interface RtCallSite { TΦ: typeof T_CALLSITE; /** * Type of `this`. Not currently supported, always undefined. */ t: RtType; /** * Parameter types of the call */ p: RtType[]; /** * Type parameters (generics) */ tp: RtType[]; r: RtType; } export interface RtUnionType { TΦ: typeof T_UNION; t: RtType[]; } export interface RtObjectType { TΦ: typeof T_OBJECT; n?: string; m: RtObjectMember[]; } export interface RtFunctionType { TΦ: typeof T_FUNCTION; r: RtType; p: RtParameter[]; f: string; } export interface RtObjectMember { n: string; f: string; t: RtType; } export interface RtIntersectionType { TΦ: typeof T_INTERSECTION; t: RtType[]; } export interface RtArrayType { TΦ: typeof T_ARRAY; e: RtType; } export interface RtTupleElement { n: string; t: RtType; } export interface RtTupleType { TΦ: typeof T_TUPLE; e: RtTupleElement[]; } export interface RtMappedType { TΦ: typeof T_MAPPED; /** * The underlying mapped type */ t: RtType; /** * Generic parameters of this type */ p: RtType[]; /** * The resulting object members after applying the mapped type */ m?: RtObjectMember[]; } export interface RtGenericType { TΦ: typeof T_GENERIC; t: RtType; p: RtType[]; } export interface RtEnumType { TΦ: typeof T_ENUM; /** * This will be the runtime enum object, if it exists. * It will be undefined for const enums. */ e: any; /** * Name of the enum */ n?: string; /** * Values of the enum. Only provided for constant enums. */ v?: Map; } /** * Represents an encoded function/method parameter. */ export interface RtParameter { /** * Name of the parameter. Not present when this parameter is an array or object binding. */ n?: string; /** * Whether this parameter is an array ('a') or object ('o') binding. Additionally RtParameters * which have `bt` set to ',' are omitted expressions (only valid in array binding expressions). * Array binding is Typescript's name for "destructuring assignment", see * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment * for details. */ bt?: 'a' | 'o' | ','; /** * The bindings for this parameter slot. Only present when `bt` is set to 'a' or 'o' * (meaning this parameter is an array or object binding, respectively) */ b?: RtParameter[]; /** * The type of this parameter. */ t?: () => any; /** * The initializer for this parameter. Calling may cause side effects. * Only present if we are not an array/object binding */ v?: () => any; /** * The flags for this parameter. */ f?: string; } export interface LiteralSerializedNode { $__isTSNode: true; node: ts.Expression; } export type RtSerialized = T | { [K in keyof T]: T[K] | RtSerialized | (T[K] extends Array ? LiteralSerializedNode[] : LiteralSerializedNode); }; export declare function isLiteralNode(node: T | LiteralSerializedNode): node is LiteralSerializedNode; //# sourceMappingURL=format.d.ts.map