-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Types migration #3714
Types migration #3714
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of commits from DefinitelyTyped repo are not included in this PR (commits from Feb 21 and newer are missing). Is there any way we can include those without much manual work?
Apart from that, a few things missing:
- Include
"types"
infiles
config ofpackage.json
. - Set
types
config ofpackage.json
to"./lib/index.d.ts"
: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package
Co-authored-by: Priyansh Garg <39924567+garg3133@users.noreply.github.com>
Co-authored-by: Priyansh Garg <39924567+garg3133@users.noreply.github.com>
f04af12
to
c4bb821
Compare
NightwatchComponentTestingCommands, | ||
NightwatchCustomCommands { } | ||
|
||
export interface NightwatchComponentTestingCommands { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing with @beatfactor and @swrdfish we need to see what happens if this goes in and there is a clash? Does simply override or does it error? Can we see download numbers of the version that has been released and maybe remove it there and handle fall out?
@garg3133 and @vaibhavsingh97 can you look into this for me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem at all! Plugins can override the types, so we can easily deprecate it.
* Add missing types in chrome-options. * Add example for custom-assertions. * Replace NightwatchBrowser with NightwatchAPI in globals. * Fix screenshot type. * Add section in expect types. * Add type for app global and isAppiumClient. * Partial merge of final DT PR. * Add cookie and executeScript types. * Add sessions and navigation types. * Add types for window and frame commands. * Add types for webdriver elements api. * Fix indentation in chrome-options
This PRs moves the DT types into the project and adds additional types for the new
element()
apis in v3. Also adds separate type declarations for custom assertion, custom commands, and updates page object types.TODO: