@sinclair/typebox 0.24.49 → 0.24.50

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 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.24.49",
3
+ "version": "0.24.50",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
package/typebox.d.ts CHANGED
@@ -178,15 +178,15 @@ export interface TProperties {
178
178
  export declare type ObjectProperties<T> = T extends TObject<infer U> ? U : never;
179
179
  export declare type ObjectPropertyKeys<T> = T extends TObject<infer U> ? keyof U : never;
180
180
  export declare type TAdditionalProperties = undefined | TSchema | boolean;
181
- export interface ObjectOptions<A extends TAdditionalProperties = undefined> extends SchemaOptions {
182
- additionalProperties?: A;
181
+ export interface ObjectOptions extends SchemaOptions {
182
+ additionalProperties?: TAdditionalProperties;
183
183
  minProperties?: number;
184
184
  maxProperties?: number;
185
185
  }
186
- export interface TObject<T extends TProperties = TProperties, A extends TAdditionalProperties = undefined> extends TSchema, ObjectOptions<A> {
186
+ export interface TObject<T extends TProperties = TProperties> extends TSchema, ObjectOptions {
187
187
  [Kind]: 'Object';
188
- static: A extends TSchema ? PropertiesReduce<T, this['params']> & Record<string, Static<A, ['params']>> : PropertiesReduce<T, this['params']>;
189
- additionalProperties?: A;
188
+ static: PropertiesReduce<T, this['params']>;
189
+ additionalProperties?: TAdditionalProperties;
190
190
  type: 'object';
191
191
  properties: T;
192
192
  required?: string[];
@@ -351,7 +351,7 @@ export declare class TypeBuilder {
351
351
  /** Creates a number type */
352
352
  Number(options?: NumericOptions): TNumber;
353
353
  /** Creates an object type with the given properties */
354
- Object<T extends TProperties, A extends TAdditionalProperties = undefined>(properties: T, options?: ObjectOptions<A>): TObject<T, A>;
354
+ Object<T extends TProperties>(properties: T, options?: ObjectOptions): TObject<T>;
355
355
  /** Creates a new object whose properties are omitted from the given object */
356
356
  Omit<T extends TObject, K extends TUnion<TLiteral<string>[]>>(schema: T, keys: K, options?: ObjectOptions): TOmit<T, UnionStringLiteralToTuple<K>>;
357
357
  /** Creates a new object whose properties are omitted from the given object */