Package: effect
Module: Console
Logs and increments the counter associated with label, using the console’s default counter when no label is provided.
Example (Counting repeated calls)
import { Console, Effect } from "effect"
const program = Effect.gen(function*() {
yield* Console.count("my-counter")
yield* Console.count("my-counter") // Will show: my-counter: 2
yield* Console.count() // Default counter
})
Signature
declare const count: (label?: string) => Effect.Effect<void>
Since v2.0.0