Type Error: UnwrapEffect Parameter Mismatch in Type Definition

Why can't I unwrap the effect, to return the Layer?
const NodeSdkLive = EnvVars.OTLP_URL.pipe(
  E.map((url) =>
    NodeSdk.layer(() => ({
      resource: {
        serviceName: "my-server",
      },
      spanProcessor: new BatchSpanProcessor(
        new OTLPTraceExporter({
          url: url.toString(),
        }),
      ),
    }))
  ),
  L.unwrapEffect,
);
Argument of type '<A, E1, R1, E, R>(self: Effect<Layer<A, E1, R1>, E, R>) => Layer<A, E1 | E, R1 | R>' is not assignable to parameter of type '(_: Effect<Layer<Resource, never, never>, never, EnvVars>) => Layer<unknown, unknown, unknown>'.
  Types of parameters 'self' and '_' are incompatible.
    Type 'Effect<Layer<Resource, never, never>, never, EnvVars>' is not assignable to type 'Effect<Layer<unknown, unknown, unknown>, never, EnvVars>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
      Property '[LayerTypeId]' is missing in type 'Layer<Resource, never, never>' but required in type 'Layer<unknown, unknown, unknown>'.deno-ts(2345)
Layer.d.ts(63, 18): '[LayerTypeId]' is declared here.
Was this page helpful?