Logo Xantham

XanthamTree Type

In-memory representation of a decoded Xantham JSON file, optimised for generator access. Holds frozen lookups for types, exports, top-level declarations, and provides lazy access to the resolved object graph (ArenaInterner) and a dependency graph.

Constructors

Constructor Description

XanthamTree(fileName)

Full Usage: XanthamTree(fileName)

Parameters:
    fileName : string

Returns: XanthamTree

Default constructor for a XanthamTree.

fileName : string
Returns: XanthamTree

XanthamTree(settings)

Full Usage: XanthamTree(settings)

Parameters:
Returns: XanthamTree
settings : Settings
Returns: XanthamTree

Instance members

Instance member Description

this.Codify

Full Usage: this.Codify

Parameters:
    key : TypeKey - The TypeKey to classify.

Returns: CodeKey

Tag a TypeKey with the kind of construct it identifies, returning a CodeKey for ergonomic dispatch on type-vs-export kinds without re-walking the underlying TsType/TsExportDeclaration.

key : TypeKey

The TypeKey to classify.

Returns: CodeKey

this.ExportMap

Full Usage: this.ExportMap

Returns: FrozenDictionary<string, TsExportDeclaration array>

Frozen lookup from source module path to the array of exports declared in that module.

Returns: FrozenDictionary<string, TsExportDeclaration array>

this.GetArenaInterner

Full Usage: this.GetArenaInterner

Returns: ArenaInterner

Lazily resolve the underlying decoded result into an ArenaInterner object graph. The first call materialises the interner; subsequent calls return the cached value.

Returns: ArenaInterner

this.GetDependencyGraph

Full Usage: this.GetDependencyGraph

Returns: Graph

Build a dependency graph over the decoded type/export maps. Conditional Check/Extends branches are excluded from the edges.

Returns: Graph

this.IsLibEsExport

Full Usage: this.IsLibEsExport

Returns: TypeKey -> bool

Predicate: is the given TypeKey a TypeScript lib.es* export?

Returns: TypeKey -> bool

this.KeyExportMap

Full Usage: this.KeyExportMap

Returns: FrozenDictionary<TypeKey, TsExportDeclaration>

Frozen lookup of all exported declarations, keyed by their TypeKey.

Returns: FrozenDictionary<TypeKey, TsExportDeclaration>

this.LibEsExports

Full Usage: this.LibEsExports

Returns: FrozenSet<TypeKey>

Set of TypeKeys belonging to the TypeScript lib.es* standard library.

Returns: FrozenSet<TypeKey>

Frozen lookup from a function signature key to the (possibly overloaded) function export it belongs to.

Returns: FrozenDictionary<TypeKey, TsOverloadableConstruct<TsFunction>>

this.TypeMap

Full Usage: this.TypeMap

Returns: FrozenDictionary<TypeKey, TsType>

Frozen lookup of all decoded structural types, keyed by TypeKey.

Returns: FrozenDictionary<TypeKey, TsType>

Type something to start searching.