From e4eecc53c4b75f8cd46ff873cbe302daea195b4c Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Mon, 3 Apr 2023 10:35:15 -0700 Subject: [PATCH] EventAttribution -> FrameworkEventAttribution Summary: Make it more specific as to keep it consistent with the other types. Do not export JSON. Reviewed By: antonk52 Differential Revision: D44625218 fbshipit-source-id: 9cab52ee7e7be21d13f85102597a60c9be967fd0 --- desktop/plugins/public/ui-debugger/types.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/desktop/plugins/public/ui-debugger/types.tsx b/desktop/plugins/public/ui-debugger/types.tsx index 7edb8ecd0..8948e02eb 100644 --- a/desktop/plugins/public/ui-debugger/types.tsx +++ b/desktop/plugins/public/ui-debugger/types.tsx @@ -37,25 +37,19 @@ export type FrameworkEventMetadata = { documentation: string; }; -export type JSON = - | string - | number - | boolean - | null - | JSON[] - | {[key: string]: JSON}; +type JSON = string | number | boolean | null | JSON[] | {[key: string]: JSON}; type Stacktrace = {type: 'stacktrace'; stacktrace: string[]}; type Reason = {type: 'reason'; reason: string}; type UpstreamEvent = {type: 'upstreamEvent'; eventId: Id}; -type EventAttribution = Stacktrace | Reason | UpstreamEvent; +type FrameworkEventAttribution = Stacktrace | Reason | UpstreamEvent; export type FrameworkEvent = { nodeId: Id; type: FrameworkEventType; timestamp: number; payload?: JSON; - attribution?: EventAttribution; + attribution?: FrameworkEventAttribution; }; export type InitEvent = {