ServiceMessageBroker

From Get docs
< @angular/platform-webworkerAngular/docs/8/api/platform-webworker/servicemessagebroker


ServiceMessageBroker

interface deprecated

Helper class for UIComponents that allows components to register methods. If a registered method message is received from the broker on the worker, the UIMessageBroker deserializes its arguments and calls the registered method. If that method returns a promise, the UIMessageBroker returns the result to the worker.

Deprecated: platform-webworker is deprecated in Angular and will be removed in version 10

interface ServiceMessageBroker {
  registerMethod(methodName: string, signature: (Type<any> | SerializerTypes)[], method: (..._: any[]) => void | Promise<any>, returnType?: Type<any> | SerializerTypes): void
}

Methods

registerMethod(methodName: string, signature: (Type<any> | SerializerTypes)[], method: (..._: any[]) => void | Promise<any>, returnType?: Type<any> | SerializerTypes): void

Parameters
methodName string
signature SerializerTypes)[]
method Promise
returnType SerializerTypes Optional. Default is undefined.
Returns

void



© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v8.angular.io/api/platform-webworker/ServiceMessageBroker