Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

root.ts 1.1KB

12345678910111213141516171819202122232425262728293031
  1. declare let global: any;
  2. /**
  3. * @license
  4. * Copyright Google Inc. All Rights Reserved.
  5. *
  6. * Use of this source code is governed by an MIT-style license that can be
  7. * found in the LICENSE file at https://angular.io/license
  8. */
  9. declare var WorkerGlobalScope: any;
  10. // CommonJS / Node have global context exposed as "global" variable.
  11. // We don't want to include the whole node.d.ts this this compilation unit so we'll just fake
  12. // the global "global" var for now.
  13. const __window = typeof window !== 'undefined' && window;
  14. const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
  15. self instanceof WorkerGlobalScope && self;
  16. const __global = typeof global !== 'undefined' && global;
  17. const _root: any = __window || __global || __self;
  18. // Workaround Closure Compiler restriction: The body of a goog.module cannot use throw.
  19. // This is needed when used with angular/tsickle which inserts a goog.module statement.
  20. // Wrap in IIFE
  21. (function () {
  22. if (!_root) {
  23. throw new Error('RxJS could not find any global context (window, self, global)');
  24. }
  25. })();
  26. export { _root as root };