You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The meta and bsonSchema instance properties are immutable, as are schemas in general. The types. however, do not correctly reflect the mutability of everything. The desired behavior is as follows:
meta and bsonSchema properties are readonly, as are all nested properties
attempting to set meta or bsonSchema, or assign to any nested property, should be prevented by TypeScript
The parse result types inferred by B.Type should NOT be readonly
An object schema built from another object schema's meta.shape property should behave and be typed just like a default instance of the original schema
There should be as few readonly or Readonly<> repetitions in the tooltip as is necessary to achieve the above goals
It may be necessary to create Meta and BsonSchema classes to achieve this in a way that is both type-safe and ergonomic.
The text was updated successfully, but these errors were encountered:
The
meta
andbsonSchema
instance properties are immutable, as are schemas in general. The types. however, do not correctly reflect the mutability of everything. The desired behavior is as follows:meta
andbsonSchema
properties are readonly, as are all nested propertiesmeta
orbsonSchema
, or assign to any nested property, should be prevented by TypeScriptB.Type
should NOT be readonlymeta.shape
property should behave and be typed just like a default instance of the original schemareadonly
orReadonly<>
repetitions in the tooltip as is necessary to achieve the above goalsIt may be necessary to create
Meta
andBsonSchema
classes to achieve this in a way that is both type-safe and ergonomic.The text was updated successfully, but these errors were encountered: