Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type error #641

Open
stephenomas opened this issue Oct 22, 2023 · 4 comments
Open

type error #641

stephenomas opened this issue Oct 22, 2023 · 4 comments

Comments

@stephenomas
Copy link

i keep getting this error any time i try to build my nextjs app

Failed to compile.

./node_modules/@hookform/resolvers/yup/dist/yup.d.ts:3:138
Type error: '>' expected.

1 | import * as Yup from 'yup';
2 | import { FieldValues, Resolver } from 'react-hook-form';

3 | export declare function yupResolver(schema: Yup.ObjectSchema | ReturnType<typeof Yup.lazy<Yup.ObjectSchema>>, schemaOptions?: Parameters<(typeof schema)['validate']>[1], resolverOptions?: {
| ^
4 | /**
5 | * @default async
6 | */

@EvanAgee
Copy link

EvanAgee commented Nov 3, 2023

Same here.

@jorisre
Copy link
Member

jorisre commented Dec 13, 2023

Can you provide a Codesandbox with the issue? thank you

@antonsolversio
Copy link

antonsolversio commented Dec 20, 2023

Any updates or solutions? I have same issue.

Please let me know if you found a version w/o this bug

@keithrz
Copy link

keithrz commented Jan 15, 2024

I was seeing this error in my project, and it was because I had an older version of TypeScript. I was on TS 4.2.x

It looks like the "bad" TypeScript mentioned in this issue relies on a feature added in TypeScript 4.7: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html#instantiation-expressions

After upgrading to TypeScript 4.7.4, the issue went away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants