Skip to content

Commit ae35b18

Browse files
authored
chore: updating rxjs (#36)
1 parent 3c57147 commit ae35b18

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"karma-selenium-launcher": "^1.0.1",
3232
"prettier": "^2.7.0",
3333
"pretty-quick": "^3.1.3",
34-
"rxjs": "^6.6.7",
34+
"rxjs": "^7.5.5",
3535
"typescript": "^4.7.3",
3636
"zone.js": "^0.11.5"
3737
},

src/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
const symbolObservable = (typeof Symbol === 'function' && Symbol.observable) || '@@observable';
1+
declare global {
2+
interface SymbolConstructor {
3+
readonly observable: symbol;
4+
}
5+
}
6+
7+
const symbolObservable: typeof Symbol.observable =
8+
(typeof Symbol === 'function' && Symbol.observable) || ('@@observable' as any);
29

310
/**
411
* A callback invoked when a store value changes. It is called with the latest value of a given store.
@@ -10,6 +17,8 @@ export type SubscriberFunction<T> = (value: T) => void;
1017
*/
1118
export interface SubscriberObject<T> {
1219
next: SubscriberFunction<T>;
20+
error?: any;
21+
complete?: any;
1322
invalidate: () => void;
1423
}
1524

@@ -59,6 +68,7 @@ export interface SubscribableStore<T> {
5968
export interface Readable<T> extends SubscribableStore<T> {
6069
subscribe(subscriber: Subscriber<T>): UnsubscribeFunction & UnsubscribeObject;
6170
ngOnDestroy(): void;
71+
[Symbol.observable](): Readable<T>;
6272
}
6373

6474
/**

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7174,7 +7174,7 @@ rx-lite@*, rx-lite@^4.0.8:
71747174
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
71757175
integrity sha512-Cun9QucwK6MIrp3mry/Y7hqD1oFqTYLQ4pGxaHTjIdaFDWRGGLikqp6u8LcWJnzpoALg9hap+JGk8sFIUuEGNA==
71767176

7177-
[email protected], rxjs@^6.6.7:
7177+
71787178
version "6.6.7"
71797179
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
71807180
integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==

0 commit comments

Comments
 (0)