Are there any mobx declaration files (i.e. mobx.d.ts) anywhere? I don't mind writing some if not, though being written in TypeScript itself I'm surprised I haven't found them in the usual sources (typings, DefinitelyTyped etc.)
Thanks!
mobx.d.ts generated by tsc is included in npm package: https://npmcdn.com/mobx/lib/mobx.d.ts
When you working with sources, you don't need d.ts, as mobx itself is written in typescript
Thanks, not sure how I missed that!
You can directly import {observable} from 'mobx' indeed, without
installing or even specifying or importing any further d.ts file path. It's
a really awesome feature of TS 1.6 and higher. Sadly only few packages use
it so far...
Op di 19 apr. 2016 om 20:13 schreef jamiewinder [email protected]:
Thanks, not sure how I missed that!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/mobxjs/mobx/issues/203#issuecomment-212051341
@mweststrate - I've just looked up the feature you're referring to and I can see why it isn't working for me; I'm using jspm so it isn't able to resolve the d.ts file (since it sits in jspm_packages/npm/mobx, not the expected node_modules). Thanks for the hint!
(thanks for the library btw - I've only just started with it!)
Most helpful comment
mobx.d.tsgenerated bytscis included in npm package: https://npmcdn.com/mobx/lib/mobx.d.tsWhen you working with sources, you don't need
d.ts, as mobx itself is written in typescript