-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9830f01
commit 24d724a
Showing
7 changed files
with
30 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1 @@ | ||
import Observable from 'zen-observable'; | ||
|
||
// This simplified polyfill attempts to follow the ECMAScript Observable | ||
// proposal (https://github.com/zenparsing/es-observable) | ||
import 'symbol-observable'; | ||
|
||
export type Subscription = ZenObservable.Subscription; | ||
export type Observer<T> = ZenObservable.Observer<T>; | ||
|
||
// Use global module augmentation to add RxJS interop functionality. By | ||
// using this approach (instead of subclassing `Observable` and adding an | ||
// ['@@observable']() method), we ensure the exported `Observable` retains all | ||
// existing type declarations from `@types/zen-observable` (which is important | ||
// for projects like `apollo-link`). | ||
declare global { | ||
interface Observable<T> { | ||
['@@observable'](): Observable<T>; | ||
} | ||
} | ||
(Observable.prototype as any)['@@observable'] = function () { return this; }; | ||
export { Observable }; | ||
export {Observable, Subscription, PartialObserver as Observer} from 'rxjs'; |