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

Add TS defs for the window management API #5381

Merged
merged 2 commits into from Jul 31, 2020

Conversation

AndreyBelym
Copy link
Contributor

Add definitions for the multiwindow API. Descriptions are taken from the pending PR to the docs: #5363.

@testcafe-build-bot
Copy link
Collaborator

@@ -82,6 +82,20 @@ interface Browser {
prettyUserAgent: string;
}

type WindowSelector = unknown;

interface SwitchToWindowPredicateData {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I propose to rename this interface as SwithToWindowPredicate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SwitchToWindowPredicate is a function, this type represents its argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can use SwitchToWindowPredicateArgument instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

SwitchToWindowPredicateArgs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I tried to search the PredicateData, PredicateArgument and PredicateArgs names in https://github.com/DefinitelyTyped/DefinitelyTyped repository and I did not find such names.
The predicate data argument has a name that describes the entity passed there.

So, I propose the WindowData or WindowPartialData names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WindowData is a bit obscure. What do you think about WindowFilterData?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, let it be.

Copy link
Contributor

Choose a reason for hiding this comment

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

Args is a common way to call event arguments in .NET. For me, it looks quite good. However, I don't mind if you call it WindowFilterData. I like that we have the word Filter in the name

ts-defs-src/test-api/test-controller.d.ts Outdated Show resolved Hide resolved
@testcafe-build-bot
Copy link
Collaborator

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit 0a1547e have passed. See details:

@testcafe-build-bot
Copy link
Collaborator

@AlexKamaev AlexKamaev merged commit c864b53 into DevExpress:master Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants