Recent articles About

Compiling enterprise

Ivan Koshelev blog on software development

Articles for November 2021 Pragmatic uses of Typescript type system 04 Domain Modeling with Typescript [2021 November 22] Typescript, types, domain modeling, literal types, tagged union types, template literal types

This article gives an overlook of Typescript features that let us provide safety guarantees for our code unlike any other mainstream language. Typescript is a somewhat paradoxical language. It is a superset of Javascript and Javascript has one of the simplest, least strict typing systems among mainstream languages, where even distinction between int and float or char and string are deemed excessive. Javascript is also dynamically typed, a trait that may seem down-right harmful to developers coming from Java or C# background. And yet, Typescript, sitting on top of JS type system, allows us to model types far more strictly than any other mainstream language.

Article is quite big, owning to almost 4 years of complex Domain Modeling experience in Typescript that I'm attempting to sum-up and considerable amount of ways in which Typescript language features can be applied to Domain Modeling. First part of this article explains Typescript features that we will use and is most useful to developers coming from other languages. If you are up to speed with TS, you can jump to the second part, which covers their application.

continue reading
Ivan Koshelev photo

I'm passionate for anything that can be programed and automated to make life better for all of us.

Archives

  1. November 2021 (1)
  2. May 2021 (1)
  3. March 2020 (1)
  4. August 2019 (1)
  5. July 2019 (1)
  6. May 2019 (1)
  7. February 2019 (1)
  8. October 2017 (1)
  9. August 2017 (3)
  10. July 2017 (3)
  11. May 2017 (3)

Elsewhere

  1. GitHub@IKoshelev
  2. NuGet@IKoshelev
  3. LinkedIn