-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improve types to understand arrays of arrays #2
Comments
Proposition to solve : Improve types to understand arrays of arrays bahmutov#2 [2, 'bar'] ])('title', (a, b) => { // a should be a number // b should be a string })
@bahmutov Hi Gleb, is any chance to merge this fix? Or introduce |
I added an example spec showing the problem. The solution in https://github.com/lastType/cypress-each/pull/1/files solves type check in that example, but breaks every other spec :( if you run |
@bahmutov maybe it is because the simple typo ?
instead of
|
I've tried to apply that change and:
Applied all other changes suggested, and removed |
Mind opening a pr with the fix?Sent from my iPhoneOn Apr 25, 2023, at 08:53, Igor Dlugosh ***@***.***> wrote:
I've tried to apply that change and:
just added new type.
type TestCallback4<T extends readonly any[]> = T extends []
? (this: Context, arg1: any, arg2: any) => void
: Parameters<(...res: [...T, any, any]) => void> extends [...infer R]
? R extends readonly [...T, any, any]
? (this: Context, ...res: [...R]) => void
: never
: never
Applied all other changes suggested, and removed cypress/**/*.js file from type check (why the *.js file should be there?) and it is working as expected :)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Created #75 |
done |
The text was updated successfully, but these errors were encountered: