@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.
- package/package.json +1 -1
- package/typebox.d.ts +6 -6
package/package.json
CHANGED
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
|
|
182
|
-
additionalProperties?:
|
|
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
|
|
186
|
+
export interface TObject<T extends TProperties = TProperties> extends TSchema, ObjectOptions {
|
|
187
187
|
[Kind]: 'Object';
|
|
188
|
-
static:
|
|
189
|
-
additionalProperties?:
|
|
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
|
|
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 */
|