Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions packages/react-devtools-shared/src/bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,15 @@ export type BackendEvents = {
selectElement: [number],
shutdown: [],
stopInspectingHost: [boolean],
syncSelectionFromBuiltinElementsPanel: [],
syncSelectionToBuiltinElementsPanel: [],
unsupportedRendererVersion: [],

extensionComponentsPanelShown: [],
extensionComponentsPanelHidden: [],

resumeElementPolling: [],
pauseElementPolling: [],

// React Native style editor plug-in.
isNativeStyleEditorSupported: [
{isSupported: boolean, validAttributes: ?$ReadOnlyArray<string>},
Expand All @@ -240,8 +245,6 @@ type FrontendEvents = {
clearWarningsForElementID: [ElementAndRendererID],
copyElementPath: [CopyElementPathParams],
deletePath: [DeletePath],
extensionComponentsPanelShown: [],
extensionComponentsPanelHidden: [],
getBackendVersion: [],
getBridgeProtocol: [],
getIfHasUnsupportedRendererVersion: [],
Expand All @@ -265,7 +268,7 @@ type FrontendEvents = {
shutdown: [],
startInspectingHost: [],
startProfiling: [StartProfilingParams],
stopInspectingHost: [boolean],
stopInspectingHost: [],
scrollToHostInstance: [ScrollToHostInstance],
stopProfiling: [],
storeAsGlobal: [StoreAsGlobalParams],
Expand All @@ -275,6 +278,8 @@ type FrontendEvents = {
viewAttributeSource: [ViewAttributeSourceParams],
viewElementSource: [ElementAndRendererID],

syncSelectionFromBuiltinElementsPanel: [],

// React Native style editor plug-in.
NativeStyleEditor_measure: [ElementAndRendererID],
NativeStyleEditor_renameAttribute: [NativeStyleEditor_RenameAttributeParams],
Expand All @@ -295,19 +300,13 @@ type FrontendEvents = {
overrideProps: [OverrideValue],
overrideState: [OverrideValue],

resumeElementPolling: [],
pauseElementPolling: [],

getHookSettings: [],
};

class Bridge<
OutgoingEvents: Object,
IncomingEvents: Object,
> extends EventEmitter<{
...IncomingEvents,
...OutgoingEvents,
}> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the bug.

> extends EventEmitter<IncomingEvents> {
_isShutdown: boolean = false;
_messageQueue: Array<any> = [];
_scheduledFlush: boolean = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function InspectHostNodesToggle(): React.Node {
logEvent({event_name: 'inspect-element-button-clicked'});
bridge.send('startInspectingHost');
} else {
bridge.send('stopInspectingHost', false);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This argument was unused but it was only there because the types forced it.

bridge.send('stopInspectingHost');
}
},
[bridge],
Expand Down
Loading