TS1005

error TS1005: ‘=’ expected.

Broken Code ❌

1
2
3
4
type Person {
age: number;
name: string;
}

Fixed Code ✔️

You need to assign your type declaration using the = character:

1
2
3
4
type Person = {
age: number;
name: string;
}

Alternatively you can declare an interface:

1
2
3
4
interface Person {
age: number;
name: string;
}