These are chat archives for TypeStrong/atom-typescript
oauth.iowith JSPM. This results in
email@example.com created. In ES6, I can do
import OAuthIo from 'oauth.io'and everything works out, because there is no compile-time resolution necessary. I am trying to move over to TypeScript, but that line now fails in
atom-typescriptbecause it can't find the 'oauth.io'. This isn't surprising because TypeScript doesn't have any way of finding my JSPM dependencies.
.d.ts, where would I put it? If I distribute my
.d.tsas a JSPM package, I'll be right back in this situation of atom-typescript not being able to find the definition file.
oauth.ioit can resolve the mapping that JSPM creates in
config.js, find the installed folder, and pull the
d.tsissue resolved, I still have the issue that I need the compiled ES6 file to have the import in it (
System.register(['oauth.io'] ...) so everything works at runtime. How can I get atom-typescript to stop complaining about it?
tsdtool, use it to install definitions for the third party libraries you use, and add its typings folder to your filesglob
oauth.io.jsin my ES6 file.
atom-typescriptwill automatically add those files to the files array in tsconfig
oauth.io.d.tswill be downloaded, added to the files list, then the TypeScript compiler will read that and load it up and be able to resolve it..