(total: S.NonNegativeInt)
| 43 | * Each step is separated by a 50 ms delay to simulate real async work. |
| 44 | */ |
| 45 | const makeExportStream = (total: S.NonNegativeInt): Stream.Stream<ExportEvent> => |
| 46 | Stream.concat( |
| 47 | Stream.range(1, total).pipe( |
| 48 | Stream.map((completed) => new OperationProgress({ completed: S.NonNegativeInt(completed), total })), |
| 49 | Stream.tap(() => Effect.sleep("50 millis")) |
| 50 | ), |
| 51 | Stream.make(new ExportComplete({ fileUrl: S.NonEmptyString("https://example.com/export.csv") })) |
| 52 | ) |
| 53 | |
| 54 | // --------------------------------------------------------------------------- |
| 55 | // Option A: low-level `asStreamResult` (call inside a `setup()` function) |
no test coverage detected
searching dependent graphs…