Answer the stability review: guard the argument lookup, and correct the claims the split made false
CI / gate (push) Successful in 5s

This commit is contained in:
2026-08-27 22:50:55 +02:00
parent 559922e327
commit 48dcdeccea
5 changed files with 14 additions and 13 deletions
+8 -6
View File
@@ -1,11 +1,13 @@
import type { BlockType } from '../adf/block-directives.ts'
const blockArguments: Readonly<Record<string, string>> = {
blockTaskItem: 'state',
panel: 'panelType',
taskItem: 'state',
} satisfies Partial<Record<BlockType, string>>
const argumentByType = new Map(
Object.entries({
blockTaskItem: 'state',
panel: 'panelType',
taskItem: 'state',
} satisfies Partial<Record<BlockType, string>>),
)
export function blockArgument(type: string): string | undefined {
return blockArguments[type]
return argumentByType.get(type)
}