runcheck 0.34.1 → 0.34.2

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.
@@ -109,11 +109,9 @@ type Prettify<T> = T extends Record<string, any> ? {
109
109
  [K in keyof T]: Prettify<T[K]>;
110
110
  } : T;
111
111
  type RcPrettyInferType<T extends RcType<any>> = Prettify<RcInferType<T>>;
112
- type TypeToRcType<T> = [T] extends [
113
- string | number | boolean | undefined | null | any[]
114
- ] ? RcType<T> : {
112
+ type TypeToRcType<T> = [T] extends [any[]] ? RcType<T> : [T] extends [Record<string, any>] ? {
115
113
  [K in keyof T]-?: TypeToRcType<T[K]>;
116
- };
114
+ } : RcType<T>;
117
115
  declare function rc_obj_builder<T extends Record<string, any>>(): <S extends TypeToRcType<T>>(schema: { [K in keyof S]: K extends keyof T ? S[K] : never; }) => RcObjType<T>;
118
116
 
119
117
  export { RcInferType, RcParseResult, RcParser, RcPrettyInferType, RcType, rc_any, rc_array, rc_assert_is_valid, rc_boolean, rc_date, rc_extends_obj, rc_get_obj_schema, rc_instanceof, rc_is_valid, rc_literals, rc_loose_array, rc_loose_parse, rc_loose_record, rc_null, rc_number, rc_obj_builder, rc_obj_intersection, rc_obj_omit, rc_obj_pick, rc_object, rc_parse, rc_parse_json, rc_parser, rc_record, rc_recursive, rc_rename_from_key, rc_rename_key, rc_strict_obj, rc_string, rc_transform, rc_tuple, rc_undefined, rc_union, rc_unknown, rc_validator };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "runcheck",
3
3
  "description": "A tiny (less than 2 KiB Gzipped) and treeshakable! lib for typescript runtime type checks with autofix support",
4
- "version": "0.34.1",
4
+ "version": "0.34.2",
5
5
  "license": "MIT",
6
6
  "scripts": {
7
7
  "test": "vitest --ui",