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

Replace many Thenable interfaces with PromiseLike #17251

Closed
ghost opened this issue Jun 16, 2017 · 7 comments
Closed

Replace many Thenable interfaces with PromiseLike #17251

ghost opened this issue Jun 16, 2017 · 7 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jun 16, 2017

The following packages define a Thenable interface:

Can these all be replaced with PromiseLike?

@ghost ghost assigned rbuckton Jun 16, 2017
@leonard-thieu
Copy link
Contributor

Thenable can be replaced in jquery. I defined it as an alias to PromiseLike to match jQuery's documentation.

Can I ask what's the motivation behind changing it?

@ghost
Copy link
Author

ghost commented Jun 16, 2017

Mostly just for deduplication. But we also want to avoid incorrectly authored interfaces, and correctly writing PromiseLike is harder than it looks.

@leonard-thieu
Copy link
Contributor

leonard-thieu commented Jun 16, 2017

correctly writing PromiseLike is harder than it looks.

True. I experienced that first-hand trying to write jqXHR and Deferred for jquery (both are Promise-like interfaces). I'm still not sure they're 100% correct.

@leonard-thieu
Copy link
Contributor

Related #10892

vuorinem added a commit to vuorinem/DefinitelyTyped that referenced this issue Jul 22, 2017
@Martin-Luft
Copy link

Is the issue SeleniumHQ/selenium#4391 related to this issue?

ghost pushed a commit that referenced this issue Aug 9, 2017
* [hellojs] Add/modify tests for latest version

* [hellojs] Update definition to latest version

Modify interfaces to reflect version 1.15.1 codebase.
Add definition for hello.util.
Simplify thenable definition.

* [hellojs] Add missing method definition

Include api() definition when calling with options object.

* [hellojs] Add tslint.json and fix linting errors

* [hellojs] Use TypeScript 2.3

Set TypeScript version to 2.3 to avoid errors with object-type.

* [hellojs] Switch to PromiseLike

#17251

* [hellojs] Remove unused interface

* [hellojs] Rename namespace and add export

Add default export for static hello-object.
Rename namespace to hello so that the namespace as well as the hello-object will be exported.

* [hellojs] Remove redundant 'export' keyword
@taybin
Copy link
Contributor

taybin commented Jun 12, 2019

PR for highland here: #36140

@orta
Copy link
Collaborator

orta commented Jun 7, 2021

Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the @types modules in DefinitelyTyped.

To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the definitely-typed channel.

@orta orta closed this as completed Jun 7, 2021
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

No branches or pull requests

5 participants