()
| 242 | |
| 243 | let labelBlocks; |
| 244 | const getLabelBlocks = async () => { |
| 245 | if (labelBlocks == null) { |
| 246 | labelBlocks = new Map(); |
| 247 | await allModules(async (module) => { |
| 248 | [ |
| 249 | ...( |
| 250 | await promises.readFile(`src/@types/${module}/docs.js`, UTF8) |
| 251 | ).matchAll(TYPES_DOC_BLOCKS), |
| 252 | ].forEach(([_, block, label]) => { |
| 253 | if (labelBlocks.has(label)) { |
| 254 | throw new Error(`Duplicate label '${label}' in ${module}`); |
| 255 | } |
| 256 | labelBlocks.set(label, block); |
| 257 | }); |
| 258 | }); |
| 259 | } |
| 260 | return labelBlocks; |
| 261 | }; |
| 262 | |
| 263 | const copyDefinition = async (dir, module) => { |
| 264 | const labelBlocks = await getLabelBlocks(); |
no test coverage detected
searching dependent graphs…