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 definitions #282

Closed
diogonborges opened this issue Mar 24, 2022 · 4 comments
Closed

Type definitions #282

diogonborges opened this issue Mar 24, 2022 · 4 comments
Labels
enhancement New feature or request evaluate user request Requested by the community

Comments

@diogonborges
Copy link

diogonborges commented Mar 24, 2022

Any plans to get type definitions for xk6?

Thanks,
Diogo


Related:

@imiric
Copy link
Contributor

imiric commented Mar 25, 2022

Hi Diogo, thanks for opening this issue.

There are currently no plans to add type definitions for xk6-browser, but the team is definitely interested in adding them in the future. Note that these would be only for xk6-browser; other k6 JS extensions would have to add their own.

There are a couple of points worth discussing before tackling this:

  • Currently the extension is very much in early beta stages, and the JS API will change a lot in the upcoming months. For example, we now have the capability of using event loops in extensions, so the API will be transitioning to and using more async functionality. Having to update type definitions manually everytime the API changes is a lot of work for both maintainers and users. It might make more sense to have type definitions once the API is more stable.

  • We are having some internal discussions of going a different route and using an LSP server for both k6 and any popular extensions. This would have more benefits than just type definitions, but it's also a much larger project that we haven't even begun scoping out.

We'll discuss these topics internally over the upcoming weeks and will update this issue once we have more information to share.

@kangliep
Copy link

kangliep commented Feb 2, 2023

When this is going to be done?

I think k6 needs to make an exception for xk6-browser extension as the web browser testing is what makes k6 stands out from the others. If you need to maintain type definitions for on-going changes, it's worth making the efforts because the adaption of xk6-browser testing is going to excel.

@ka3de
Copy link
Collaborator

ka3de commented Feb 23, 2023

Hi,
As an update for this issue, we have retaken conversations around generating TS Type declarations and will start doing so soon. It will be a progressive effort starting with the more stable APIs first. You can track the progress through issue #791.

@inancgumus inancgumus added the user request Requested by the community label Mar 23, 2023
@inancgumus
Copy link
Member

Closed by #791.

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

No branches or pull requests

5 participants