Saturday, December 08, 2018

Understanding JavaScript Modules As A TypeScript User

This post, is the first in a series of post that I will be writing about Modules in TypeScript. It is a continuation of the process of jotting down the various things I learnt while building ip-num. The previous post like this one, was Declaration Files in TypeScript: An Introduction. In which I shared how I came to wrap my head around declaration files in TypeScript.

Since the topic of Modules is quite an expansive one, instead of jamming everything I need to write into one blogpost, I will be spreading it out, across various posts, that would be published in the coming weeks/months.

This post is to get the ball rolling on that, and It would focus mainly on introducing the concepts of modules as we have them within the JavaScript ecosystem.

Since TypeScript is but a superset of JavaScript and JavaScript is still its only transpiler target, one really cannot get away from having to understand how things work in the JavaScript land in other to be able to deeply understand how various aspects of TypeScript fits together.

Modules are just one example of this.