Skip to main content

Typescript Good Practices

· One min read
Luiz Rosalba

We always need to handle types, on todays additions while watching Mistakes to Avoid we wrote six good tips for improving your TS code.

1) Use unknown instead any

2) Use Type Guard

3) Use is operator

4) Use satisfies operator (added on TS 4.9)

5) Use enums correctly

6) Use Utility Types

Check it out