Replaces key guards in a (object) schema tree partially.
The original schema type.
The replacement schema type.
The original schema.
The replacement schema tree.
The modified schema with replaced key guards.
If the schema is not a type guard or if the schema is not an object schema.
Replaces key guards in a (object) schema tree partially.