Skip to content

Conversation

@impl
Copy link
Contributor

@impl impl commented Oct 13, 2022

The Resolver type was missing a constraint on one of the generics, leading to the following error if not using skipLibCheck:

node_modules/@hookform/resolvers/io-ts/dist/types.d.ts:3:177 - error TS2344: Type 'TFieldValues' does not satisfy the constraint 'FieldValues'.

3 export declare type Resolver = <T, TFieldValues, TContext>(codec: t.Decoder<FieldValues, T>) => (values: TFieldValues, _context: TContext | undefined, options: ResolverOptions<TFieldValues>) => ResolverResult<TFieldValues>;
                                                                                                                                                                                  ~~~~~~~~~~~~

  node_modules/@hookform/resolvers/io-ts/dist/types.d.ts:3:36
    3 export declare type Resolver = <T, TFieldValues, TContext>(codec: t.Decoder<FieldValues, T>) => (values: TFieldValues, _context: TContext | undefined, options: ResolverOptions<TFieldValues>) => ResolverResult<TFieldValues>;
                                         ~~~~~~~~~~~~
    This type parameter might need an `extends FieldValues` constraint.

node_modules/@hookform/resolvers/io-ts/dist/types.d.ts:3:210 - error TS2344: Type 'TFieldValues' does not satisfy the constraint 'FieldValues'.

3 export declare type Resolver = <T, TFieldValues, TContext>(codec: t.Decoder<FieldValues, T>) => (values: TFieldValues, _context: TContext | undefined, options: ResolverOptions<TFieldValues>) => ResolverResult<TFieldValues>;
                                                                                                                                                                                                                   ~~~~~~~~~~~~

  node_modules/@hookform/resolvers/io-ts/dist/types.d.ts:3:36
    3 export declare type Resolver = <T, TFieldValues, TContext>(codec: t.Decoder<FieldValues, T>) => (values: TFieldValues, _context: TContext | undefined, options: ResolverOptions<TFieldValues>) => ResolverResult<TFieldValues>;
                                         ~~~~~~~~~~~~
    This type parameter might need an `extends FieldValues` constraint.


Found 2 errors in the same file, starting at: node_modules/@hookform/resolvers/io-ts/dist/types.d.ts:3

Copy link
Member

@jorisre jorisre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you !

@jorisre jorisre merged commit 4afc03b into react-hook-form:master Oct 14, 2022
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.9.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants