-
Notifications
You must be signed in to change notification settings - Fork 3k
Single file typescript declarations for latest v5.0.2 #2221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unfortunately no, RxJS v5 does not provide merged (flattened) type definition and no short-term plan to support this. There was actually discussion regarding this topic to support UMD type of build to have type definitions as well (#1481), but current compiler support lacks of features to merge, or flatten type definitions into a single definition from multiple definitions. In case of RxJS v4 (and other definition such as @types package) could support single type definition is those are handwritten and does not have relation to actual source code, but in case of Rx v5 type is generated via actual codebases, so manual handcrafting on each type definition is something hard to be done. There is open discussion in compiler side support (microsoft/TypeScript#5332) but seems it hasn't been got lot of attention at the moment. If compiler supports those features, then it may possible to explore on this codebase if it's workable with existing codebases. |
related note, microsoft/TypeScript#2568 maybe one possible approach but it doesn't support UMD directly, not sure if it'll work with UMD when targetted to other module types, also not sure how to validate those as well. |
@kwonoj Thanks so much for these resources! I'm thinking what I might try is compress/minify the |
@roblav96 yes, I was considered dts-bundle and generator (#1481 (comment)) at the moment with original issue, no luck then. Hope it may changed and updated. |
Typescript compiler considers this as 2.3 milestone microsoft/TypeScript#4433 , will not be able to achieve until proper upstream supports comes in. |
It seems upstream issue is stall without exact milestone, I'm going to close issue for now as blocked by upstream. Once we have TSC supports we can revisit this. |
Hi there! I have a tool which allows to bundle single dts file - https://github.com/timocov/dts-bundle-generator. Here is bundled dts created by /cc @kwonoj |
Uh oh!
There was an error while loading. Please reload this page.
For the previous versions of
[email protected]
I've been able to find the typescript declarations in a single file:https://github.com/Reactive-Extensions/RxJS/blob/master/ts/rx.d.ts
I prefer downloading the minified file off the CND from:
https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.1.0/rx.js
Then importing that file using:
But I can't find this single file declarations for the latest
[email protected]
anywhere. I tried downloading the release and running all thenpm run compile_dist_*
but the single file declarations was never produced.Is there any other way I can generate all the declarations into one contained file that represents the CND's minified release builds? Thank you! :D
The text was updated successfully, but these errors were encountered: