Logo Xantham

ArenaInterner Module

Functions and values

Function or value Description

prerenderFromGraph ctx interner

Full Usage: prerenderFromGraph ctx interner

Parameters:

Performs prerendering of all types in the graph - the series of operations are performed in topological order, and provides guarantees of passing in deep transient filled type graphs such as with solid-js. The costs may outweigh the benefits in this scenario. Performance costs are significant.

  • Type aliases from the export map in the ArenaInterner are used to seed the type reference map - TypeAliases are encapsulations of the contained type, so we must register the encapsulation before we encounter the types to ensure that we do not render the reference generated from the underlying type.
  • The graph evaluation is forced from the lazy function in the ArenaInterner.
  • The graph is traversed in topological order by first yielding the cyclical keys of a graph, before yielding keys in the order of the number dependencies they have such that a type with no dependencies is registered first.

ctx : GeneratorContext
interner : ArenaInterner

prerenderTypeAliases ctx arena

Full Usage: prerenderTypeAliases ctx arena

Parameters:

Type something to start searching.