Skip to main content

Stylistic choices

No classesโ€‹

No reduceโ€‹

No enumsโ€‹

No overloadsโ€‹

  • generics supersedes them. overloads are a legacy feature that was made available in Typescript before generics were a thing. Overloads are mostly a C#/Angular leftover. Simply put: there are no problems that function overloads solve better than generics.
  • overloads clutter the code and make it more verbose and harder to read, which increase the cognitive overload.
  • overloads clutter the VScode tooltips.
  • overloads force you to write non-standard javascript syntax.
  • overloads are a bad practice. The flexibility that they enable also enable your team to write inconsistent code. Which is exactly the problem that ESLint is designed to solve.