Skip to content

Commit 2820148

Browse files
author
ThomasAribart
committed
v2.8.2 release
1 parent e20ee01 commit 2820148

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

builds/deno/index.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ declare type UnextendJSONSchema7Tuple<E extends JSONSchema7Extension, S extends
7575
declare type UnextendJSONSchema7Record<E extends JSONSchema7Extension, S extends Record<string, unknown>> = {
7676
[key in keyof S]: S[key] extends ExtendedJSONSchema7$1<E> ? UnextendJSONSchema7<E, S[key]> : S[key];
7777
};
78-
declare type UnextendJSONSchema7<E extends JSONSchema7Extension, S extends ExtendedJSONSchema7$1<E>> = S extends boolean ? S : {
78+
declare type UnextendJSONSchema7<E extends JSONSchema7Extension, S> = S extends boolean ? S : {
7979
[key in $JSONSchema7 | keyof S]: key extends keyof S ? S extends {
8080
[k in key]: ExtendedJSONSchema7$1<E>;
8181
} ? UnextendJSONSchema7<E, S[key]> : S extends {
@@ -106,8 +106,6 @@ declare type FromSchemaDefaultOptions = {
106106

107107
declare type And<A, B> = A extends true ? B extends true ? true : false : false;
108108

109-
declare type Cast<A, B> = A extends B ? A : never;
110-
111109
declare type DoesExtend<A, B> = [A] extends [B] ? true : false;
112110

113111
declare type If<B extends boolean, T, E = never> = B extends true ? T : E;
@@ -383,6 +381,6 @@ declare type ExtendedJSONSchema7Reference<E extends JSONSchema7Extension> = Exte
383381
declare type JSONSchema = JSONSchema7;
384382
declare type ExtendedJSONSchema<E extends JSONSchema7Extension> = ExtendedJSONSchema7<E>;
385383
declare type FromSchema<S extends JSONSchema, Opt extends FromSchemaOptions = FromSchemaDefaultOptions, W extends JSONSchema7$1 = S extends Record<string | number | symbol, unknown> ? DeepWritable<S> : S> = M.$Resolve<ParseSchema<W, ParseOptions<W, Opt>>>;
386-
declare type FromExtendedSchema<E extends JSONSchema7Extension, S extends ExtendedJSONSchema<E>, Opt extends FromExtendedSchemaOptions<E> = FromSchemaDefaultOptions, W extends ExtendedJSONSchema7$1<E> = Cast<S extends Record<string | number | symbol, unknown> ? DeepWritable<S> : S, ExtendedJSONSchema7$1<E>>> = FromSchema<Cast<UnextendJSONSchema7<E, W>, JSONSchema>, Opt>;
384+
declare type FromExtendedSchema<E extends JSONSchema7Extension, S extends ExtendedJSONSchema<E>, Opt extends FromExtendedSchemaOptions<E> = FromSchemaDefaultOptions, U = UnextendJSONSchema7<E, S>> = U extends JSONSchema ? FromSchema<U, Opt> : never;
387385

388386
export { $Compiler, $Validator, Compiler, DeserializationPattern, ExtendedJSONSchema, ExtendedJSONSchema7, ExtendedJSONSchema7Reference, FromExtendedSchema, FromExtendedSchemaOptions, FromSchema, FromSchemaDefaultOptions, FromSchemaOptions, JSONSchema, JSONSchema7, JSONSchema7Extension, JSONSchema7Reference, Validator, asConst, wrapCompilerAsTypeGuard, wrapValidatorAsTypeGuard };

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-schema-to-ts",
3-
"version": "2.8.1",
3+
"version": "2.8.2",
44
"description": "Infer typescript types from your JSON schemas!",
55
"main": "lib/cjs/index.js",
66
"module": "lib/esm/index.js",

0 commit comments

Comments
 (0)