From e16fceb02f6871709c5bdde455a57942848eb8ab Mon Sep 17 00:00:00 2001 From: sinclair Date: Thu, 23 Mar 2023 18:01:24 +0900 Subject: [PATCH] Composite Evaluate --- readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index b26946d92..494f001e9 100644 --- a/readme.md +++ b/readme.md @@ -325,15 +325,15 @@ The following table lists the Standard TypeBox types. These types are fully comp │ │ │ } │ │ │ │ │ ├────────────────────────────────┼─────────────────────────────┼────────────────────────────────┤ -│ const T = Type.Composite([ │ type T = { │ const T = { │ +│ const T = Type.Composite([ │ type I = { │ const T = { │ │ Type.Object({ │ x: number │ type: 'object', │ -│ x: Type.Number() │ y: number │ required: ['x', 'y'], │ -│ }), │ } │ properties: { │ -│ Type.Object({ │ │ x: { │ +│ x: Type.Number() │ } & { │ required: ['x', 'y'], │ +│ }), │ y: number │ properties: { │ +│ Type.Object({ │ } │ x: { │ │ y: Type.Number() │ │ type: 'number' │ -│ }) │ │ }, │ -│ ]) │ │ y: { │ -│ │ │ type: 'number' │ +│ }) │ type T = { │ }, │ +│ ]) │ [K in keyof I]: I[K] │ y: { │ +│ │ } │ type: 'number' │ │ │ │ } │ │ │ │ } │ │ │ │ } │