TypeScript strictly typed

RMAG news

The problem

Over the last decade, as a JavaScript expert, I helped companies of all kinds and sizes. Over time, I detected a series of some recurring major problems in nearly all projects.

One of them is a lack of typing, resulting in a lack of reliability and an exponential decline in productivity.

Yet, all these projects were coded in TypeScript. Should not it guarantee typing like in Java, C# or Rust?

Short answer: no, because by default TypeScript:

only partially enforces typing
does not handle nullability
retains some JavaScript’s dynamic typing

These problems can be solve with adequate configuration and the resulting good practices. But for that, even strict mode, if one knows about it, is not enough.

This posts series claims to be a reference about a strong, static and complete typing in TypeScript, and I will try to keep it up to date.

Target audience

This posts series is intended for developers who already know TypeScript and who:

do not know about TypeScript strict mode
do know about strict mode but think it is enough to guarantee sufficient typing
know languages like Java, C# or Rust and want a similar typing level in TypeScript,

want to increase reliability of their code and reduce the risk of bugs
want to increase productivity

This posts series is not intended for people who:

do not like TypeScript and already have a definitive opinion about it

Comments guidelines

I do not pretend to know everything. I will be happy to correct, clarify and discuss additional, alternative or better practices.

In all cases, remember that this posts series is written by a human being, doing this unpaid. Rude behavior and/or unconstructive criticism will not be tolerated.

Contact

If you want a direct discussion with me:

preferably LinkedIn (if you cannot send me a message directly, add a note to your contact request, otherwise I may not accept)
direct message on X (Twitter)

Ongoing series

Not all posts are published yet, you can follow my account (button on top right of this page) to be notified when next parts are published.

French version

A French version is available on LinkedIn.

Next part

Before going into the topic’s technical core, we will start this posts series with an introduction about why solving the 3 problems mentioned above is important for reliability and productivity.