(packageDir: string, tempDir: string)
| 585 | onTrue: () => skipValidationIfNoBlocks(tempDir), |
| 586 | onFalse: () => typeCheckAndReportErrors(allBlocks, tempDir), |
| 587 | }); |
| 588 | |
| 589 | const collectAllCodeBlocks = |
| 590 | (packageDir: string) => |
| 591 | ( |
| 592 | markdownFiles: readonly string[] |
| 593 | ): Effect.Effect<readonly CodeBlock[], Error, FileSystem.FileSystem | Path.Path> => |
| 594 | EffectArray.reduce( |
| 595 | markdownFiles, |
| 596 | Effect.succeed([] as readonly CodeBlock[]) as Effect.Effect< |
| 597 | readonly CodeBlock[], |
| 598 | Error, |
| 599 | FileSystem.FileSystem | Path.Path |
| 600 | >, |
| 601 | (acc, file) => Effect.flatMap(acc, readAndExtractCodeBlocks(file, packageDir)) |
| 602 | ); |
no test coverage detected