Implement receiving messages from add-on on the client
Reviewed By: mweststrate Differential Revision: D34249101 fbshipit-source-id: 07297b84ed8640e3b41599726ba613b6b4e2b62e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4067f5bd88
commit
b4b9c0ab28
@@ -21,6 +21,17 @@ export interface ServerAddOnControls {
|
||||
method: string,
|
||||
params?: unknown,
|
||||
) => Promise<object | string | number | boolean | null>;
|
||||
receiveMessage: (
|
||||
pluginName: string,
|
||||
method: string,
|
||||
receiver: (data: unknown) => void,
|
||||
) => void;
|
||||
receiveAnyMessage: (
|
||||
pluginName: string,
|
||||
receiver: (method: string, data: unknown) => void,
|
||||
) => void;
|
||||
unsubscribePlugin: (pluginName: string) => void;
|
||||
unsubscribe: () => void;
|
||||
}
|
||||
|
||||
// TODO: Share with js-flipper? Is it worth it?
|
||||
|
||||
Reference in New Issue
Block a user