Skip to content

Commit

Permalink
fix(types): move Symbol.observable into types.ts (#6178)
Browse files Browse the repository at this point in the history
Closes #6175
  • Loading branch information
cartant authored and kwonoj committed Apr 15, 2021
1 parent 2f45a2a commit ed34f00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/internal/symbol/observable.ts
@@ -1,11 +1,2 @@
/** Symbol.observable addition */
/* Note: This will add Symbol.observable globally for all TypeScript users,
however, we are no longer polyfilling Symbol.observable */
declare global {
interface SymbolConstructor {
readonly observable: symbol;
}
}

/** Symbol.observable or a string "@@observable". Used for interop */
export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();
10 changes: 10 additions & 0 deletions src/internal/types.ts
Expand Up @@ -4,6 +4,16 @@
import { Observable } from './Observable';
import { Subscription } from './Subscription';

/**
* Note: This will add Symbol.observable globally for all TypeScript users,
* however, we are no longer polyfilling Symbol.observable
*/
declare global {
interface SymbolConstructor {
readonly observable: symbol;
}
}

/** OPERATOR INTERFACES */

export interface UnaryFunction<T, R> {
Expand Down

0 comments on commit ed34f00

Please sign in to comment.