Comments (7)
@bahmutov Hi Gleb, is any chance to merge this fix? Or introduce types
? Thanks in advance
from cypress-each.
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 npm run lint
.
from cypress-each.
@bahmutov maybe it is because the simple typo ?
(this:Contexte,arg1:any,arg2:any)
instead of
(this:Context,arg1:any,arg2:any)
Context
without e
from cypress-each.
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 :)
from cypress-each.
from cypress-each.
Created #75
from cypress-each.
done
from cypress-each.
Related Issues (20)
- Add helper for splitting a list of items HOT 2
- unable to use it.only or it.skip or cypress-grep tags with the .each HOT 2
- Webpack Compilation Error on Cypress 13 HOT 1
- is it working with cypress-grep?! HOT 1
- Pass the item's index into the callback function HOT 1
- Add %N as the formatter for the number of items HOT 1
- Dependency Dashboard
- Problem with dynamically specifying array for each HOT 1
- use context as an alias to describe HOT 1
- Add special placeholder for the iteration index K HOT 1
- Preserve the test callback context HOT 1
- allow test title to use positional elements HOT 1
- Allow a single object with label key and value for tests HOT 1
- Can we make it pass the types correctly for the single object HOT 1
- Only compatible with webpack
- Read from array of objects HOT 1
- string title function with array of arrays
- Allow test title to be a function HOT 1
- Can functionality be added to work with tags
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-each.