feat: The Big One UI #47
@@ -76,7 +76,26 @@ export function editorWarningRegistry(get: ZustandGet, set: ZustandSet) : Editor
|
||||
['WARNING', new Set<{ nodeId: NodeId, warningKey: WarningKey}>()]
|
||||
]),
|
||||
|
||||
getWarningsBySeverity: (_warningSeverity) => { return []},
|
||||
getWarningsBySeverity: (warningSeverity) => {
|
||||
const wRegistry = get().editorWarningRegistry;
|
||||
const sIndex = get().severityIndex;
|
||||
|
||||
const warningKeys = sIndex.get(warningSeverity);
|
||||
|
||||
const warnings: EditorWarning[] = [];
|
||||
|
||||
warningKeys?.forEach(
|
||||
({nodeId, warningKey}) => {
|
||||
const warning = wRegistry.get(nodeId)?.get(warningKey);
|
||||
|
||||
if (warning) {
|
||||
warnings.push(warning);
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
return warnings;
|
||||
},
|
||||
|
||||
isProgramValid: () => { return true},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user