Skip to content
super
.js
Docs
Tour
Playground
Errors
Blog
Community
★ 2
GitHub
Language Specification
The formal grammar and type rules for SuperJS.
Content assembled in WS-A1.
Docs
Documentation
Documentation
Introduction
Language Reference
Examples
Type System
JavaScript & TypeScript Interop
Tooling
CLI Reference
Editor Setup
Changelog
Roadmap
Specification
FAQ
Roadmap
v1.0 RC Status
Operations
Playground Worker Deploy
Maintenance & On-Call
VS Code Marketplace
Launch
Launch drafts
Language Tour
Language Tour
01 — Hello world
02 — Variables and types
03 — Functions
04 — Control flow
05 — Null safety
06 — Pattern matching
07 — Sum types
08 — Object types
09 — Generics
10 — Classes
11 — Modules
12 — Async and await
13 — JSX
14 — Calling JS from SJS
15 — dynamic and Schema
16 — Errors and Result
17 — Iterators and for...of
18 — Serverless handlers
19 — Tooling tour
20 — Migrating a TS file
Press
README
sjs-vs-typescript-one-pager
Migration Guide
Migration Guide
Syntax Rewrites
Idiom Changes
Library Ecosystem
API Reference
API Reference
std-async
std-collections
std-core
std-fs
std-json
std-math
std-path
std-process
std-schema
std-string
std-time
Why SuperJS
Why SuperJS
Compatibility
Compatibility Matrix
Benchmarks
Performance Benchmarks
LSP Memory Audit
Error Codes
Error Codes
SJS-E001 — Null or undefined assigned to non-nullable type
SJS-E002 — Type mismatch
SJS-E003 — Property access on possibly-null value
SJS-E004 — `any` is not a valid type in SJS
SJS-E005 — Intersection type `A & B` is not allowed
SJS-E006 — Mapped type is not allowed in SJS
SJS-E007 — Non-exhaustive match expression
SJS-E008 — Conditional type is not allowed in SJS
SJS-E009 — `infer` keyword is not allowed in SJS
SJS-E010 — TypeScript `enum` is not allowed in SJS
SJS-E011 — Non-null assertion `!` is not allowed
SJS-E012 — `namespace` is not allowed in SJS
SJS-E013 — `with` statement not allowed (SJS is always strict mode)
SJS-E014 — Private or protected member not accessible from this scope
SJS-E015 — Cannot narrow an access modifier on an overriding method or property
SJS-E016 — Cannot instantiate an abstract class directly with `new`
SJS-E017 — Circular import detected — module graph contains a cycle
SJS-E018 — Top-level `await` used outside an ES module context
SJS-E019 — Unknown JSX element type — identifier not in scope or not a valid component
SJS-E020 — Ambiguous variant constructor
SJS-L001 — Prefer `const` — `let` binding is never reassigned
SJS-L002 — Prefer `let` or `const` over `var`
SJS-L003 — Use `===` / `!==` — `==` / `!=` performs type coercion
SJS-L004 — Prefer `for…of` over `for…in` for array and iterable iteration
SJS-L005 — `debugger` statement found in committed code
SJS-L006 — `match` expression has no arms
SJS-L007 — Redundant match arm
SJS-L008 — Prefer an arrow function callback
SJS-L009 — Unused import
SJS-L010 — Import out of order
SJS-L011 — BiDi control character rejected
SJS-L012 — Unused top-level declaration
SJS-L013 — Explicit `dynamic` type annotation
SJS-L014 — Variable shadowing
SJS-L015 — Floating promise
SJS-L016 — Unhandled `Result`
SJS-L017 — Prefer `Result` over `throw`
SJS-L018 — Mixed spaces and tabs in indentation
SJS-P001 — Unexpected token
SJS-P002 — Unexpected end of file
SJS-P003 — Invalid syntax in type annotation
SJS-P004 — Invalid sum type declaration
SJS-P005 — Invalid match expression
SJS-P099 — Too many parse errors; recovery abandoned
SJS-W001 — Implicit `dynamic` — unannotated position in `--strict` mode
SJS-W002 — `dynamic` value assigned to a typed position without a narrowing check
SJS-W003 — Unreachable `match` arm — earlier arm already covers this variant
SJS-W004 — Reserved or future SJS keyword used as an identifier
SJS-W005 — Explicit `public` modifier is redundant — class members are public by default
SJS-W006 — Excess property on a fresh object literal assigned to a typed position
SJS-W007 — Missing `key` prop on JSX element in a list or iterator context
SJS-W008 — Implicit switch fallthrough between non-empty case clauses
SJS-W009 — Unreachable code following a terminator statement
SJS-W010 — `catch` binding not typed as `Error` or `unknown` — untyped catch may hide bugs
SJS-W012 — BiDi control character in source file
Language Spec
Language Specification
Standard Library
Standard Library
Beta Program
Beta Program
Dynamic Usage Survey (C5)
Bug Bash