Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to properly get Aurelia's TypeScript type definition files (*.d.ts) after TS 2.0. release?

In the pre-release versions of Aurelia (for example, betas), JSPM install always got .js and .d.ts files, which was perfect. Now JSPM downloads only .js files. To fix(?) this, Skeleton Templates using Typings now, with a lot of additional lines in the typings.json config file. Now, with TypeScript 2.0 released, Typings considered deprecated, and "official" way to obtain type definitions is npm's @types repository. Aurelia is not there (which is fine), but why I can't download types with JSPM, as before? I don't want to use Typings for Aurelia, because, first, I don't want to specify the same packages again and again in the different package managers just to add more mess into already messy modern JS tooling setup and, second, as I said before, Typings become deprecated and I glad that it happened.

like image 1000
graycrow Avatar asked Sep 29 '16 10:09

graycrow


1 Answers

This is a known issue; its either going to be solved via the jspm side: https://github.com/jspm/jspm-cli/issues/1344 or the typescript side: https://github.com/typings/typings/issues/579

I think you're limited to installing the module via npm (--save-dev) in addition to installing it via jspm. It uses up a lot of extra space, but it does keep typescript and vscode happy.

like image 98
Meirion Hughes Avatar answered Nov 07 '22 17:11

Meirion Hughes