TS1005
error TS1005: ‘=’ expected.
Broken Code ❌
1 |
|
Fixed Code ✔️
You need to assign your type declaration using the =
character:
1 |
|
Alternatively you can declare an interface:
1 |
|
error TS1005: ‘;’ expected.
Broken Code ❌
1 |
|
Fixed Code ✔️
When using an arrow function expression, you can implicitly return values by wrapping the object literal in parentheses:
1 |
|