# TypeScript: error TS2551: Property 'lenght' does not exist on type 'string'. Did you mean 'length'?

**Code:** `TS2551: Property does not exist. Did you mean` · **Category:** TypeScript · **Seen on:** TypeScript

A property name is misspelled (TypeScript suggests the closest valid one).

## Meaning

Fix the typo, or if the property truly exists at runtime, declare it in the type/interface or augment the library types. For dynamic keys use `Record<string, T>` or index signatures.

## Common causes

- Typo in a property/method name
- Property from a different type/version of a library
- Missing interface property
- Using `.length` on number etc.
- JS object extended at runtime

## Quick fix

1. Use the suggested name
2. Add the property to the interface/type
3. Use an index signature for dynamic keys

## Detailed fix by platform

### TypeScript

1. `interface User { name: string; email?: string }`

## How to diagnose

1. **Name** — Typo?
2. **Type** — Declares it?
3. **Dynamic** — Index signature?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/typescript/ts2551-property-does-not-exist-did-you-mean)
