Description
See reference and spec.
Currently, for the following schema:
{
"type": "object",
"unevaluatedProperties": {
"type": "string"
}
}
The library will output a Record<string, never>.
Proposal
Instead, at minimum it should function like additionalProperties and output something like a BaseObjectType & Record<string, UnevaluatedPropertyType>.
Perhaps more accurately, it might be something like an ExclusifyUnion<BaseObjectType> & UnevaluatedPropertyType (using type-fest), because the unevaluated properties only apply to keys not present on any of the possible values of BaseType (the Record by itself will overwrite keys that any of the types don't have).
Here's a TS Playground explaining what I mean.
Extra
Description
See reference and spec.
Currently, for the following schema:
{ "type": "object", "unevaluatedProperties": { "type": "string" } }The library will output a
Record<string, never>.Proposal
Instead, at minimum it should function like
additionalPropertiesand output something like aBaseObjectType & Record<string, UnevaluatedPropertyType>.Perhaps more accurately, it might be something like an
ExclusifyUnion<BaseObjectType> & UnevaluatedPropertyType(using type-fest), because the unevaluated properties only apply to keys not present on any of the possible values ofBaseType(theRecordby itself will overwrite keys that any of the types don't have).Here's a TS Playground explaining what I mean.
Extra