@sinclair/typebox 0.24.44 → 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 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.24.44",
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,6 +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: {
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
+ };
198
201
  }
199
202
  export declare type TPick<T extends TObject, Properties extends ObjectPropertyKeys<T>[]> = TObject<{
200
203
  [K in Properties[number]]: T['properties'][K];
@@ -231,6 +234,9 @@ export interface TRef<T extends TSchema = TSchema> extends TSchema {
231
234
  }
232
235
  export interface TRequired<T extends TObject | TRef<TObject>> extends TObject {
233
236
  static: Required<Static<T, this['params']>>;
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
+ };
234
240
  }
235
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';
236
242
  export interface StringOptions<Format extends string> extends SchemaOptions {