Skip to content

Commit 94f690b

Browse files
authored
fix(types): move Symbol.observable into types.ts (#6178)
Closes #6175
1 parent 4014e19 commit 94f690b

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/internal/symbol/observable.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
/** Symbol.observable addition */
2-
/* Note: This will add Symbol.observable globally for all TypeScript users,
3-
however, we are no longer polyfilling Symbol.observable */
4-
declare global {
5-
interface SymbolConstructor {
6-
readonly observable: symbol;
7-
}
8-
}
9-
101
/** Symbol.observable or a string "@@observable". Used for interop */
112
export const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();

src/internal/types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { Observable } from './Observable';
22
import { Subscription } from './Subscription';
33

4+
/**
5+
* Note: This will add Symbol.observable globally for all TypeScript users,
6+
* however, we are no longer polyfilling Symbol.observable
7+
*/
8+
declare global {
9+
interface SymbolConstructor {
10+
readonly observable: symbol;
11+
}
12+
}
13+
414
/** OPERATOR INTERFACES */
515

616
export interface UnaryFunction<T, R> { (source: T): R; }

0 commit comments

Comments
 (0)