Type errors after updating dependencies in your Effect app using `effect-http` and `@effect/schem...

I have an existing effect app that i haven't updated much since writing. It recently started throwing type errors (it uses effect-http which i understan is deprecated now).

My main issue is it seems effect-http is throwing errors like so:

  src/endpoints/custom-html.endpoint.ts(26,26): error TS2345: Argument of type 'Struct<{ envid: typeof String$; connectionid: typeof String$; }>' is not assignable to parameter of type 'Schema<unknown, Readonly<Record<string, string | undefined>>, unknown>'.
        Type 'Struct<{ envid: typeof String$; connectionid: typeof String$; }>' is missing the following properties from type 'Schema<unknown, Readonly<Record<string, string | undefined>>, unknown>': Context, [TypeId]
      src/endpoints/custom-html.endpoint.ts(27,27): error TS2345: Argument of type 'Struct<{ acr_values: typeof String$; }>' is not assignable to parameter of type 'Schema<unknown, Readonly<Record<string, string | readonly string[] | undefined>>, unknown>'.


That code looks like

Api.setRequestPath(PingOnePathParams),
      Api.setRequestQuery(PingOneRequestQuery),


and these arguments are defined

const PingOnePathParams = Schema.Struct({ envid: Schema.String, connectionid: Schema.String });

const ProtectSDKRequestFormData = Schema.Struct({
  value: Schema.Struct({
    protectsdk: Schema.String,
  }),
});


I tried updating @effect/schema and effect-http, i'm not sure whats randomly causing this to now throw.

I did update some vitest deps, including effect/vitest but i'm confused as to why this is now wrong? Did the api completely change?
Was this page helpful?