Skip to content

Commit

Permalink
fix: pr issues about spaces and {} type
Browse files Browse the repository at this point in the history
  • Loading branch information
g4rcez committed Oct 18, 2022
1 parent f33522f commit 0d55c77
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions types/FluentJSONSchema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ export interface ArraySchema extends BaseSchema<ArraySchema> {
maxItems: (max: number) => ArraySchema
}


export interface ObjectSchema<T extends Record<string, never> = Record<string, never>> extends BaseSchema<ObjectSchema<T>> {
export interface ObjectSchema<T extends Record<string, any> = Record<string, any>> extends BaseSchema<ObjectSchema<T>> {
definition: (name: Key<T>, props?: JSONSchema) => ObjectSchema<T>
prop: (name: Key<T>, props?: JSONSchema) => ObjectSchema<T>
additionalProperties: (value: JSONSchema | boolean) => ObjectSchema<T>
Expand Down Expand Up @@ -231,13 +230,15 @@ type DependentRequiredOptions<T extends Partial<Record<string, string[]>>> = Par

export function withOptions<T>(options: SchemaOptions): T

type ObjectPlaceholder = Record<string | number | symbol, any>;

export interface S extends BaseSchema<S> {
string: () => StringSchema
number: () => NumberSchema
integer: () => IntegerSchema
boolean: () => BooleanSchema
array: () => ArraySchema
object: <T extends {} = {}>() => ObjectSchema<T>
object: <T extends ObjectPlaceholder = ObjectPlaceholder>() => ObjectSchema<T>
null: () => NullSchema
mixed: <
T extends
Expand Down

0 comments on commit 0d55c77

Please sign in to comment.