Skip to content

Commit

Permalink
fix: export type
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarvspr committed Oct 28, 2022
1 parent d3b1511 commit 65023bc
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions types/FluentJSONSchema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ type FORMATS = {
DATE_TIME: "date-time";
};

type JSONSchema =
| s.ObjectSchema
| s.StringSchema
| s.NumberSchema
| s.ArraySchema
| s.IntegerSchema
| s.BooleanSchema
| s.NullSchema
| ExtendedSchema;



type ExtendedSchema = Pick<s.ObjectSchema, "isFluentSchema" | "extend">;

type InferSchemaMap = {
Expand Down Expand Up @@ -118,8 +106,8 @@ type MixedSchema<T> =

type Key<T> = keyof T | (string & {});

type DependentSchemaOptions<T extends Partial<Record<string, JSONSchema>>> =
Partial<Record<keyof T, JSONSchema>>;
type DependentSchemaOptions<T extends Partial<Record<string, s.JSONSchema>>> =
Partial<Record<keyof T, s.JSONSchema>>;

type DependentRequiredOptions<T extends Partial<Record<string, string[]>>> =
Partial<Record<keyof T, string[]>>;
Expand All @@ -131,6 +119,16 @@ declare namespace s {
name: string;
}

export type JSONSchema =
| ObjectSchema
| StringSchema
| NumberSchema
| ArraySchema
| IntegerSchema
| BooleanSchema
| NullSchema
| ExtendedSchema;

export interface BaseSchema<T> {
id: (id: string) => T;
title: (title: string) => T;
Expand Down

0 comments on commit 65023bc

Please sign in to comment.