Romain Deneau
Aug 25, 2017 · 1 min read

TypeScript allows us to avoid optional parameter (`a?: …`) and default parameter value (`a = …`), both code smells. As you said in another article, in JavaScript default parameter value helps the “IntelliSense” in an editor like VSCode. But with TypeScript, we can have a better code design without, for instance by splitting a function initially with optional parameter into several functions with distinct and more explicit names and calling each other to keep it in a DRY way.

)
    Romain Deneau

    Written by

    C#/TypeScript full-stack developer | Software craftsman | UX / Web Design | Working @ maf.fr / soat.fr • Paris, France