Go ProSign in

Create Dynamic Types and use Type Composition to Extract Common Functionality

Since MST offers a runtime type system, it can create and compose types on the fly, making it possible to reuse logic in new and powerful ways.

In this lesson you will learn:

  • That MST types are immutable and composed together behind the scenes
  • How to compose types explicitly by using types.compose
  • How to create dynamic, parameterized types by leveraging that MST types are first class javascript citizens

You must be a Member to view code