2016-08-30 14:15:25 -04:00
|
|
|
/** @experimental */
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: StaticProvider[]): Promise<PlatformRef>;
|
2016-08-30 14:15:25 -04:00
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class ClientMessageBroker {
|
2017-03-24 12:59:41 -04:00
|
|
|
abstract runOnService(args: UiArguments, returnType: Type<any> | SerializerTypes | null): Promise<any> | null;
|
2016-08-30 14:15:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class ClientMessageBrokerFactory {
|
|
|
|
abstract createMessageBroker(channel: string, runInZone?: boolean): ClientMessageBroker;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare class FnArg {
|
2017-02-17 01:36:21 -05:00
|
|
|
type: Type<any> | SerializerTypes;
|
2016-08-30 14:15:25 -04:00
|
|
|
value: any;
|
2017-02-17 01:36:21 -05:00
|
|
|
constructor(value: any, type?: Type<any> | SerializerTypes);
|
2016-08-30 14:15:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class MessageBus implements MessageBusSource, MessageBusSink {
|
|
|
|
abstract attachToZone(zone: NgZone): void;
|
|
|
|
abstract from(channel: string): EventEmitter<any>;
|
|
|
|
abstract initChannel(channel: string, runInZone?: boolean): void;
|
|
|
|
abstract to(channel: string): EventEmitter<any>;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface MessageBusSink {
|
|
|
|
attachToZone(zone: NgZone): void;
|
|
|
|
initChannel(channel: string, runInZone: boolean): void;
|
|
|
|
to(channel: string): EventEmitter<any>;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export interface MessageBusSource {
|
|
|
|
attachToZone(zone: NgZone): void;
|
|
|
|
from(channel: string): EventEmitter<any>;
|
|
|
|
initChannel(channel: string, runInZone: boolean): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
export declare const platformWorkerApp: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
2016-08-30 14:15:25 -04:00
|
|
|
|
|
|
|
/** @experimental */
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
export declare const platformWorkerUi: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
|
2016-08-30 14:15:25 -04:00
|
|
|
|
|
|
|
/** @experimental */
|
2017-02-19 03:23:45 -05:00
|
|
|
export interface ReceivedMessage {
|
2016-08-30 14:15:25 -04:00
|
|
|
args: any[];
|
|
|
|
id: string;
|
|
|
|
method: string;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
2017-02-17 01:36:21 -05:00
|
|
|
/** @experimental */
|
|
|
|
export declare const enum SerializerTypes {
|
2017-03-07 19:36:12 -05:00
|
|
|
RENDERER_TYPE_2 = 0,
|
2017-02-19 03:23:45 -05:00
|
|
|
PRIMITIVE = 1,
|
|
|
|
RENDER_STORE_OBJECT = 2,
|
2017-02-17 01:36:21 -05:00
|
|
|
}
|
|
|
|
|
2016-08-30 14:15:25 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class ServiceMessageBroker {
|
2017-03-24 12:59:41 -04:00
|
|
|
abstract registerMethod(methodName: string, signature: Array<Type<any> | SerializerTypes> | null, method: Function, returnType?: Type<any> | SerializerTypes): void;
|
2016-08-30 14:15:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare abstract class ServiceMessageBrokerFactory {
|
|
|
|
abstract createMessageBroker(channel: string, runInZone?: boolean): ServiceMessageBroker;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare class UiArguments {
|
|
|
|
args: FnArg[];
|
|
|
|
method: string;
|
|
|
|
constructor(method: string, args?: FnArg[]);
|
|
|
|
}
|
|
|
|
|
2016-11-30 16:52:08 -05:00
|
|
|
/** @stable */
|
|
|
|
export declare const VERSION: Version;
|
|
|
|
|
2016-08-30 14:15:25 -04:00
|
|
|
/** @experimental */
|
|
|
|
export declare const WORKER_APP_LOCATION_PROVIDERS: ({
|
|
|
|
provide: typeof PlatformLocation;
|
|
|
|
useClass: typeof WebWorkerPlatformLocation;
|
|
|
|
} | {
|
2017-01-03 19:54:46 -05:00
|
|
|
provide: InjectionToken<(() => void)[]>;
|
2016-08-30 14:15:25 -04:00
|
|
|
useFactory: (platformLocation: WebWorkerPlatformLocation, zone: NgZone) => () => Promise<boolean>;
|
|
|
|
multi: boolean;
|
|
|
|
deps: (typeof NgZone | typeof PlatformLocation)[];
|
2017-03-07 17:27:20 -05:00
|
|
|
} | {
|
|
|
|
provide: InjectionToken<Promise<any>>;
|
|
|
|
useFactory: (platformLocation: WebWorkerPlatformLocation) => Promise<any>;
|
|
|
|
deps: typeof PlatformLocation[];
|
2016-08-30 14:15:25 -04:00
|
|
|
})[];
|
|
|
|
|
|
|
|
/** @experimental */
|
perf: switch angular to use StaticInjector instead of ReflectiveInjector
This change allows ReflectiveInjector to be tree shaken resulting
in not needed Reflect polyfil and smaller bundles.
Code savings for HelloWorld using Closure:
Reflective: bundle.js: 105,864(34,190 gzip)
Static: bundle.js: 154,889(33,555 gzip)
645( 2%)
BREAKING CHANGE:
`platformXXXX()` no longer accepts providers which depend on reflection.
Specifically the method signature when from `Provider[]` to
`StaticProvider[]`.
Example:
Before:
```
[
MyClass,
{provide: ClassA, useClass: SubClassA}
]
```
After:
```
[
{provide: MyClass, deps: [Dep1,...]},
{provide: ClassA, useClass: SubClassA, deps: [Dep1,...]}
]
```
NOTE: This only applies to platform creation and providers for the JIT
compiler. It does not apply to `@Compotent` or `@NgModule` provides
declarations.
Benchpress note: Previously Benchpress also supported reflective
provides, which now require static providers.
DEPRECATION:
- `ReflectiveInjector` is now deprecated as it will be remove. Use
`Injector.create` as a replacement.
closes #18496
2017-08-03 15:33:29 -04:00
|
|
|
export declare const WORKER_UI_LOCATION_PROVIDERS: StaticProvider[];
|
2016-08-30 14:15:25 -04:00
|
|
|
|
|
|
|
/** @experimental */
|
|
|
|
export declare class WorkerAppModule {
|
|
|
|
}
|