I want to dive into TypeScript (because to me it looks very promising) and therefore I want to rewrite a little JS project of my own.
So I started to create some classes (each class in a seperate file), but I'm a little bit confused about those *.d.ts files.
How do I exactly work with them? Do I need to reference them in the .ts files? Because PHPStorm seems to index the *.d.ts file anyway.
I'm using grunt-ts (https://github.com/grunt-ts/grunt-ts) to compile the project down to JavaScript, seems that this one needs the reference files.
But when I'm referencing it like so in the first line:
///<reference path="../../../lib/typed/jquery.d.ts">
The compiler says:
....Model.ts(37, 20): error TS1084: Invalid reference directive syntax.
What am I missing?
That needs to be a self closing tag :
///<reference path="../../../lib/typed/jquery.d.ts" />
Notice />
at the end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With