Introduce pluginKey
Summary: Exposed the `pluginKey` to sandy plugins (which we will use later for storing table preferences per plugin). And a little moving code around because circular deps problem roared its ugly head again. Reviewed By: nikoant Differential Revision: D27009721 fbshipit-source-id: 7ad29e72ff8028c9daae270c4749b657bd8ff049
This commit is contained in:
committed by
Facebook GitHub Bot
parent
be25df6490
commit
2ca52f81d2
@@ -12,7 +12,6 @@ import {
|
||||
FlipperBasePlugin,
|
||||
PluginDefinition,
|
||||
DevicePluginDefinition,
|
||||
isSandyPlugin,
|
||||
ClientPluginDefinition,
|
||||
} from '../plugin';
|
||||
import type {State} from '../reducers';
|
||||
@@ -54,6 +53,12 @@ export function getPluginKey(
|
||||
return `unknown#${pluginID}`;
|
||||
}
|
||||
|
||||
export function isSandyPlugin(
|
||||
plugin?: PluginDefinition | null,
|
||||
): plugin is _SandyPluginDefinition {
|
||||
return plugin instanceof _SandyPluginDefinition;
|
||||
}
|
||||
|
||||
export function getPersistedState<PersistedState>(
|
||||
pluginKey: string,
|
||||
persistingPlugin: typeof FlipperBasePlugin | null,
|
||||
|
||||
Reference in New Issue
Block a user