Missing Required Field in Constructor for Class A
I wouldn't expect the fields to be required in the constructor for A here:
What am I missing?
What am I missing?
class A extends S.Class<A>()({ data: S.string }) {
volatile?: number | undefined
setVolatile(x: number) { this.volatile = x }
}
class B extends S.Class<B>()({ a: A }) {}
// typescript [2741]: Property 'setVolatile' is missing in type '{ readonly data: string; }' but required in type 'A'.
const createB = (a: S.Schema.From<typeof A>) => new B({ a })