Ids
The ids the framework makes up: the correlation of a command run outside any causation, and of a saga started outside one. They are random UUIDs, and a test that compares them provides a generator of its own:
program.pipe(Effect.provideService(Ids.IdGenerator, Ids.sequential("id")))Variables
Section titled “Variables”IdGenerator
Section titled “IdGenerator”
constIdGenerator:Reference<() =>string>
Defined in: src/Ids.ts:15
Makes a new id each time it is called. Defaults to crypto.randomUUID().
constnext:Effect.Effect<string>
Defined in: src/Ids.ts:20
A new id from the current generator.
Functions
Section titled “Functions”sequential()
Section titled “sequential()”sequential(
prefix?): () =>string
Defined in: src/Ids.ts:23
A generator of id-1, id-2 and so on, for tests. Each call starts its own count.
Parameters
Section titled “Parameters”prefix?
Section titled “prefix?”string = "id"
Returns
Section titled “Returns”() => string