Perhaps the most common mistake I see in TypeScript code reviews: Needless...


Perhaps the most common mistake I see in TypeScript code reviews:

Needless optional properties.

People seem to think "I'll make this optional just in case".

That's a mistake. Don't needlessly widen types.

Start narrow. Widen when you must.

View original on X