Skip to content

Supported language subset

ChadScript compiles a subset of TypeScript to native code. It does not claim general TypeScript compatibility. This page is the support contract: what the compiler is expected to accept, what it is expected to reject with a diagnostic, and what is currently unclassified.

The contract is derived mechanically from the dual-host baseline (the node-hosted and native-hosted compilers must agree). The machine-readable form lives in tests/support-matrix.json.

Categories

  • supported — both hosts compile the fixture and it runs to its expected outcome.
  • rejected-with-diagnostic — both hosts reject the program with a clean compile-error diagnostic (no crash, no arbitrary exit — see the negative-fixture contract).
  • unknown — everything else: the two hosts disagree, the program fails unexpectedly, or compilation ends in an anomaly. An unknown is never promoted to supported just because one host happens to pass; these are the gaps to close.

Regenerating

bash
npm run baseline          # record the dual-host baseline
npm run support-matrix    # regenerate the matrix + the block below

Generated from the dual-host baseline over 690 fixtures.

StatusCount
supported645
rejected-with-diagnostic45
unknown0

By category

Categorysupportedrejectedunknown
argparse300
arithmetic2000
arrays7800
async100
bitwise200
builtins12120
classes6020
closures740
closures-cabi700
collections400
comparisons500
control-flow2900
crypto300
data-structures2010
destructuring400
edge-cases7180
error-handling1000
errors0140
functions900
generics900
globals600
imports-exports300
interfaces2500
jsx600
logical300
maps300
math900
net200
network1200
objects1200
optimization100
optional-chaining100
regex500
semantic380
stdlib600
strings6210
structs100
test-runner400
typed-arrays300
types1050
typescript200
variables200
websocket100

Unknown (0) — the honest gaps

None.