TypeScript non-goals

As we've discussed before, once your code has been transpiled, most of the type information is gone. As a matter of fact, the TypeScript team has documented the goals but also some non-goals for the TypeScript programming language. You can find those here: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals.

There are two explicit non-goals that are relevant to our discussion:

  1. Add or rely on runtime type information in programs, or emit different code based on the results of the type system. Instead, encourage programming patterns that do not require runtime metadata.
  2. Provide additional runtime functionality or libraries. Instead, use TypeScript to describe existing libraries.

This means that TypeScript will not include facilities to help us further at runtime! But don't despair just yet.