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

Update tap to async for k6 browser module #36

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

inancgumus
Copy link
Member

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

Copy link

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type definition change looks good. The tests need to be updated so that they return a promise:

e.g. from this:

// $ExpectType void
elementHandle.tap();

to:

// $ExpectType Promise<void>
elementHandle.tap();

@inancgumus inancgumus requested a review from ankur22 April 24, 2024 10:21
@inancgumus
Copy link
Member Author

The tests need to be updated so that they return a promise

That's right 🤦 Thanks!

Copy link

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@inancgumus inancgumus merged commit 5c55e74 into browser-async Apr 24, 2024
@inancgumus inancgumus deleted the browser/async/tap branch May 2, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants