Make path in keyof T required in SchemaDefinition if T is supplied #14872
Labels
discussion
If you have any thoughts or comments on this issue, please share them!
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
new feature
This change adds new functionality, like a new method or class
Prerequisites
🚀 Feature Proposal
In
instead of just forcing the possible keys (as
path in keyof T
), let them be required (remove?
at[path in keyof T]?:
), or at least provide an option to toggle it being strict or not.Motivation
At the moment when defining a
Schema
, and supplying the first generic to it (RawDocType
), it doesn't complain if I miss some keys from the defined type, which is not ideal.Example
The text was updated successfully, but these errors were encountered: