Making `myOptionalProp` Optional Without S.extend and S.partial

How can I make myOptionalProp optional in the following without using S.extend and S.partial?

const MyType = S.Struct({
  myPropA: S.String,
  myPropB: S.String,
  myPropC: S.String,
  myOptionalProp: S.propertySignature(S.String).pipe(
    S.fromKey('my-optional-prop'),
  ),
});

At the moment S.propertySignature always sets isOptional to false. It would be nice to have an S.optionalPropertySignature constructor
Was this page helpful?