ZNTC assigns a unique code to every diagnostic. Click a code for details and a reproduction snippet.
| Code | Message |
|---|
ZNTC0001 | Top-level await is not available in the configured target environment |
ZNTC0002 | Top-level await requires ESM output format |
ZNTC0003 | Code splitting requires ESM output format |
ZNTC0004 | Entry path is empty or not found |
ZNTC0005 | preserveModules requires ESM output format |
| Code | Message |
|---|
ZNTC0100 | Could not resolve import |
ZNTC0101 | Export not found in module |
ZNTC0102 | Circular dependency detected |
ZNTC0103 | Module resolution failed |
ZNTC0104 | Re-export references the module itself (self-cycle) |
| Code | Message |
|---|
ZNTC0300 | ’import’ declaration is only allowed in module code |
ZNTC0301 | ’import’ declaration must be at the top level |
ZNTC0302 | ’import defer/source’ requires a binding |
ZNTC0303 | String literal in import specifier requires ‘as’ binding |
ZNTC0304 | Duplicate import attribute key |
ZNTC0305 | ’export’ declaration is only allowed in module code |
ZNTC0306 | ’export’ declaration must be at the top level |
ZNTC0307 | String literal cannot be used as local binding in export |
ZNTC0308 | Module source string expected |
ZNTC0309 | ’export’ is not allowed in statement position |
ZNTC0310 | ’import’ is not allowed in statement position |
ZNTC0311 | ’import’ cannot be used with ‘new’ |
ZNTC0312 | ’import.meta’ is only allowed in module code |
ZNTC0313 | Expected ‘import.meta’, ‘import.source’, or ‘import.defer’ |
ZNTC0314 | ’import.source’/‘import.defer’ requires arguments |
| Code | Message |
|---|
ZNTC0400 | Anonymous function declaration cannot be invoked |
ZNTC0401 | Function declaration is not allowed in statement position |
ZNTC0402 | Function declaration is not allowed in statement position in strict mode |
ZNTC0403 | Generator declaration is not allowed in statement position |
ZNTC0404 | Async function declaration is not allowed in statement position |
ZNTC0405 | Class declaration is not allowed in statement position |
ZNTC0406 | Class constructor cannot be a getter, setter, generator, or async |
ZNTC0407 | Class member cannot be named ‘#constructor’ |
ZNTC0408 | Class field cannot be named ‘constructor’ |
ZNTC0409 | Static class field cannot be named ‘prototype’ |
ZNTC0410 | Static class method cannot be named ‘prototype’ |
ZNTC0411 | Class expected after decorator |
ZNTC0412 | Class or export expected after decorator |
ZNTC0413 | Labelled function declaration is not allowed in loop body |
ZNTC0414 | Lexical declaration is not allowed in statement position |
| Code | Message |
|---|
ZNTC0500 | Identifier expected |
ZNTC0501 | Binding pattern expected |
ZNTC0502 | Escaped reserved word cannot be used as identifier |
ZNTC0503 | Escaped reserved word cannot be used as identifier in strict mode |
ZNTC0504 | Reserved word cannot be used as identifier |
ZNTC0505 | Reserved word in strict mode cannot be used as identifier |
ZNTC0506 | Keywords cannot contain escape characters |
ZNTC0507 | ’let’ is not allowed as variable name in lexical declaration |
ZNTC0508 | Const declarations must be initialized |
ZNTC0509 | ’async’ is not allowed as identifier in for-of left-hand side |
ZNTC0510 | ’let’ is not allowed as identifier in for-of left-hand side |
ZNTC0511 | Only a single variable declaration is allowed in a for-in/for-of statement |
ZNTC0512 | For-in/for-of loop variable declaration may not have an initializer |
ZNTC0513 | Rest element must be last element |
ZNTC0514 | Rest element may not have a trailing comma |
ZNTC0515 | Duplicate parameter name |
ZNTC0516 | Private name is not allowed in destructuring pattern |
ZNTC0517 | Invalid assignment target |
ZNTC0518 | Assignment to ‘eval’ or ‘arguments’ is not allowed in strict mode |
| Code | Message |
|---|
ZNTC0600 | Expression expected |
ZNTC0601 | Unary expression cannot be the left operand of ’**‘ |
ZNTC0602 | Cannot mix ’??’ with ’&&’ or ' |
ZNTC0603 | Private name is not valid outside of ‘in’ expression |
ZNTC0604 | Private name is not valid as right-hand side of ‘in’ expression |
ZNTC0605 | Private fields cannot be deleted |
ZNTC0606 | Private field access on super is not allowed |
ZNTC0620 | ’super’ is not allowed outside of a method |
ZNTC0621 | ’super()’ is only allowed in a class constructor |
ZNTC0622 | ’super’ cannot be used as the base of an optional chain |
ZNTC0607 | Tagged template cannot be used in optional chain |
ZNTC0608 | Property key expected |
ZNTC0609 | Expected ’:’ after property key |
ZNTC0610 | Invalid shorthand property initializer |
ZNTC0611 | Reserved word cannot be used as shorthand property |
ZNTC0612 | Reserved word in strict mode cannot be used as shorthand property |
ZNTC0613 | ’yield’ cannot be used as shorthand property in generator |
ZNTC0614 | ’await’ cannot be used as shorthand property in async/module |
ZNTC0615 | Private identifier is not allowed as object property key |
ZNTC0616 | ’arguments’ is not allowed in class field initializer |
ZNTC0617 | ’arguments’ is not allowed in class static initializer |
ZNTC0618 | String literal contains lone surrogate |
ZNTC0619 | ’new.target’ is not allowed outside of functions |
| Code | Message |
|---|
ZNTC0700 | ’return’ outside of function |
ZNTC0701 | ’break’ outside of loop or switch |
ZNTC0702 | ’continue’ outside of loop |
ZNTC0703 | Only one default clause is allowed in a switch statement |
ZNTC0704 | Case or default expected |
ZNTC0705 | Catch or finally expected |
ZNTC0706 | No line break is allowed after ‘throw’ |
ZNTC0707 | Escaped reserved word cannot be used as label |
ZNTC0708 | Escaped reserved word cannot be used as label in strict mode |
ZNTC0709 | Reserved word in strict mode cannot be used as label |
| Code | Message |
|---|
ZNTC0800 | ’with’ is not allowed in strict mode |
ZNTC0801 | Octal literals are not allowed in strict mode |
ZNTC0802 | Octal escape sequences are not allowed in strict mode |
ZNTC0803 | Deleting an identifier is not allowed in strict mode |
ZNTC0804 | ”use strict” not allowed in function with non-simple parameters |
| Code | Message |
|---|
ZNTC0900 | ’await’ cannot be used as identifier in this context |
ZNTC0901 | ’await’ expression is not allowed in formal parameters |
ZNTC0902 | ’await’ is not allowed in class static initializer |
ZNTC0903 | ’await’ is not allowed in non-async function in module code |
ZNTC0904 | ’await’ is not allowed in arrow function parameters |
ZNTC0905 | ’await’ is not allowed in async arrow function parameters |
ZNTC0906 | ’yield’ expression is not allowed in formal parameters |
ZNTC0907 | ’yield’ is not allowed in arrow function parameters |
ZNTC0908 | Invalid escape sequence in template literal |
ZNTC0909 | Expected template continuation |
ZNTC0910 | JSX tag name expected |
ZNTC0911 | Spread expected |
ZNTC0912 | Type expected |
ZNTC0913 | Expected ‘in’ in mapped type |
ZNTC0914 | Expected ‘type’ after ‘opaque’ |
ZNTC0915 | Modifiers cannot appear on index signature parameters |
ZNTC0916 | An index signature parameter cannot have a question mark |
ZNTC0917 | ’yield’ is not allowed outside generator function |
ZNTC0918 | TypeScript syntax is not allowed in JavaScript source |
| Code | Message |
|---|
ZNTC1000 | Identifier has already been declared |
ZNTC1001 | Cannot be used as a binding identifier in strict mode |
| Code | Message |
|---|
ZNTC1100 | Private field has already been declared |
ZNTC1101 | Private field must be declared in an enclosing class |
| Code | Message |
|---|
ZNTC1300 | A class may only have one constructor |
ZNTC1301 | Property name proto appears more than once in object literal |
ZNTC1302 | Getter must not have any formal parameters |
ZNTC1303 | Setter must have exactly one formal parameter |
ZNTC1400 | Type reference is not defined in the same file |
ZNTC1401 | Prop type is not supported by codegen |
ZNTC1402 | NativeProps body is not an object literal or known wrapper |
ZNTC1403 | Duplicate component name in schema |
ZNTC1404 | Inheritance / intersection chain exceeds depth limit |