json-schema-to-ts
Advanced tools
Comparing version 2.7.0-beta.1 to 2.7.0-beta.2
@@ -1,3 +0,12 @@ | ||
export declare type Compute<A> = A extends Promise<infer T> ? Promise<Compute<T>> : A extends (...args: infer P) => infer R ? (...args: Compute<P>) => Compute<R> : A extends Set<infer V> ? Set<Compute<V>> : A extends object ? { | ||
[key in keyof A]: Compute<A[key]>; | ||
} : A; | ||
import type { DoesExtend } from "./extends"; | ||
import type { If } from "./if"; | ||
import type { Key } from "./key"; | ||
export declare type Compute<A, Seen = never> = A extends Function | Error | Date | { | ||
readonly [Symbol.toStringTag]: string; | ||
} | RegExp | Generator ? A : If<DoesExtend<Seen, A>, A, A extends Array<unknown> ? A extends Array<Record<Key, unknown>> ? Array<{ | ||
[K in keyof A[number]]: Compute<A[number][K], A | Seen>; | ||
} & unknown> : A : A extends ReadonlyArray<unknown> ? A extends ReadonlyArray<Record<string | number | symbol, unknown>> ? ReadonlyArray<{ | ||
[K in keyof A[number]]: Compute<A[number][K], A | Seen>; | ||
} & unknown> : A : { | ||
[K in keyof A]: Compute<A[K], A | Seen>; | ||
} & unknown>; |
@@ -1,1 +0,1 @@ | ||
export declare type DoesExtend<A, B> = A extends B ? true : false; | ||
export declare type DoesExtend<A, B> = [A] extends [B] ? true : false; |
@@ -5,2 +5,4 @@ export type { And } from "./and"; | ||
export type { DeepGet } from "./get"; | ||
export type { If } from "./if"; | ||
export type { Key } from "./key"; | ||
export type { Join } from "./join"; | ||
@@ -7,0 +9,0 @@ export type { Narrow } from "./narrow"; |
{ | ||
"name": "json-schema-to-ts", | ||
"version": "2.7.0-beta.1", | ||
"version": "2.7.0-beta.2", | ||
"description": "Infer typescript types from your JSON schemas!", | ||
@@ -25,3 +25,3 @@ "main": "lib/cjs/index.js", | ||
"@types/json-schema": "^7.0.9", | ||
"ts-algebra": "1.2.0-beta.0" | ||
"ts-algebra": "^1.1.1" | ||
}, | ||
@@ -28,0 +28,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98378
279
1098
+ Addedts-algebra@1.2.2(transitive)
- Removedts-algebra@1.2.0-beta.0(transitive)
Updatedts-algebra@^1.1.1