Sha256: 17c4a0bc9c459a226758374c351f2ea985290d14ff39d418f79449b3400febc5

Contents?: true

Size: 1.09 KB

Versions: 53

Compression:

Stored size: 1.09 KB

Contents

declare let global: any;

/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

declare var WorkerGlobalScope: any;
// CommonJS / Node have global context exposed as "global" variable.
// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake
// the global "global" var for now.

const __window = typeof window !== 'undefined' && window;
const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
    self instanceof WorkerGlobalScope && self;
const __global = typeof global !== 'undefined' && global;
const _root: any = __window || __global || __self;

// Workaround Closure Compiler restriction: The body of a goog.module cannot use throw.
// This is needed when used with angular/tsickle which inserts a goog.module statement.
// Wrap in IIFE
(function () {
  if (!_root) {
    throw new Error('RxJS could not find any global context (window, self, global)');
  }
})();

export { _root as root };

Version data entries

53 entries across 51 versions & 5 rubygems

Version Path
govuk_publishing_components-17.10.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.9.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.8.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.7.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.6.1 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.6.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.5.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.4.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.3.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.2.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.1.1 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.1.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-17.0.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-16.29.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-16.28.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-16.27.1 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-16.27.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-16.26.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-16.25.0 node_modules/rxjs/src/util/root.ts
govuk_publishing_components-16.24.0 node_modules/rxjs/src/util/root.ts