Open stevenpetryk opened 3 years ago
In retrospect, it might be better to add it to DefinitelyTyped—that way users don't have to generate any code to stay up-to-date with the gem.
This looks like a great start. I am definitely open to a PR 👍🏽
In retrospect, it might be better to add it to DefinitelyTyped—that way users don't have to generate any code to stay up-to-date with the gem.
That leads to a good question if we should have the javascript portion, the custom commands inside of its own NPM module that way it is always up-to-date and users don't need to regenerate the assets.
Yes, after some discussion, that is part of the idea for Version 2 https://github.com/shakacode/cypress-on-rails/issues/24#issuecomment-610762755 Finding the time to do it is another question 😄
Howdy, would you be open to giving the generator the ability to generate TypeScript declarations in addition to the JS code it already generates? It would be handy because it would give some editors autocomplete when typing things like
cy.appFactories
.Could be something opt-in like this:
I've taken a stab at making some basic types. I could work on it more and add them as a PR, if you're interested. If not, I can just add them to the DefinitelyTyped repository (so people can do
yarn add --dev @types/cypress-on-rails
to get the types).Like I said, definitely incomplete—but for example this lets me use some factory bot things.