Hi @EisenbergEffect ,
I finally get time to test jspm support for typings.
I notice when I install aurelia packages in jspm, the package.json and *.d.ts is not included.
Using aurelia-pal as an example, it points to dist/amd which does not have *.d.ts
Also, package.json should also be deployed to that we can find out where the typings file is located (same as what tsc does on npm side).
Can you take a look into it?
@unional take a look at the typescript skeleton. It uses typescript, typings and jspm:
https://github.com/aurelia/skeleton-navigation/tree/master/skeleton-typescript
Please reopen. I'm a contributor of typings. This is directly related to adding jspm support in typings.
Currently, due to limitation of TypeScript support for jspm, we have to install the package both on jspm and npm, or install on jspm and use typings install github:aurelia/*** to install the typings.
I'm adding jspm support in typings, so that user can do:
jspm i npm:aurelia-***
typings i jspm:aurelia-*** // this will resolve the jspm dependency and add the typings locally
ping @EisenbergEffect , he is aware of this feature.
EDIT: To clarify how this is related, when jspm support is available in typings, the current jspm distribution (OP, without the typings file), user will not be able to do typings install jspm:aurelia-*** because the typings file is not available.
Opening this to consider updating our distribution somehow.
Thanks. The PR for this feature is at typings/core and there is one identified bug not related to this feature blocking the merge. I hope it will be merged soon.
Hi, jspm support is landed in typings 2.0. So if aurelia distribute typings files during jspm install, it would be great. 馃尫
I've had a few issues relating to this.
There's no other option, that I can see, than to distribute/duplicate the .d.ts in within each dist sub directory.
I've just remembered that, following the move to typescript, aurelia-dialog no longer exhibits the issue mentioned here because the d.ts is indeed distributed/duplicated in each dist sub directory ..and of course aurelia-validation built using typescript is the same.
Would it be an acceptable idea to update all non-TS libraries to distribute the d.ts in the same way? Are the d.ts files generated or manually updated? If manually updated I suggest the d.ts files are moved to source and then copied as part of the build task.
Commonly used packages to check and update would be:
Any of these?
Quite a list... and I fear I may have missed one or two.
I have written my own tool to handle this. It is far from ideal.
@AdamWillden
Are the d.ts files generated or manually updated?
they are generated based on TS types in ES6 sources.
OP is asking for typings support for the jspm repository. Typings is deprecated..
The problem OP was trying to solve is "how do we make typescript and typescript-enabled IDEs aware of types installed by jspm." The TypeScript team has noted that analyzing jspm_packages for types the way it works with node_modules is not as viable because of the way that jspm versions packages.
jspm has provided no further specification for specifying types that we can comply with.
The less than ideal but not entirely painful solution is to run an npm install to get your types.
Most helpful comment
Please reopen. I'm a contributor of
typings. This is directly related to addingjspmsupport intypings.Currently, due to limitation of TypeScript support for
jspm, we have to install the package both onjspmandnpm, or install onjspmand usetypings install github:aurelia/***to install the typings.I'm adding
jspmsupport intypings, so that user can do:ping @EisenbergEffect , he is aware of this feature.
EDIT: To clarify how this is related, when
jspmsupport is available intypings, the currentjspmdistribution (OP, without the typings file), user will not be able to dotypings install jspm:aurelia-***because the typings file is not available.