docs(webworkers): add experimental markers for all web worker public apis
This commit is contained in:
@ -7,6 +7,9 @@ import {DateWrapper, StringWrapper, isPresent, print, stringify} from '../../fac
|
||||
import {MessageBus} from './message_bus';
|
||||
import {Serializer} from './serializer';
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export abstract class ClientMessageBrokerFactory {
|
||||
/**
|
||||
* Initializes the given channel and attaches a new {@link ClientMessageBroker} to it.
|
||||
@ -32,6 +35,9 @@ export class ClientMessageBrokerFactory_ extends ClientMessageBrokerFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export abstract class ClientMessageBroker {
|
||||
abstract runOnService(args: UiArguments, returnType: Type): Promise<any>;
|
||||
}
|
||||
@ -148,10 +154,16 @@ class MessageData {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export class FnArg {
|
||||
constructor(public value: any /** TODO #9100 */, public type: Type) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export class UiArguments {
|
||||
constructor(public method: string, public args?: FnArg[]) {}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import {EventEmitter} from '../../facade/async';
|
||||
* Communication is based on a channel abstraction. Messages published in a
|
||||
* given channel to one MessageBusSink are received on the same channel
|
||||
* by the corresponding MessageBusSource.
|
||||
* @experimental
|
||||
*/
|
||||
export abstract class MessageBus implements MessageBusSource, MessageBusSink {
|
||||
/**
|
||||
@ -41,6 +42,9 @@ export abstract class MessageBus implements MessageBusSource, MessageBusSink {
|
||||
abstract to(channel: string): EventEmitter<any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface MessageBusSource {
|
||||
/**
|
||||
* Sets up a new channel on the MessageBusSource.
|
||||
@ -64,6 +68,9 @@ export interface MessageBusSource {
|
||||
from(channel: string): EventEmitter<any>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface MessageBusSink {
|
||||
/**
|
||||
* Sets up a new channel on the MessageBusSink.
|
||||
|
@ -11,6 +11,9 @@ import {LocationType} from './serialized_types';
|
||||
|
||||
// PRIMITIVE is any type that does not need to be serialized (string, number, boolean)
|
||||
// We set it to String so that it is considered a Type.
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export const PRIMITIVE: Type = String;
|
||||
|
||||
@Injectable()
|
||||
|
@ -29,6 +29,9 @@ export class ServiceMessageBrokerFactory_ extends ServiceMessageBrokerFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export abstract class ServiceMessageBroker {
|
||||
abstract registerMethod(
|
||||
methodName: string, signature: Type[], method: Function, returnType?: Type): void;
|
||||
@ -88,6 +91,9 @@ export class ServiceMessageBroker_ extends ServiceMessageBroker {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export class ReceivedMessage {
|
||||
method: string;
|
||||
args: any[];
|
||||
|
@ -8,6 +8,7 @@ import {MessageBasedPlatformLocation} from './platform_location';
|
||||
/**
|
||||
* A list of {@link Provider}s. To use the router in a Worker enabled application you must
|
||||
* include these providers when setting up the render thread.
|
||||
* @experimental
|
||||
*/
|
||||
export const WORKER_UI_LOCATION_PROVIDERS = [
|
||||
MessageBasedPlatformLocation, BrowserPlatformLocation,
|
||||
|
@ -7,6 +7,7 @@ import {WebWorkerPlatformLocation} from './platform_location';
|
||||
/**
|
||||
* Those providers should be added when the router is used in a worker context in addition to the
|
||||
* {@link ROUTER_PROVIDERS} and after them.
|
||||
* @experimental
|
||||
*/
|
||||
export const WORKER_APP_LOCATION_PROVIDERS = [
|
||||
{provide: PlatformLocation, useClass: WebWorkerPlatformLocation}, {
|
||||
|
Reference in New Issue
Block a user