I have a set of plain JS functions defined in my index.html function. I would like to declare those functions to be able to use them in TypeScript files. This is what I do:
declare function getHtmlBasePath(): String;
declare function fbFetchedLoginStatus(): boolean;
declare function getFbAccessToken(): String;
declare function setFbAccessToken(token: String);
However, to avoid declaring those files in every TypeScript file where they are used, I would like to define them in a separate file and import that file wherever I want. This way, I void duplicate declaration and I also get the support of the IDE if I want to do refactoring later. However, by the time I define those declarations in a TypeScript file and import them, the TypeScript compiler will assume this is a module that actually has to be imported, while it is simply a declaration file (more like a header file for an external library in C/C++).
Is there a way to have a certain TypeScript serves no purpose other than set of a declaration, i.e. when you import it, TypeScript compiler doesn't generate require statements?