- Error
- Reported by the lexer and parser
TS6189
Multiple consecutive numeric separators are not permitted.
A number has two underscores in a row, like `1__000`. Use a single `_` between digit groups.
What it means
Numeric separators must be single underscores between digits. Two or more in a row are a syntax error, reported by ts-r's lexer.
Example
export const big = 1__000;
ts-r-check -p tsconfig.json --pretty false ts-r outputindex.ts(1,22): error TS6189: Multiple consecutive numeric separators are not permitted.
Recorded by node scripts/verify-examples.mjs with ts-r built from commit 6deaf01. The example uses the default tsconfig: strict, target: es2022, module: esnext, moduleResolution: bundler.
How to fix
- Use one underscore:
1_000.