Introduce createTablePlugin
Summary: This diff exposes the createTablePlugin from flipper-plugin, so that createTablePlugin based plugins can be converted to Sandy as well Reviewed By: jknoxville Differential Revision: D28031227 fbshipit-source-id: 8e9c82da08a83fddab740b46be9917b6a1023117
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cf2405a466
commit
05bf55419f
@@ -12,7 +12,7 @@ import {BasePluginInstance, BasePluginClient} from './PluginBase';
|
||||
import {FlipperLib} from './FlipperLib';
|
||||
import {RealFlipperDevice} from './DevicePlugin';
|
||||
import {batched} from '../state/batch';
|
||||
import {Atom, createState} from '../state/atom';
|
||||
import {Atom, createState, ReadOnlyAtom} from '../state/atom';
|
||||
|
||||
type EventsContract = Record<string, any>;
|
||||
type MethodsContract = Record<string, (params: any) => Promise<any>>;
|
||||
@@ -40,6 +40,7 @@ export interface PluginClient<
|
||||
readonly appName: string;
|
||||
|
||||
readonly isConnected: boolean;
|
||||
readonly connected: ReadOnlyAtom<boolean>;
|
||||
|
||||
/**
|
||||
* the onConnect event is fired whenever the plugin is connected to it's counter part on the device.
|
||||
@@ -169,6 +170,7 @@ export class SandyPluginInstance extends BasePluginInstance {
|
||||
get appName() {
|
||||
return realClient.query.app;
|
||||
},
|
||||
connected: self.connected,
|
||||
get isConnected() {
|
||||
return self.connected.get();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user