housecor - 1596861970170671104

housecor Cory House (@housecor) - November 27, 2022 at 9:42 PM

TypeScript tip: Many optional properties are a code smell.

Why? Because it reduces type safety.

Example, I joined a project where every REST API call accepts this same argument. This creates confusion, and hurts type safety.

Solution? Specify exactly what each call needs. pic.twitter.com/NEjVi4b2HF

Tweet link

Thread by @housecor on Threadify Reader App

Last updated