docs(webworkers): add experimental markers for all web worker public apis

This commit is contained in:
Igor Minar
2016-06-15 08:41:41 -07:00
parent 4fc37aeabd
commit 933f45ef31
9 changed files with 55 additions and 0 deletions

View File

@ -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[]) {}
}

View File

@ -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.

View File

@ -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()

View File

@ -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[];

View File

@ -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,

View File

@ -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}, {