DEV Community

2

Ask DEV - What are your less well known tips for cleaner, better JavaScript/TypeScript?

We've all seen object destructuring, using prettier and eslint, but what else should we look into? What are your less well known tips for cleaner, better JavaScript/TypeScript?

Top comments (1)

Collapse
 
stoyanystoyanov profile image
Stoyan β€’

In Typescript, force yourself to never use "any", I was amazed how much I was using it, and with the change I have to create interfaces/classes/enums, and all of this makes the code more readable and well structured.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay