housecor - 1596861970170671104

housecor Cory House (@housecorarrow-up-right) - 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/NEjVi4b2HFarrow-up-right

Tweet linkarrow-up-right

Thread by @housecor on Threadify Reader Apparrow-up-right

Last updated