TS1110Syntax Error
Since TS 1.0

Fix TS1110: Type Expected

Learn why TypeScript throws TS1110 when a type is missing after a colon, a union bar or an arrow, and how to fix it in your code and in @types.

error TS1110: Type expected

What This Error Means

TS1110 means the TypeScript parser was standing in a spot where only a type can appear — right after a : annotation, after extends, after a | or &, after the => of a function type, inside a type argument list — and the token it found there cannot start a type. A ;, a }, a ), the end of the file, or syntax from a newer TypeScript release all land in that category.

This happens during parsing, before any type checking. No compiler flag changes it: strict, target, module and skipLibCheck are all irrelevant, and skipLibCheck in particular does not help when the error comes from a .d.ts, because declaration files still have to be parsed before they can be skipped. What does change the outcome is the compiler version — a large share of real-world TS1110 reports are perfectly valid modern type syntax being read by an old parser.

// The general shape of the error:
let retryCount: ;
//              ~ Error: Type expected.

TS1110 is the type-position twin of TS1109 (Expression expected), which fires in the same situation on the value side. It is usually accurate: the fix belongs at or just before the reported column. Like every parse error it tends to arrive with company — ';' expected (TS1005) and Identifier expected (TS1003) often follow — so fix the first TS1110 and re-run before you read the rest of the list.

Common Causes

1. An Annotation That Was Never Finished

The most common source is an edit that stopped halfway: you typed the colon, got interrupted, and the type never arrived. The parser reaches the ; or the closing brace and has nothing to build a type from.

// ❌ Broken
let retryCount: ;
//              ~ Error: Type expected.
// ✅ Fixed — give the annotation a type (and an initial value)
let retryCount: number = 0

The same thing happens on interface members, and there the caret can be misleading: the parser keeps looking past the end of the line, so the error is reported on the closing brace, one or more lines below the member that is actually incomplete.

// ❌ Broken
interface OrderSummary {
  total: number
  currency:
}
// ~ Error: Type expected.  (reported on the `}`, caused by `currency:`)
// ✅ Fixed — complete the member above the reported line
interface OrderSummary {
  total: number
  currency: string
}

When the reported position looks innocent, read upwards until you find the last colon that has nothing after it.

2. A Dangling | or & in a Union or Intersection

A leading bar is legal in TypeScript (type Mode = | "light" | "dark" parses fine), but a trailing one is not: every | and & must be followed by another type. Deleting the last member of a union and forgetting the separator is the classic way to produce this.

// ❌ Broken
type Mode = "light" | "dark" |
//                            ~ Error: Type expected.
// ✅ Fixed — drop the trailing separator
type Mode = "light" | "dark"

Intersections behave identically:

// ❌ Broken
type ApiResult = { data: string } &
//                                 ~ Error: Type expected.
// ✅ Fixed — supply the second half of the intersection
type ApiResult = { data: string } & { requestId: string }

Watch out for the multi-line variant. If the next line of the file is another declaration, the parser will try to read that as the missing type, and you get a confusing ';' expected on a line you never touched, with the TS1110 further down. The dangling separator is still the real cause.

3. A Function Type With No Return Type

In a function type, everything after => is a type, not a body. Leave it empty and the parser is left in a type position with nothing to read. The mirror-image mistake is annotating the return type of a real arrow function and never saying what it returns.

// ❌ Broken
const onChange: (value: string) => ;
//                                 ~ Error: Type expected.
// ✅ Fixed — a function type needs a return type, and the value needs an implementation
const onChange: (value: string) => void = (value) => {
  console.log(value)
}
// ❌ Broken — the return type annotation is empty
const parseAmount = (raw: string): => Number(raw)
//                                 ~ Error: Type expected.
// ✅ Fixed — name the return type, or delete the annotation and let it be inferred
const parseAmount = (raw: string): number => Number(raw)

If you meant "returns nothing", the type is void — an empty annotation is never shorthand for it.

4. A Dependency Written for a Newer TypeScript Than Yours

This is the case that sends people searching, because the file in the error message is one you never wrote. Type syntax keeps arriving in new releases — variadic tuple types in 4.0, template literal types in 4.1, variance annotations and infer X extends in 4.7, const type parameters in 5.0 — and a .d.ts that uses them is a parse error on every older compiler.

// ❌ Broken — node_modules/@types/analytics-sdk/index.d.ts, on TypeScript below 4.1
export type EventName<Prefix extends string> = `${Prefix}:changed`
//                                             ~ Error: Type expected.

The same file parses cleanly on TypeScript 4.1 and later. Nothing is wrong with the package, so do not patch it:

# ✅ Fixed — bring the compiler up to the syntax the types use
npm install --save-dev typescript@latest
npm ls typescript            # one version, not three
npx tsc -v                   # and confirm which one actually runs

If upgrading is out of your hands — a framework CLI that pins TypeScript, an SPFx or legacy Angular toolchain — pin the dependency instead: install an older major of the @types/... package, or an older major of the library that still ships compatible declarations. Adding skipLibCheck: true is the reflex here and it will not work, because the declaration file is still parsed before checks are skipped.

How to Fix It

  1. Go to the reported position and finish the type. The caret sits on the token that cannot start a type, so the missing type belongs immediately before it — after the :, the |, the &, the extends or the =>. Fix the first TS1110 in the file, save, and re-run; trailing TS1005 and TS1003 reports usually disappear with it.

  2. Read upwards when the caret points at a brace. For object type literals and interfaces the parser does not stop at the end of a line, so the error is often reported on the } while the unfinished member is above it. Scan back for a colon or separator with nothing after it.

  3. Check the file path before you change any code. If the error is inside node_modules, the problem is a version mismatch, not your source. Run npx tsc -v, compare it with your editor's compiler (VS Code: TypeScript: Select TypeScript Version → Use Workspace Version) and with whatever ts-jest, ts-node or your CI image resolves — a build that fails in only one of those places is being read by a different parser.

  4. Upgrade TypeScript, or pin the types — do not edit node_modules and do not reach for skipLibCheck. Hand-editing a declaration file is undone by the next install, and skipLibCheck skips checking, not parsing, so it has no effect on TS1110. Likewise, never rewrite modern type syntax into something an old compiler accepts; upgrade the compiler instead.

  5. In a .tsx file, write <T,> for a generic arrow function. A bare <T> is read as a JSX tag there. The trailing comma tells the parser it is a type parameter list; a function declaration sidesteps the ambiguity entirely.

  6. Keep one TypeScript version across the project. A single typescript entry in devDependencies, the workspace version selected in your editor, and the same version in CI removes the whole "only fails on the build server" category of TS1110 — and it is the fix that stops it coming back after the next dependency upgrade.

FAQ

What causes TypeScript error TS1110?

TS1110 is emitted by the parser, long before type checking starts. TypeScript's grammar has positions where only a type is legal — after a : annotation, after extends in a generic constraint, after | or &, after the => of a function type, inside <...> type arguments. When the next token cannot begin a type, you get "Type expected".

In your own code the trigger is almost always an unfinished edit: a colon with nothing after it, a trailing union bar, an empty return type. In a dependency it means something else entirely — the file uses type syntax newer than the compiler reading it.

How do I fix TS1110 Type expected inside node_modules/@types?

Treat it as a version mismatch, not a bug in the package. The declaration file uses syntax from a newer TypeScript than the one compiling your project, so the parser fails on code that is perfectly valid elsewhere.

npm install --save-dev typescript@latest
npm ls typescript    # make sure the CLI, the editor and ts-jest agree

If the toolchain pins TypeScript for you, pin the other side instead: install a @types/... version from before the syntax landed. Do not patch files in node_modules — the change is lost on the next install — and do not expect skipLibCheck to rescue you, because declaration files are parsed before any check is skipped.

How do I write a generic arrow function in a .tsx file?

Add a trailing comma to the type parameter list, or use a function declaration:

const identity = <T,>(value: T): T => value
 
function identityFn<T>(value: T): T {
  return value
}

In a .ts file <T>(value: T) => value is unambiguous, but in .tsx the <T> is read as the start of a JSX element, which derails the parser. Current TypeScript reports that as TS17008 and TS1382 rather than TS1110 — the case is nonetheless widely filed under TS1110, because various older toolchains and write-ups label it that way. Either form above compiles cleanly, and extends unknown (<T extends unknown>) is a third spelling you will see in older codebases.

Related Errors

Practice This

Browse all TypeScript practice challenges to keep sharpening your type-level skills.

Related Concepts

Share this reference

Become a TypeScript Pro

Track your progress through 200+ hands-on challenges. Free, sign in with GitHub.

Or start solving right away: explore all TypeScript challenges