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 () to pile 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 piler says:
....Model.ts(37, 20): error TS1084: Invalid reference directive syntax.
What am I missing?
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./grunt-ts/grunt-ts) to pile 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 piler says:
....Model.ts(37, 20): error TS1084: Invalid reference directive syntax.
What am I missing?
Share Improve this question asked Apr 10, 2014 at 8:12 Johannes KlaußJohannes Klauß 11k17 gold badges70 silver badges126 bronze badges1 Answer
Reset to default 16That needs to be a self closing tag :
///<reference path="../../../lib/typed/jquery.d.ts" />
Notice />
at the end