TypeScript

Sources:

  • **

Context

Frontend TypeScript offers …

Motivation

It is said that types can help to prevent ~15% bugs. They are especially useful to specify what’s nullable, what’s not and the expected return types. Issues like #1596 could have been prevented by using Typescript.

  • Cleaner patterns

By providing interface and enum types out of the box, Typescript makes the code cleaner and easier to understand in places that use them.

  • Developer experience

IDEs like VSCode (through IntelliSense) are able to improve autocompletion and errors detection thanks to Typescript.

  • Smarter code refactoring

Type safety make the refactors safer.

Decision

Use TypeScript and tsx.

Alternatives

Consequences

Affected Projects

See Also


Appendix

Note created on 2024-04-12 and last modified on 2024-04-12.

LIST FROM [[TypeScript]] AND -"CHANGELOG" AND -"03-AREAS/Decisions/TypeScript"

(c) No Clocks, LLC | 2024