feat: The Big One UI #47
@@ -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<NodeId, Map<WarningKey, EditorWarning>>;
|
||||
export type SeverityIndex = Map<WarningSeverity, Set<string>>;
|
||||
export type SeverityIndex = Map<WarningSeverity, Set<{ nodeId: NodeId, warningKey: WarningKey}>>;
|
||||
|
||||
export type EditorWarningRegistry = {
|
||||
editorWarningRegistry: WarningRegistry;
|
||||
@@ -76,8 +72,8 @@ export type EditorWarningRegistry = {
|
||||
export const editorWarningRegistry : EditorWarningRegistry = {
|
||||
editorWarningRegistry: new Map<NodeId, Map<WarningKey, EditorWarning>>(),
|
||||
severityIndex: new Map([
|
||||
['INFO', new Set<string>()],
|
||||
['WARNING', new Set<string>()]
|
||||
['INFO', new Set<{ nodeId: NodeId, warningKey: WarningKey}>()],
|
||||
['WARNING', new Set<{ nodeId: NodeId, warningKey: WarningKey}>()]
|
||||
]),
|
||||
|
||||
getWarningsBySeverity: (_warningSeverity) => { return []},
|
||||
|
||||
Reference in New Issue
Block a user