Logo Xantham

Xantham Namespace

Contents

Other namespace members

Type/Module Description

InlinedTsTypeParameter (Module)

InlinedTsTypeParameter (Module)

Schema (Module)

Schema (Module)

TsAccessor (Module)

TsAccessor (Module)

TsAccessor (Type)

TsAccessor (Type)

TsAstNode (Type)

TsAstNode (Type)

TsCallSignature (Module)

TsCallSignature (Module)

TsClass (Module)

TsClass (Module)

TsClass (Type)

Represents a TypeScript `class` with constructors, members, generics and heritage. Reflects: `ClassDeclaration` and its computed `InterfaceType` for instance side. Example (TS): ```ts export class C implements Iterable { constructor(public value: T) {} length = 0 } ```

TsClass (Type)

Represents a TypeScript `class` with constructors, members, generics and heritage. Reflects: `ClassDeclaration` and its computed `InterfaceType` for instance side. Example (TS): ```ts export class C implements Iterable { constructor(public value: T) {} length = 0 } ```

TsClassHeritage (Module)

TsClassHeritage (Module)

TsClassHeritage (Type)

Represents `extends` and `implements` relationships for classes. Reflects: `HeritageClause` with `extends`/`implements` on classes.

TsClassHeritage (Type)

Represents `extends` and `implements` relationships for classes. Reflects: `HeritageClause` with `extends`/`implements` on classes.

TsComment (Module)

TsComment (Module)

TsConditionalType (Module)

TsConditionalType (Module)

TsConditionalType (Type)

Represents a conditional type `T extends U ? X : Y`. Reflects: `ConditionalType`. Example (TS): ```ts type IfNumber = T extends number ? 'num' : 'other' ```

TsConditionalType (Type)

Represents a conditional type `T extends U ? X : Y`. Reflects: `ConditionalType`. Example (TS): ```ts type IfNumber = T extends number ? 'num' : 'other' ```

TsConstructor (Module)

TsConstructor (Module)

TsConstructor (Type)

Represents a class constructor declaration. Reflects: `ConstructorDeclaration`. Example (TS): ```ts class C { constructor(readonly x: number) {} } ```

TsConstructor (Type)

Represents a class constructor declaration. Reflects: `ConstructorDeclaration`. Example (TS): ```ts class C { constructor(readonly x: number) {} } ```

TsConstructSignature (Module)

TsConstructSignature (Module)

TsEnumCase (Module)

TsEnumCase (Module)

TsEnumType (Module)

TsEnumType (Module)

TsExportDeclaration (Module)

TsExportDeclaration (Module)

TsExportDeclaration (Type)

TsExportDeclaration (Type)

TsFunction (Module)

TsFunction (Module)

TsFunction (Type)

Represents a top-level (or exported) function declaration with its type and generics. Reflects: `FunctionDeclaration` and its `Signature`. Example (TS): ```ts export function sum(a: T, b: T): T { return (a + b) as T } ```

TsFunction (Type)

Represents a top-level (or exported) function declaration with its type and generics. Reflects: `FunctionDeclaration` and its `Signature`. Example (TS): ```ts export function sum(a: T, b: T): T { return (a + b) as T } ```

TsGetAccessor (Module)

TsGetAccessor (Module)

TsGetAccessor (Type)

Represents a `get` accessor. Reflects: `GetAccessorDeclaration`. Example (TS): ```ts class C { get value(): number { return 0 } } ```

TsGetAccessor (Type)

Represents a `get` accessor. Reflects: `GetAccessorDeclaration`. Example (TS): ```ts class C { get value(): number { return 0 } } ```

TsIndex (Module)

TsIndex (Module)

TsIndex (Type)

Represents the index type (key type) of an object for mapped/indexed operations. Reflects: `IndexType` used by the checker for `keyof` and index queries.

TsIndex (Type)

Represents the index type (key type) of an object for mapped/indexed operations. Reflects: `IndexType` used by the checker for `keyof` and index queries.

TsIndexAccessType (Module)

TsIndexAccessType (Module)

TsIndexAccessType (Type)

Represents an indexed access type, where a property type is selected by an index type. Reflects: `IndexedAccessType`. Example (TS): ```ts type Foo = T[K] ```

TsIndexAccessType (Type)

Represents an indexed access type, where a property type is selected by an index type. Reflects: `IndexedAccessType`. Example (TS): ```ts type Foo = T[K] ```

TsIndexSignature (Module)

TsIndexSignature (Module)

TsIndexSignature (Type)

Represents an index signature (property access by key type) on an object type. Reflects: `IndexSignatureDeclaration` like `[key: string]: number` and readonly variants. Example (TS): ```ts interface MapLike { readonly [k: string]: number } ```

TsIndexSignature (Type)

Represents an index signature (property access by key type) on an object type. Reflects: `IndexSignatureDeclaration` like `[key: string]: number` and readonly variants. Example (TS): ```ts interface MapLike { readonly [k: string]: number } ```

TsInterface (Module)

TsInterface (Module)

TsInterface (Type)

Represents a TypeScript `interface` type with its members and generics. Reflects: `InterfaceDeclaration` and its computed `InterfaceType`. Example (TS): ```ts export interface IterableLike extends Iterable { length: number } ```

TsInterface (Type)

Represents a TypeScript `interface` type with its members and generics. Reflects: `InterfaceDeclaration` and its computed `InterfaceType`. Example (TS): ```ts export interface IterableLike extends Iterable { length: number } ```

TsInterfaceHeritage (Module)

TsInterfaceHeritage (Module)

TsInterfaceHeritage (Type)

Represents `extends` relationships for interfaces. Reflects: `HeritageClause` with `extends` entries on interfaces.

TsInterfaceHeritage (Type)

Represents `extends` relationships for interfaces. Reflects: `HeritageClause` with `extends` entries on interfaces.

TsLiteral (Module)

TsLiteral (Module)

TsMember (Module)

TsMember (Module)

TsMember (Type)

TsMember (Type)

TsMethod (Module)

TsMethod (Module)

TsModule (Module)

TsModule (Module)

TsModule (Type)

Represents a namespace or module declaration and the collected types within it. Reflects: ModuleDeclaration, ModuleBlock, and NamespaceExportDeclaration.

TsModule (Type)

Represents a namespace or module declaration and the collected types within it. Reflects: ModuleDeclaration, ModuleBlock, and NamespaceExportDeclaration.

TsOverloadableConstruct (Module)

TsOverloadableConstruct (Module)

TsParameter (Module)

TsParameter (Module)

TsProperty (Module)

TsProperty (Module)

TsProperty (Type)

Represents a property (class or interface) with additional modifiers. Reflects: `PropertyDeclaration` (class) and `PropertySignature` (interface), including `readonly`, `?` optional, `static`, and visibility modifiers. Example (TS): ```ts interface P { readonly name?: string } class C { private static count: number } ```

TsProperty (Type)

Represents a property (class or interface) with additional modifiers. Reflects: `PropertyDeclaration` (class) and `PropertySignature` (interface), including `readonly`, `?` optional, `static`, and visibility modifiers. Example (TS): ```ts interface P { readonly name?: string } class C { private static count: number } ```

TsSetAccessor (Module)

TsSetAccessor (Module)

TsSetAccessor (Type)

Represents a `set` accessor. Reflects: `SetAccessorDeclaration`. Example (TS): ```ts class C { set value(v: number) {} } ```

TsSetAccessor (Type)

Represents a `set` accessor. Reflects: `SetAccessorDeclaration`. Example (TS): ```ts class C { set value(v: number) {} } ```

TsSubstitutionType (Module)

TsSubstitutionType (Module)

TsSubstitutionType (Type)

Represents a substitution type: a type parameter substituted with a concrete type under its constraint context. Reflects: `SubstitutionType` in the TS type system.

TsSubstitutionType (Type)

Represents a substitution type: a type parameter substituted with a concrete type under its constraint context. Reflects: `SubstitutionType` in the TS type system.

TsTemplateLiteralType (Module)

TsTemplateLiteralType (Module)

TsTemplateLiteralType (Type)

Represents a template literal type with string segments and interpolated types. Reflects: `TemplateLiteralType` at the checker layer (TypeFlags.TemplateLiteral). Example (TS): `` `on${string}` `` where texts = ["on", ""] and types = [string]

TsTemplateLiteralType (Type)

Represents a template literal type with string segments and interpolated types. Reflects: `TemplateLiteralType` at the checker layer (TypeFlags.TemplateLiteral). Example (TS): `` `on${string}` `` where texts = ["on", ""] and types = [string]

TsTuple (Module)

TsTuple (Module)

TsTuple (Type)

Represents a tuple type and its structure. Reflects: `TupleType` and `TupleTypeNode` including readonly tuples. Example (TS): ```ts type T = readonly [x: number, y?: string, ...rest: boolean[]] ```

TsTuple (Type)

Represents a tuple type and its structure. Reflects: `TupleType` and `TupleTypeNode` including readonly tuples. Example (TS): ```ts type T = readonly [x: number, y?: string, ...rest: boolean[]] ```

TsTupleElement (Module)

TsTupleElement (Module)

TsTupleElement (Type)

TsTupleElement (Type)

TsTupleElementType (Module)

TsTupleElementType (Module)

TsTupleElementType (Type)

Represents a tuple element's type and modifiers. Reflects: tuple element nodes including optional `?` and rest `...` (variadic) labels.

TsTupleElementType (Type)

Represents a tuple element's type and modifiers. Reflects: tuple element nodes including optional `?` and rest `...` (variadic) labels.

TsType (Module)

TsType (Module)

TsType (Type)

TsType (Type)

TsTypeAlias (Module)

TsTypeAlias (Module)

TsTypeAlias (Type)

Represents a named alias for a type, possibly generic. Reflects: `TypeAliasDeclaration`. Example (TS): ```ts export type ReadonlyList = ReadonlyArray ```

TsTypeAlias (Type)

Represents a named alias for a type, possibly generic. Reflects: `TypeAliasDeclaration`. Example (TS): ```ts export type ReadonlyList = ReadonlyArray ```

TsTypeIntersection (Module)

TsTypeIntersection (Module)

TsTypeIntersection (Type)

Represents an intersection type. Reflects: `IntersectionType` and `IntersectionTypeNode`. Example (TS): `type B = { x: number } & { y: number }`

TsTypeIntersection (Type)

Represents an intersection type. Reflects: `IntersectionType` and `IntersectionTypeNode`. Example (TS): `type B = { x: number } & { y: number }`

TsTypeLiteral (Module)

TsTypeLiteral (Module)

TsTypeLiteral (Type)

Represents a type literal `{ ... }` with inline members. Reflects: `TypeLiteralNode` and the corresponding anonymous object type. Example (TS): ```ts type Point = { x: number; y: number; (x: number): string } ```

TsTypeLiteral (Type)

Represents a type literal `{ ... }` with inline members. Reflects: `TypeLiteralNode` and the corresponding anonymous object type. Example (TS): ```ts type Point = { x: number; y: number; (x: number): string } ```

TsTypeParameter (Module)

TsTypeParameter (Module)

TsTypePredicate (Module)

TsTypePredicate (Module)

TsTypePredicate (Type)

Represents a type predicate or assertion signature like `x is Foo` or `asserts x is Foo`. Reflects: `TypePredicateNode` and `TypePredicate`. Example (TS): ```ts function isNum(x: unknown): x is number { return typeof x === 'number' } function assertIsNum(x: unknown): asserts x is number { if (typeof x !== 'number') throw new Error() } ```

TsTypePredicate (Type)

Represents a type predicate or assertion signature like `x is Foo` or `asserts x is Foo`. Reflects: `TypePredicateNode` and `TypePredicate`. Example (TS): ```ts function isNum(x: unknown): x is number { return typeof x === 'number' } function assertIsNum(x: unknown): asserts x is number { if (typeof x !== 'number') throw new Error() } ```

TsTypeQuery (Module)

TsTypeQuery (Module)

TsTypeQuery (Type)

Represents a type query like `typeof Foo` or `typeof Foo.bar`. The type query is resolved to the type of the referenced entity.

TsTypeQuery (Type)

Represents a type query like `typeof Foo` or `typeof Foo.bar`. The type query is resolved to the type of the referenced entity.

TsTypeReference (Module)

TsTypeReference (Module)

TsTypeReference (Type)

A member inside classes/interfaces/type literals; each case mirrors the corresponding TypeScript declaration or signature node. Represents a reference to a named type with optional type arguments. Reflects: `TypeReference` (e.g., `Foo`), `ExpressionWithTypeArguments` in heritage clauses, and similar reference forms. `ResolvedType` may hold a concrete resolved key when available. Example (TS): ```ts interface Box { value: T } type IntBox = Box ```

TsTypeReference (Type)

A member inside classes/interfaces/type literals; each case mirrors the corresponding TypeScript declaration or signature node. Represents a reference to a named type with optional type arguments. Reflects: `TypeReference` (e.g., `Foo`), `ExpressionWithTypeArguments` in heritage clauses, and similar reference forms. `ResolvedType` may hold a concrete resolved key when available. Example (TS): ```ts interface Box { value: T } type IntBox = Box ```

TsTypeUnion (Module)

TsTypeUnion (Module)

TsTypeUnion (Type)

Represents a union type. Reflects: `UnionType` and `UnionTypeNode`. Example (TS): `type A = string | number`

TsTypeUnion (Type)

Represents a union type. Reflects: `UnionType` and `UnionTypeNode`. Example (TS): `type A = string | number`

TsVariable (Module)

TsVariable (Module)

TypeKey (Module)

TypeKey (Module)

TypeKey (Type)

A unique identifier for a type.

TypeKey (Type)

A unique identifier for a type.

TypeKindPrimitive (Module)

TypeKindPrimitive (Module)

TypeKindPrimitive (Type)

Discriminated union of all high-level TypeScript type shapes the reader can produce. Each case mirrors a concrete TS type or declaration form (see individual types above).

TypeKindPrimitive (Type)

Discriminated union of all high-level TypeScript type shapes the reader can produce. Each case mirrors a concrete TS type or declaration form (see individual types above).

Auxiliary

Type Description

InlinedTsTypeParameter (Type)

A tuple to be used by types which inline TsTypeParameters rather than referencing by TypeKey. The tuple is used to preserve information for the container type that inlines them.

InlinedTsTypeParameter (Type)

A tuple to be used by types which inline TsTypeParameters rather than referencing by TypeKey. The tuple is used to preserve information for the container type that inlines them.

IOverloadable (Type)

Indicates a type can be a member of a TsOverloadableConstruct collection.

IOverloadable (Type)

Indicates a type can be a member of a TsOverloadableConstruct collection.

TsComment (Type)

DU of TS comment tag types.

TsComment (Type)

DU of TS comment tag types.

Container

Type Description

TsOverloadableConstruct<'T> (Type)

Represents a non-empty collection of overloads of a type.

TsOverloadableConstruct<'T> (Type)

Represents a non-empty collection of overloads of a type.

Declaration Representation

Type Description

TsCallSignature (Type)

Represents a call signature in a type literal or interface.

Reflects: `CallSignatureDeclaration`.

interface FnLike { (x: number, y: number): number }

TsCallSignature (Type)

Represents a call signature in a type literal or interface.

Reflects: `CallSignatureDeclaration`.

interface FnLike { (x: number, y: number): number }

TsConstructSignature (Type)

Represents a construct signature (the type of `new` for a value).

Reflects: `ConstructSignatureDeclaration`.

interface CtorLike { new (x: number): Date }

TsConstructSignature (Type)

Represents a construct signature (the type of `new` for a value).

Reflects: `ConstructSignatureDeclaration`.

interface CtorLike { new (x: number): Date }

TsMethod (Type)

Represents a method-like member (class or interface) or signature-like method.

Reflects: `MethodDeclaration` (class), `MethodSignature` (interface), and function-like members including optional `?` and `static` modifiers.

interface I { foo(x: number): string } class C { static bar(): void {} }

TsMethod (Type)

Represents a method-like member (class or interface) or signature-like method.

Reflects: `MethodDeclaration` (class), `MethodSignature` (interface), and function-like members including optional `?` and `static` modifiers.

interface I { foo(x: number): string } class C { static bar(): void {} }

TsParameter (Type)

Represents a function/method parameter.

Reflects: `ParameterDeclaration` (including optional `?` and rest `...` syntax).

TsParameter (Type)

Represents a function/method parameter.

Reflects: `ParameterDeclaration` (including optional `?` and rest `...` syntax).

TsVariable (Type)

Represents a top-level or module-scoped var/let/const in TypeScript along with its resolved type.

Reflects: VariableDeclaration and its Type.

TsVariable (Type)

Represents a top-level or module-scoped var/let/const in TypeScript along with its resolved type.

Reflects: VariableDeclaration and its Type.

Type Representation

Type Description

TsEnumCase (Type)

Represents a single enum case in TypeScript.

Reflects:
EnumMember in the TS AST and literal enum values in the TS type system.

TsEnumCase (Type)

Represents a single enum case in TypeScript.

Reflects:
EnumMember in the TS AST and literal enum values in the TS type system.

TsEnumType (Type)

Represents a TypeScript `enum` type.

Reflects: `EnumDeclaration` and the resulting enum type.

TsEnumType (Type)

Represents a TypeScript `enum` type.

Reflects: `EnumDeclaration` and the resulting enum type.

TsLiteral (Type)

DU of TS literal types.

TsLiteral (Type)

DU of TS literal types.

TsTypeParameter (Type)

Represents a generic type parameter with optional constraint and default.

Reflects: `TypeParameterDeclaration` and `TypeParameter` (constraint `extends`, default value).

type Box<T extends object = {}> = { value: T }

TsTypeParameter (Type)

Represents a generic type parameter with optional constraint and default.

Reflects: `TypeParameterDeclaration` and `TypeParameter` (constraint `extends`, default value).

type Box<T extends object = {}> = { value: T }

Type something to start searching.