diff --git a/src/pages/VisProgPage/visualProgrammingUI/EditorWarnings.tsx b/src/pages/VisProgPage/visualProgrammingUI/EditorWarnings.tsx index 54c5c11..65f8e6c 100644 --- a/src/pages/VisProgPage/visualProgrammingUI/EditorWarnings.tsx +++ b/src/pages/VisProgPage/visualProgrammingUI/EditorWarnings.tsx @@ -21,17 +21,13 @@ export type EditorWarning = { }; /** - * either a single warningType, or a scoped warningKey. - * - * supported-scopes: - * - `handle` + * a scoped WarningKey, + * `handleId` is `null` if the warning is not specific to one handle on the node */ -export type WarningKey = - | WarningType // for warnings that can only occur once per node - | { type: WarningType, handleId: string }; // for warnings that can occur on a per-handle basis +export type WarningKey = { type: WarningType, handleId: string | null }; // for warnings that can occur on a per-handle basis export type WarningRegistry = Map>; -export type SeverityIndex = Map>; +export type SeverityIndex = Map>; export type EditorWarningRegistry = { editorWarningRegistry: WarningRegistry; @@ -76,8 +72,8 @@ export type EditorWarningRegistry = { export const editorWarningRegistry : EditorWarningRegistry = { editorWarningRegistry: new Map>(), severityIndex: new Map([ - ['INFO', new Set()], - ['WARNING', new Set()] + ['INFO', new Set<{ nodeId: NodeId, warningKey: WarningKey}>()], + ['WARNING', new Set<{ nodeId: NodeId, warningKey: WarningKey}>()] ]), getWarningsBySeverity: (_warningSeverity) => { return []},