Add generics to server add-on connection
Reviewed By: mweststrate Differential Revision: D34307356 fbshipit-source-id: 27e61355a85995368ebb197c42d58f4145473567
This commit is contained in:
committed by
Facebook GitHub Bot
parent
673bb9135e
commit
01a5f3da90
@@ -8,12 +8,7 @@
|
||||
*/
|
||||
|
||||
import {SandyPluginDefinition} from './SandyPluginDefinition';
|
||||
import {
|
||||
BasePluginInstance,
|
||||
BasePluginClient,
|
||||
EventsContract,
|
||||
MethodsContract,
|
||||
} from './PluginBase';
|
||||
import {BasePluginInstance, BasePluginClient} from './PluginBase';
|
||||
import {FlipperLib} from './FlipperLib';
|
||||
import {Atom, ReadOnlyAtom} from '../state/atom';
|
||||
import {
|
||||
@@ -22,6 +17,8 @@ import {
|
||||
DeviceLogEntry,
|
||||
CrashLog,
|
||||
ServerAddOnControls,
|
||||
EventsContract,
|
||||
MethodsContract,
|
||||
} from 'flipper-common';
|
||||
|
||||
export type DeviceLogListener = (entry: DeviceLogEntry) => void;
|
||||
|
||||
@@ -8,17 +8,16 @@
|
||||
*/
|
||||
|
||||
import {SandyPluginDefinition} from './SandyPluginDefinition';
|
||||
import {
|
||||
BasePluginInstance,
|
||||
BasePluginClient,
|
||||
EventsContract,
|
||||
MethodsContract,
|
||||
} from './PluginBase';
|
||||
import {BasePluginInstance, BasePluginClient} from './PluginBase';
|
||||
import {FlipperLib} from './FlipperLib';
|
||||
import {Device} from './DevicePlugin';
|
||||
import {batched} from '../state/batch';
|
||||
import {Atom, createState, ReadOnlyAtom} from '../state/atom';
|
||||
import {ServerAddOnControls} from 'flipper-common';
|
||||
import {
|
||||
ServerAddOnControls,
|
||||
EventsContract,
|
||||
MethodsContract,
|
||||
} from 'flipper-common';
|
||||
|
||||
type PreventIntersectionWith<Contract extends Record<string, any>> = {
|
||||
[Key in keyof Contract]?: never;
|
||||
|
||||
@@ -18,10 +18,11 @@ import {Idler} from '../utils/Idler';
|
||||
import {Notification} from './Notification';
|
||||
import {Logger} from '../utils/Logger';
|
||||
import {CreatePasteArgs, CreatePasteResult} from './Paste';
|
||||
import {ServerAddOnControls} from 'flipper-common';
|
||||
|
||||
export type EventsContract = Record<string, any>;
|
||||
export type MethodsContract = Record<string, (params: any) => Promise<any>>;
|
||||
import {
|
||||
EventsContract,
|
||||
MethodsContract,
|
||||
ServerAddOnControls,
|
||||
} from 'flipper-common';
|
||||
|
||||
type StateExportHandler<T = any> = (
|
||||
idler: Idler,
|
||||
|
||||
Reference in New Issue
Block a user