# TypeScript: error TS1005: ';' expected.

**Code:** `TS1005: ';' expected / ',' expected (syntax error)` · **Category:** TypeScript · **Seen on:** TypeScript

The parser hit a syntax error — missing punctuation, mismatched brackets, or an unsupported syntax for your TypeScript version.

## Meaning

Look at the reported line and the line before it: missing comma/semicolon/brace, unclosed template string or JSX tag, `=>` in the wrong spot, or newer syntax (`satisfies`, `accessor`, decorators) on an older TypeScript. Update TypeScript (`npx tsc -v`) and your editor's TS version.

## Common causes

- Missing/extra bracket, comma or semicolon
- Unclosed string/template/JSX
- Newer syntax with an old compiler (`satisfies`, `enum const`)
- Pasted smart quotes
- Wrong file type (JSX in .ts)

## Quick fix

1. Fix the syntax at/above the line
2. Upgrade TypeScript (`npm i -D typescript@latest`)
3. Use `.tsx` for JSX; replace smart quotes

## Detailed fix by platform

### Linux

1. `npx tsc -v && npx tsc --noEmit | head`

## How to diagnose

1. **Line** — Previous line OK?
2. **TS version** — Supports syntax?
3. **File** — .tsx for JSX?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/typescript/ts1005-expected-syntax-error)
