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

Improve TSDoc for page object's url property. #4297

Merged
merged 2 commits into from
Nov 10, 2024

Conversation

garg3133
Copy link
Member

Fixes: #3903

There is actually no issue with the type of the url property here, the issue linked above is more of a documentation issue.

By default, the url property is set to a string type here. To set it to a function type instead, the fifth type parameter of the EnhancedPageObject interface can be used:

export interface MyPage extends
  EnhancedPageObject<{}, typeof elements, {}, {}, () => string> {}

See the usage of the EnhancedPageObject interface here for reference.

@garg3133 garg3133 merged commit 3b4a800 into nightwatchjs:main Nov 10, 2024
16 of 17 checks passed
@garg3133 garg3133 deleted the fix-3903 branch November 10, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant