The TypeScript support for existing JavaScript libraries is achieved thanks to the declaration of the public interface, or API, of the library. The declaration of the public interface of a third-party module is known as type definition.
When we install an npm module, we can face a few different scenarios.