-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Use export default xs to enable autoimport in VSCode #242
Conversation
Nitive
commented
Apr 8, 2018
Nice! Thanks |
This change possibly breaks the existing code. This is a breaking change for the code which utilises the default-exported stuff as For example, I looked into import xs from 'xstream';
import { InternalInstances } from './types';
export declare function pickMerge(selector: string): (inst$: xs<InternalInstances<any>>) => xs<any>; This doesn't compile now as |
Very good point @ryota-ka |
That said, it's perceivable only for TypeScript users who directly use it. Those who indirectly use it (like in onionify |
@staltz Then any plans to release a new version of
|
Thanks! I released onionify v5.1.0 can you test it? |
@staltz Thank you for your quick response and action. |
The breaking change can be fixed by creating a type along with a constant const xs = Stream;
+ type xs<T> = Stream<T>;
export default xs; @staltz I can create a PR if you like. I think it's better to fix breaking change now and perhaps remove type export in the next major release |
@Nitive That's a wise idea. Let's do that, the PR would be welcomed. |
Fix breaking change when default-exported stuff is used as as Stream type, not only as a value staltz#242
Fix breaking change when default-exported stuff is used as as Stream type, not only as a value #242