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:
committed by
Facebook GitHub Bot
parent
0c4ec03e69
commit
e4eecc53c4
@@ -37,25 +37,19 @@ export type FrameworkEventMetadata = {
|
|||||||
documentation: string;
|
documentation: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type JSON =
|
type JSON = string | number | boolean | null | JSON[] | {[key: string]: JSON};
|
||||||
| string
|
|
||||||
| number
|
|
||||||
| boolean
|
|
||||||
| null
|
|
||||||
| JSON[]
|
|
||||||
| {[key: string]: JSON};
|
|
||||||
|
|
||||||
type Stacktrace = {type: 'stacktrace'; stacktrace: string[]};
|
type Stacktrace = {type: 'stacktrace'; stacktrace: string[]};
|
||||||
type Reason = {type: 'reason'; reason: string};
|
type Reason = {type: 'reason'; reason: string};
|
||||||
type UpstreamEvent = {type: 'upstreamEvent'; eventId: Id};
|
type UpstreamEvent = {type: 'upstreamEvent'; eventId: Id};
|
||||||
type EventAttribution = Stacktrace | Reason | UpstreamEvent;
|
type FrameworkEventAttribution = Stacktrace | Reason | UpstreamEvent;
|
||||||
|
|
||||||
export type FrameworkEvent = {
|
export type FrameworkEvent = {
|
||||||
nodeId: Id;
|
nodeId: Id;
|
||||||
type: FrameworkEventType;
|
type: FrameworkEventType;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
payload?: JSON;
|
payload?: JSON;
|
||||||
attribution?: EventAttribution;
|
attribution?: FrameworkEventAttribution;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type InitEvent = {
|
export type InitEvent = {
|
||||||
|
|||||||
Reference in New Issue
Block a user