react-hook-form 7.21.1-0 → 7.21.1

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.
@@ -1,5 +1,5 @@
1
1
  import { FieldValues, InternalFieldName, Ref } from './fields';
2
- import { DeepMap, DeepPartial, LiteralUnion, UnionLike } from './utils';
2
+ import { DeepMap, DeepPartial, LiteralUnion } from './utils';
3
3
  import { RegisterOptions, ValidateResult } from './validator';
4
4
  export declare type Message = string;
5
5
  export declare type MultipleFieldErrors = {
@@ -18,5 +18,5 @@ export declare type ErrorOption = {
18
18
  type?: LiteralUnion<keyof RegisterOptions, string>;
19
19
  types?: MultipleFieldErrors;
20
20
  };
21
- export declare type FieldErrors<TFieldValues extends FieldValues = FieldValues> = DeepMap<DeepPartial<UnionLike<TFieldValues>>, FieldError>;
21
+ export declare type FieldErrors<TFieldValues extends FieldValues = FieldValues> = DeepMap<DeepPartial<TFieldValues>, FieldError>;
22
22
  export declare type InternalFieldErrors = Partial<Record<InternalFieldName, FieldError>>;
@@ -5,7 +5,7 @@ import { EventType } from './events';
5
5
  import { FieldArrayWithId } from './fieldArray';
6
6
  import { FieldRefs, FieldValue, FieldValues, InternalFieldName } from './fields';
7
7
  import { Resolver } from './resolvers';
8
- import { DeepMap, DeepPartial, FieldArrayPath, FieldPath, FieldPathValue, FieldPathValues, Noop, UnionLike } from './utils';
8
+ import { DeepMap, DeepPartial, FieldArrayPath, FieldPath, FieldPathValue, FieldPathValues, Noop } from './utils';
9
9
  import { RegisterOptions } from './validator';
10
10
  declare const $NestedValue: unique symbol;
11
11
  export declare type NestedValue<TValue extends object = object> = {
@@ -52,7 +52,7 @@ export declare type UseFormProps<TFieldValues extends FieldValues = FieldValues,
52
52
  criteriaMode: CriteriaMode;
53
53
  delayError: number;
54
54
  }>;
55
- export declare type FieldNamesMarkedBoolean<TFieldValues extends FieldValues> = DeepMap<DeepPartial<UnionLike<TFieldValues>>, true>;
55
+ export declare type FieldNamesMarkedBoolean<TFieldValues extends FieldValues> = DeepMap<DeepPartial<TFieldValues>, true>;
56
56
  export declare type FormStateProxy<TFieldValues extends FieldValues = FieldValues> = {
57
57
  isDirty: boolean;
58
58
  isValidating: boolean;
@@ -54,15 +54,4 @@ export declare type FieldArrayPathValue<TFieldValues extends FieldValues, TField
54
54
  export declare type FieldPathValues<TFieldValues extends FieldValues, TPath extends FieldPath<TFieldValues>[] | readonly FieldPath<TFieldValues>[]> = {} & {
55
55
  [K in keyof TPath]: FieldPathValue<TFieldValues, TPath[K] & FieldPath<TFieldValues>>;
56
56
  };
57
- declare type UnionKeys<T> = T extends any ? keyof T : never;
58
- declare type UnionValues<T, K> = T extends any ? K extends keyof T ? T[K] : never : never;
59
- declare type OptionalKeys<T> = T extends any ? {
60
- [K in keyof T]-?: {} extends Pick<T, K> ? K : never;
61
- }[keyof T] : never;
62
- declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
63
- export declare type UnionLike<T> = [T] extends [Date | FileList | File | NestedValue] ? T : [T] extends [ReadonlyArray<any>] ? {
64
- [K in keyof T]: UnionLike<T[K]>;
65
- } : [T] extends [object] ? PartialBy<{
66
- [K in UnionKeys<T>]: UnionLike<UnionValues<T, K>>;
67
- }, Exclude<UnionKeys<T>, keyof T> | OptionalKeys<T>> : T;
68
57
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-hook-form",
3
3
  "description": "Performant, flexible and extensible forms library for React Hooks",
4
- "version": "7.21.1-0",
4
+ "version": "7.21.1",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.mjs",
7
7
  "umd:main": "dist/index.umd.js",