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

Feature: preserve arg types in call-step-from-step functions #243

Open
jcamden opened this issue Nov 13, 2024 · 1 comment
Open

Feature: preserve arg types in call-step-from-step functions #243

jcamden opened this issue Nov 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jcamden
Copy link

jcamden commented Nov 13, 2024

Hey, thanks for this awesome package. It has been a game-changer for our testing strategy. Anyway,

The problem
We regularly call step from step. However, we recently had a type error slip through on account of the fact that the keyword functions (from createBDD) do not preserve the arg types of the function which they receive. For instance, here is the type for the example from the docs:

Screenshot 2024-11-13 at 9 44 03 AM

We are hoping that the ...args: any[] could be improved.

A solution
We can work around it by extracting that function out to a separate assignment, but this is not ideal. There may also be better ways to work around it; but I thought I'd inquire about whether it might be possible to preserve those types from playwright-bdd's side. Any chance you'd check it out? We really appreciate you!

@jcamden jcamden added the enhancement New feature or request label Nov 13, 2024
@vitalets
Copy link
Owner

Hey @jcamden
Yes, it definitely should keep step function signature. I will take a look.

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

No branches or pull requests

2 participants