(type: string)
| 103 | * versioned lookup falls back to the stripped base. |
| 104 | */ |
| 105 | export function getBlockMeta(type: string): BlockMeta | undefined { |
| 106 | const normalized = normalizeType(type) |
| 107 | return ( |
| 108 | BLOCK_META_REGISTRY[type] ?? |
| 109 | BLOCK_META_REGISTRY[normalized] ?? |
| 110 | BLOCK_META_REGISTRY[stripVersionSuffix(normalized)] |
| 111 | ) |
| 112 | } |
| 113 | |
| 114 | /** All block metas keyed by block type. */ |
| 115 | export function getAllBlockMeta(): Record<string, BlockMeta> { |
no test coverage detected