• Error
  • Reported by the lexer and parser

TS1109

Expression expected.

The parser expected an expression (a value) here, but found an operator, a closing bracket or the end of the statement.

What it means

An expression is required here: after a binary operator, after =, inside parentheses or in a return with a value. Usually the code is unfinished, or an operator is doubled.

Example

index.ts
const total = 1 + ;
export {};
ts-r-check -p tsconfig.json --pretty false ts-r output
index.ts(1,19): error TS1109: Expression 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

  • Complete the expression: const total = 1 + 2;.
  • Remove the extra operator or punctuation.