mirror of
https://github.com/zoriya/typebox.git
synced 2026-06-02 02:55:05 +00:00
Composite Evaluate
This commit is contained in:
+2
-2
@@ -32,7 +32,7 @@ As such, 0.26.2 reverts back to the 0.25.0 interpretation, but applies type mapp
|
||||
{ // evaluation case 4: all optional
|
||||
type T = { a?: number } & { a?: number }
|
||||
|
||||
type C = {[K in keyof T]: T[K] } // type C = { a: number | undefined }
|
||||
type C = {[K in keyof T]: T[K] } // type C = { a?: number | undefined }
|
||||
}
|
||||
```
|
||||
Note: the Type.Composite is intended to be a temporary type which can be replaced with a more general `Type.Mapped` in future revisions of TypeBox. As the infrastructure to support mapped types does not exist, users can use Type.Composite to partially replicate mapped type evaluation for composited object types only.
|
||||
Note: the Type.Composite is intended to be a temporary type which can be replaced with a more general `Type.Mapped` in future revisions of TypeBox. As the infrastructure to support mapped types does not exist, users can use Type.Composite to partially replicate mapped type evaluation for composited object types only.
|
||||
|
||||
Reference in New Issue
Block a user