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 committed Mar 28, 2021
1 parent 4014e19 commit 94f690b
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
@@ -1,6 +1,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> { (source: T): R; }
Expand Down

0 comments on commit 94f690b

Please sign in to comment.