@@ -1,5 +1,23 @@
|
||||
/// <reference path="../../../globals.d.ts" />
|
||||
var _global: BrowserNodeGlobal = <any>(typeof window === 'undefined' ? global : window);
|
||||
|
||||
// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492
|
||||
declare var WorkerGlobalScope;
|
||||
var globalScope: BrowserNodeGlobal;
|
||||
if (typeof window === 'undefined') {
|
||||
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
|
||||
// TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
|
||||
globalScope = <any>self;
|
||||
} else {
|
||||
globalScope = <any>global;
|
||||
}
|
||||
} else {
|
||||
globalScope = <any>window;
|
||||
};
|
||||
|
||||
// Need to declare a new variable for global here since TypeScript
|
||||
// exports the original value of the symbol.
|
||||
var _global: BrowserNodeGlobal = globalScope;
|
||||
|
||||
export {_global as global};
|
||||
|
||||
export var Type = Function;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {EventEmitter} from 'angular2/src/core/facade/async';
|
||||
import {BaseException} from 'angular2/src/core/facade/lang';
|
||||
export {EventEmitter, Observable} from 'angular2/src/core/facade/async';
|
||||
|
||||
function _abstract() {
|
||||
throw new BaseException("This method is abstract");
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
import {MessageBus} from 'angular2/src/web_workers/shared/message_bus';
|
||||
import {BaseException} from "angular2/src/core/facade/lang";
|
||||
import {bootstrapUICommon} from "angular2/src/web_workers/ui/impl";
|
||||
export * from 'angular2/src/web_workers/shared/message_bus';
|
||||
|
||||
/**
|
||||
* Bootstrapping a WebWorker
|
||||
|
||||
@@ -10,6 +10,7 @@ import {Promise} from 'angular2/src/core/facade/async';
|
||||
import {bootstrapWebWorkerCommon} from "angular2/src/web_workers/worker/application_common";
|
||||
import {ApplicationRef} from "angular2/src/core/application_ref";
|
||||
import {Injectable} from "angular2/di";
|
||||
export * from "angular2/src/web_workers/shared/message_bus";
|
||||
|
||||
// TODO(jteplitz602) remove this and compile with lib.webworker.d.ts (#3492)
|
||||
interface PostMessageInterface {
|
||||
|
||||
Reference in New Issue
Block a user