- Error
- Reported by the lexer and parser
TS1124
Digit expected.
A number literal ends where a digit is required, for example after the `e` of an exponent. Add the digits.
What it means
Some parts of a number literal must be followed by at least one digit: the exponent marker e (or E, with an optional sign) is the usual case.
Example
const n = 1e;
export {};
ts-r-check -p tsconfig.json --pretty false ts-r outputindex.ts(1,13): error TS1124: Digit expected.
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
- Add the exponent digits:
1e3. - If
ewasn't meant to be part of the number, separate it:1 * e.