What TypeScript says:
```
Type '{ name: string; kind: "alias"; options: { name: string; kind: "field"; type: string; options: {}; }; }' is not assignable to type 'FieldSchema'.
Property 'type' is missing in type '{ name: string; kind: "alias"; options: { name: string; kind: "field"; type: string; options: {}; }; }' but required in type 'AliasField'.
```
What I would wish it to say:
```
On line 44 add: `type: null`
```
Like how on earth is it possible to make a language that has such bad bad bad error messages? And intentionally ignore user complaints for years?
To not be old-man-yells-at-cloud:
1) Make it readable. Why is it that the example code is smushed to one-liner? Who can read code like that? Just prettify it across multiple lines.
2) Make it copy&pasteable. The parses is _theoretcially_ telling me _what_ to put _where_, but it would be way more practical if it'd just give me the code it expects. Even if it's just with `...` on places where it can't decide for me.
3) I'm actually surprised that I'm saying that, but on the side of telling me in words "but required in type 'AliasField'", give me also the excerpt of the type it violates with the pointer to that place. If I'm required to write TS, then I should be also able to read it and not translate from your-error-message-words -> TS.
#TypeScript #ErrorMessages #DX #WebDevelopment #CanWeDeprecateTypeScriptYet