- Error
- Reported by the type checker
TS2740
Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more.
A value is missing many properties of the target type; a few are listed and the rest counted. Usually the wrong kind of value is used.
What it means
Like TS2739, but more than four properties are missing, so the message names a few and counts the rest. A long list usually means a different kind of value was passed entirely, such as an object where an array was expected.
Example
const list: string[] = {};
export {};
ts-r-check -p tsconfig.json --pretty false ts-r outputindex.ts(1,7): error TS2740: Type '{}' is missing the following properties from type 'string[]': length, pop, push, concat, and 29 more.
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
- Check that you're passing the kind of value the target expects (an array, a
Map, an element). - If the value really is a partial object, use
Partial<T>or a narrower type for the target.