Using Generics with Effect.Service in TypeScript

hi, i saw that we can accept parameter in Effect.Serivce now, i was thinking if we could add generic or not

class SomeService extends Effect.Service<SomeService>()(
  "SomeService",
  {
    // You can now pass a function to the `effect` and `scoped` constructors
    effect: Effect.fn(function* <T>(input: T) {
      return {
        get: Effect.succeed(input)
      } as const
    })
  }
) {}


i tried the following, but T is always unknown
Was this page helpful?