Error when using Effect.service with Test2 class

Playing with the new'ish Effect.Service: https://effect.website/play/#a75ea24684aa what am I doing wrong?
import { Effect } from "effect"

export class Test2 extends Effect.Service<Test2>()("app/Test2", {
  effect: Effect.gen(function*() {
    return { value: () => "test" }
  })
}) {}

// (FiberFailure) TypeError: Cannot read properties of undefined (reading 'value')
Effect.void.pipe(
  Effect.tap(() => Test2.Service.value()),
  Effect.provide(Test2.Default),
  Effect.runSync
)
Was this page helpful?