@sinclair/typebox 0.24.45 → 0.24.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/typebox.d.ts +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.24.45",
3
+ "version": "0.24.46",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
package/typebox.d.ts CHANGED
@@ -195,7 +195,9 @@ export interface TOmit<T extends TObject, Properties extends ObjectPropertyKeys<
195
195
  }
196
196
  export interface TPartial<T extends TObject> extends TObject {
197
197
  static: Partial<Static<T, this['params']>>;
198
- properties: T['properties'];
198
+ properties: {
199
+ [K in keyof T['properties']]: T['properties'][K] extends TReadonlyOptional<infer U> ? TReadonlyOptional<U> : T['properties'][K] extends TReadonly<infer U> ? TReadonlyOptional<U> : T['properties'][K] extends TOptional<infer U> ? TOptional<U> : TOptional<T['properties'][K]>;
200
+ };
199
201
  }
200
202
  export declare type TPick<T extends TObject, Properties extends ObjectPropertyKeys<T>[]> = TObject<{
201
203
  [K in Properties[number]]: T['properties'][K];
@@ -232,7 +234,9 @@ export interface TRef<T extends TSchema = TSchema> extends TSchema {
232
234
  }
233
235
  export interface TRequired<T extends TObject | TRef<TObject>> extends TObject {
234
236
  static: Required<Static<T, this['params']>>;
235
- properties: T['properties'];
237
+ properties: {
238
+ [K in keyof T['properties']]: T['properties'][K] extends TReadonlyOptional<infer U> ? TReadonly<U> : T['properties'][K] extends TReadonly<infer U> ? TReadonly<U> : T['properties'][K] extends TOptional<infer U> ? U : T['properties'][K];
239
+ };
236
240
  }
237
241
  export declare type StringFormatOption = 'date-time' | 'time' | 'date' | 'email' | 'idn-email' | 'hostname' | 'idn-hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'iri' | 'uuid' | 'iri-reference' | 'uri-template' | 'json-pointer' | 'relative-json-pointer' | 'regex';
238
242
  export interface StringOptions<Format extends string> extends SchemaOptions {