extract param type (#44498)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44498

Changelog: [internal]

Quick refactor to reduce commit noise in the following diff in the stack

Reviewed By: blakef

Differential Revision: D57140480

fbshipit-source-id: aa1fef83d5347b8a11651d3d5c4112b4adf7a7d5
This commit is contained in:
Edmond Chui
2024-05-09 03:43:38 -07:00
committed by Facebook GitHub Bot
parent 7835aa4341
commit 75dc42f4df
@@ -31,6 +31,11 @@ type RequestMetadata = $ReadOnly<{
frontendUserAgent: string | null,
}>;
type ResponseMetadata = $ReadOnly<{
pageId: string | null,
frontendUserAgent: string | null,
}>;
class DeviceEventReporter {
#eventReporter: EventReporter;
@@ -72,10 +77,7 @@ class DeviceEventReporter {
logResponse(
res: CDPResponse<>,
origin: 'device' | 'proxy',
metadata: $ReadOnly<{
pageId: string | null,
frontendUserAgent: string | null,
}>,
metadata: ResponseMetadata,
): void {
const pendingCommand = this.#pendingCommands.get(res.id);
if (!pendingCommand) {