Typescript: The hidden power

If you’re working with Javascript you need to pay attention at Typescript and how is evolving in an excellent direction.

Typescript has a simple and powerful definition:

Is a typed superset of Javascript that compiles to plain JavaScript

Project references

Typescript project references is one of the most interesting features of v3.x. From the documentation we can quickly draw a picture about what’s about:

Project references allow you to structure your TypeScript programs into smaller pieces.
By doing this, you can greatly improve build times, enforce logical separation between components, and organize your code in new and better ways.

Having smaller pieces you can distribute parts of your code (see lerna), knowing that this small pieces works well in an tested environment (your bigger project).

extends from node_modules

In Typescript 3.2 you can extend your tsconfig from a dependency from your node_modules

{
    "extends": "@mylib/tsconfig.json",
    "include": ["./**/*"]
    "compilerOptions": {
        // override options
    }
}