If I reference the TypeScript declaration file (for example, jquery.d.ts) using the syntax /// <reference path="..."/> , it is up to me to make sure that I load the appropriate library in other ways, that is, just referring to. The d.ts file does not load the library.
Is there a way to make TypeScript generate a require() call for the library when I use it? If I had not used AMD / requirejs, I could just call require manually, but I would like this to work with AMD.
The advantage of this is that my dependencies will not be defined in two places. A link to the library from the .ts file will be enough to ensure that it is loading, instead of manually maintaining the dependency list in my HTML.
Update : I opened a new question that clarifies my exact situation. I want to pay tribute to the answer to my original question, since I did not give all the necessary details.
javascript typescript js-amd
dcstraw
source share