typebox 1.0.46 → 1.0.47

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.
@@ -12,5 +12,5 @@ import { type TFromIntersect } from './from-intersect.mjs';
12
12
  import { type TFromObject } from './from-object.mjs';
13
13
  import { type TFromTuple } from './from-tuple.mjs';
14
14
  import { type TFromUnion } from './from-union.mjs';
15
- export type TFromType<Type extends TSchema> = (Type extends TArray<infer Type extends TSchema> ? TFromArray<Type> : Type extends TCyclic<infer Defs extends TProperties, infer Ref extends string> ? TFromCyclic<Defs, Ref> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromIntersect<Types> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<Properties> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Types> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Types> : TObject<{}>);
15
+ export type TFromType<Type extends TSchema> = (Type extends TArray<infer Type extends TSchema> ? TFromArray<Type> : Type extends TCyclic<infer Defs extends TProperties, infer Ref extends string> ? TFromCyclic<Defs, Ref> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromIntersect<Types> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<Properties> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Types> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Types> : Type);
16
16
  export declare function FromType<Type extends TSchema>(type: Type): TFromType<Type>;
@@ -2,7 +2,7 @@
2
2
  import { IsArray } from '../../types/array.mjs';
3
3
  import { IsCyclic } from '../../types/cyclic.mjs';
4
4
  import { IsIntersect } from '../../types/intersect.mjs';
5
- import { Object, IsObject } from '../../types/object.mjs';
5
+ import { IsObject } from '../../types/object.mjs';
6
6
  import { IsTuple } from '../../types/tuple.mjs';
7
7
  import { IsUnion } from '../../types/union.mjs';
8
8
  import { FromArray } from './from-array.mjs';
@@ -18,5 +18,5 @@ export function FromType(type) {
18
18
  IsObject(type) ? FromObject(type.properties) :
19
19
  IsTuple(type) ? FromTuple(type.items) :
20
20
  IsUnion(type) ? FromUnion(type.anyOf) :
21
- Object({}));
21
+ type);
22
22
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.0.46",
4
+ "version": "1.0.47",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"