MCPcopy Create free account
hub / github.com/CodeForBreakfast/eventsourcing / processAllBlocks

Function processAllBlocks

scripts/validate-markdown-examples.ts:566–570  ·  view source on GitHub ↗
(tempDir: string, _packageDir: string)

Source from the content-addressed store, hash-verified

564
565const typeCheckAndReportErrors = (allBlocks: readonly CodeBlock[], tempDir: string) => {
566 const blockCountMessage = `📝 Found ${allBlocks.length} TypeScript code blocks\n`;
567 return pipe(
568 blockCountMessage,
569 Console.log,
570 Effect.andThen(Console.log('⚙️ Type checking examples...\n')),
571 Effect.andThen(createSeparateTempFiles(allBlocks, tempDir)),
572 Effect.flatMap(runTypeCheckAndParseErrors(tempDir)),
573 Effect.flatMap(handleValidationErrors(allBlocks))

Callers 1

runValidationFunction · 0.85

Calls 2

skipValidationIfNoBlocksFunction · 0.85
typeCheckAndReportErrorsFunction · 0.85

Tested by

no test coverage detected