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
This commit is contained in:
Lorenzo Blasa
2023-04-03 10:35:15 -07:00
committed by Facebook GitHub Bot
parent 0c4ec03e69
commit e4eecc53c4

View File

@@ -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 = {