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
Conversation
❌ Tests for the commit 80822fc have failed. See details: |
@@ -82,6 +82,20 @@ interface Browser { | |||
prettyUserAgent: string; | |||
} | |||
|
|||
type WindowSelector = unknown; | |||
|
|||
interface SwitchToWindowPredicateData { |
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.
I propose to rename this interface as SwithToWindowPredicate
.
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.
SwitchToWindowPredicate
is a function, this type represents its argument.
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.
We can use SwitchToWindowPredicateArgument
instead.
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.
SwitchToWindowPredicateArgs?
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.
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.
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.
Args
in different forms used in DefinitelyTyped:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5344bfc80508c53a23dae37b860fb0c905ff7b24/types/wampy/index.d.ts#L15
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.
WindowData
is a bit obscure. What do you think about WindowFilterData
?
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.
Ok, let it be.
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.
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
✅ Tests for the commit 80822fc have passed. See details: |
✅ Tests for the commit 0a1547e have passed. See details: |
✅ Tests for the commit 0a1547e have passed. See details: |
Add definitions for the multiwindow API. Descriptions are taken from the pending PR to the docs: #5363.