Leveraging “unknown” instead of “any”
One habit I’ve picked up over the years is using unknown as a default before any. I still use any occasionally, but I’ve become much more intentional about it. The reason is pretty simple: any opts you out of TypeScript’s type checking. That can be convenient when you’re prototyping or...