I have defined these in my .html file:
<script type="text/javascript" src="bower_components/tree.js/tree.min.js"></script>
<script type="text/javascript" src="bower_components/q/q.js"></script>
<script type="text/javascript" src="test.js"></script>
Then in test.js:
var myTree = Tree.tree({})
But Typescript errors out saying: "Cannot find name 'Tree'"
I also tried compiling with --module amd
and placing import Tree = require("model/tree");
at the top of the test.js file, but it errors out again: Cannot find external module 'model/tree'.
however clearly it should be a valid import, see here where it was defined: https://github.com/marmelab/tree.js/blob/master/src/main.js
I do not want to write .d.ts files for every single external javascript file I want to use, is that seriously what Typescript wants me to do?