TypeScript error due to incompatible 'annotations' property in schema extension

how could this resolve to incompatible "annotations" prop?
https://effect.website/play#13f8901b22e6
import { Schema as S } from "effect";

const withB = <Fields extends S.Struct.Fields, S extends S.Struct<Fields>>(s: S) => {
  return S.extend(s, S.Struct({ b: S.String }));
};

const A = S.Struct({ b: S.String });
const B = withB(A);
// src/main.ts(8,17): error TS2345: Argument of type 'Struct<{ b: typeof String$; }>' is not assignable to parameter of type 'Struct<Fields>'.
// Types of property 'annotations' are incompatible.

console.log(B.make({
  a: "a",
  b: "b"
}))
Was this page helpful?