I'm submitting a bug report
Acquiring TypeScript definition files for Aurelia is very difficult. If they were published on npm under @types it would be drastically improved (as TypeScript 2 automatically looks for types there and no need for another tool like typings).
Please tell us about your environment:
Current behavior:
Requires another tool typings, requires edits to tsconfig.json to look in the typings folder, etc.
Expected/desired behavior:
npm install @types/aurelia :)
I'm not using the typings tool and have not problems whatsoever. The aurelia packages have the typings property set. The TS docs say:
If you control the npm package you are publishing declarations for, then the first approach is favored. That way, your declarations and JavaScript always travel together.
Note that the "typings" field is synonymous with "types", and could be used as well.
@StrahilKazlachev it must be JSPM that is borking things for me then -- since I'm using jspm rather than npm to install the Aurelia packages
Aaaah, yes, I have npm packages for dev/compilation, jspm for runtime deps.
So you duplicate all the packages? once in devDependencies and once in jspm?
Yes. Also we do have our own packages, so we have some of them in peer.
@StrahilKazlachev thanks - I'll have to give that a try!
edit -- Worked great! So maybe this issue could be just to document that somewhere.
closing - @StrahilKazlachev is correct, Aurelia packages provides the typings property in their package.json which is the preferred way to tell the typescript compiler where the defs are.
Any edits on this part ?
Got this during npm install:
npm WARN deprecated [email protected]: Typings is deprecated in favor of NPM @types -- see README for more information
Most helpful comment
Any edits on this part ?
Got this during npm install:
npm WARN deprecated [email protected]: Typings is deprecated in favor of NPM @types -- see README for more information