Composite Evaluate

This commit is contained in:
sinclairzx81
2023-03-24 07:18:57 +09:00
committed by GitHub
parent e16fceb02f
commit 4ae9125b55
+2 -2
View File
@@ -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.