TypeScript solved this problem by connecting to the project the declarations it generated in advance or manually created by developers. Declarations are placed in files with the extension
.d.ts and consist only of type declarations that completely repeat the program until the moment of compilation, when it was deprived of all typing features. Their operation is very similar to the operation of files with the extension
.h in languages C/C++.
Thanks goes to these wonderful people (emoji key):