Implement sending messages from desktop to add-on
Reviewed By: antonk52 Differential Revision: D34239803 fbshipit-source-id: 1a18d522ba877ade3d0703fbb374c15b596241d7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2ce037d96b
commit
4067f5bd88
@@ -69,7 +69,7 @@ export class SandyDevicePluginInstance extends BasePluginInstance {
|
||||
}
|
||||
|
||||
/** client that is bound to this instance */
|
||||
readonly client: DevicePluginClient;
|
||||
readonly client: DevicePluginClient<any, any>;
|
||||
|
||||
constructor(
|
||||
serverAddOnControls: ServerAddOnControls,
|
||||
|
||||
@@ -379,9 +379,13 @@ export abstract class BasePluginInstance {
|
||||
this.flipperLib.showNotification(this.pluginKey, notification);
|
||||
},
|
||||
logger: this.flipperLib.logger,
|
||||
sendToServerAddOn: (_method, _params): any => {
|
||||
// TODO: Implement me
|
||||
},
|
||||
sendToServerAddOn: (method, params) =>
|
||||
this.serverAddOnControls.sendMessage(
|
||||
this.definition.packageName,
|
||||
// TODO: Remove type cast
|
||||
method as string,
|
||||
params,
|
||||
),
|
||||
onServerAddOnMessage: (_event, _cb) => {
|
||||
// TODO: Implement me
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user