Reviewing Your Own Work

Read it as somebody suspicious of TypeScript. Where did I fight the compiler and win by silencing it? Every as, every any, every ! is a place where you told it to stop helping, and each one needs a reason better than 'it was quicker'.

Four questions worth asking.

Is there a type that describes what I wish the data were, rather than what it is?

Is there an assertion holding up something that should be a guard?

Is there a union that should be discriminated, so an impossible state is currently constructible?

Is there a type written by hand that could be derived from another?

That first one is the most common and the least noticed: a Book type with year: number when the archive genuinely sometimes omits it is a lie that will hold until the day it does.

Why this belongs in your portfolio. Not because it uses TypeScript, which is unremarkable. Because the README says what converting it found.

That paragraph shows judgment about a tool rather than enthusiasm for it, and it reads completely differently from a project that simply has types in it.

Mark this lesson complete

Signed in, your progress follows you to every device.

Next: Practice Test →
← Back