Skip to main content

Crate sim_codec_typescript

Crate sim_codec_typescript 

Source
Expand description

Bounded, lossless TypeScript 7 and TSX syntax layered on JavaScript.

ECMAScript productions remain sim_codec_javascript::Node values. This crate adds only TypeScript/TSX notation and deliberately has no checker, compiler, lowering pipeline, module resolver, or runtime model.

Structs§

AnnotationReference
A retained reference to erased annotation syntax.
Diagnostic
Deterministic located frontend failure.
EvaluationGap
A located reason why syntax cannot be erased without a compiler decision.
Limits
Resource limits for the extension scan.
LoweredTypeScript
An admitted JavaScript graph plus lossless TypeScript provenance.
SyntaxTree
Complete lossless composed syntax tree.

Enums§

DiagnosticCode
Stable diagnostic category.
Language
TypeScript or TSX input mode.
SyntaxKind
TypeScript-only concrete syntax category.
SyntaxNode
A syntax node in the composed tree.

Constants§

TYPESCRIPT_AUTHORITY
Immutable upstream syntax authority for the frozen release.
TYPESCRIPT_CODEC_ID
Stable local id used before a host assigns codec/typescript an id.
TYPESCRIPT_FROZEN_ON
Date on which the syntax identity was frozen.
TYPESCRIPT_TEST_IDENTITY
Frozen syntax/test identity.
TYPESCRIPT_VERSION
Frozen language release.

Functions§

decode_typescript
Decode admitted TypeScript to its direct JavaScript graph.
decode_typescript_located
Decode admitted TypeScript with a root source location.
decode_typescript_tree
Decode admitted TypeScript into a recursively located JavaScript tree.
encode_typescript
Canonically encode JavaScript forms as TypeScript-compatible source, with tagged fallback.
lower_typescript
Apply the literal “requires no compiler decision” predicate and lower directly.
parse_module
Parse a TypeScript module.
parse_module_with_limits
Parse a TypeScript module with explicit bounds.
parse_tsx
Parse a TSX module.
parse_tsx_with_limits
Parse a TSX module with explicit bounds.