import { Effect } from "effect"
const myfunc = Effect.fn("myspan")(function* <N extends number>(n: N) {
yield* Effect.annotateCurrentSpan("n", n)
console.log(`got: ${n}`)
yield* Effect.fail(new Error("Boom!"))
})
// Without examples, I would have expected this:
Effect.fn({ span: "myspan", gen: function*() {} })
import { Effect } from "effect"
const myfunc = Effect.fn("myspan")(function* <N extends number>(n: N) {
yield* Effect.annotateCurrentSpan("n", n)
console.log(`got: ${n}`)
yield* Effect.fail(new Error("Boom!"))
})
// Without examples, I would have expected this:
Effect.fn({ span: "myspan", gen: function*() {} })