Introducing module resolution

Module resolution is the process used to find the definitions of the modules that you want to use. Without module resolution, TypeScript wouldn't be able to provide you with useful suggestions regarding what can be imported and what can't. Also, it wouldn't be able to perform type checking for the code using those modules.

Module loaders and bundlers (for example, webpack: https://webpack.js.org/concepts/module-resolution) also perform module resolution, but be careful not to mix that process with what we will describe here, as it is specific to how TypeScript works, even if the ideas are closely related.

Let's look at resolution strategies.