-
Notifications
You must be signed in to change notification settings - Fork 30.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
Add promise.any #53498
Add promise.any #53498
Conversation
@AverageHelper Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsThis PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged. You can test the changes in this PR in the Playground. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 53498,
"author": "AverageHelper",
"headCommitOid": "9f479681a54248fbf462ed438ad0d9fc080813ab",
"lastPushDate": "2021-05-29T16:48:51.000Z",
"lastActivityDate": "2021-05-30T18:29:21.000Z",
"mergeOfferDate": "2021-05-30T18:29:07.000Z",
"mergeRequestDate": "2021-05-30T18:29:21.000Z",
"mergeRequestUser": "AverageHelper",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "promise.any",
"kind": "add",
"files": [
{
"path": "types/promise.any/OTHER_FILES.txt",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-other_filestxt)"
},
{
"path": "types/promise.any/auto.d.ts",
"kind": "definition"
},
{
"path": "types/promise.any/implementation.d.ts",
"kind": "definition"
},
{
"path": "types/promise.any/index.d.ts",
"kind": "definition"
},
{
"path": "types/promise.any/polyfill.d.ts",
"kind": "definition"
},
{
"path": "types/promise.any/promise.any-tests.ts",
"kind": "test"
},
{
"path": "types/promise.any/requirePromise.d.ts",
"kind": "definition"
},
{
"path": "types/promise.any/shim.d.ts",
"kind": "definition"
},
{
"path": "types/promise.any/tsconfig.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) (check: `compilerOptions.lib.1`)"
},
{
"path": "types/promise.any/tslint.json",
"kind": "package-meta-ok"
}
],
"owners": [],
"addedOwners": [
"AverageHelper"
],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "peterblazejewicz",
"date": "2021-05-30T18:28:27.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 850899201,
"ciResult": "pass"
} |
🔔 @AverageHelper — you're the only owner, but it would still be good if you find someone to review this PR in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...) |
Linking a comment on Promise.allSettled#5, which explains a bug with The bug is one where something throws a When |
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.
LGTM!
@AverageHelper thx!
@AverageHelper Everything looks good here. Great job! I am ready to merge this PR (at 9f47968) on your behalf. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ |
Ready to merge |
I just published |
Please fill in this template.
This works at runtime only if users import using
import ... = require(...)
. There's a known bug with a dependency ofpromise.any
that should be fixed in the next TypeScript version.I don't know how that bug affects this PR. The typings are accurate to the best of my knowledge, and they work at runtime... users just can't use TypeScript's
esModuleInterop
with it.npm test promise.any
.Select one of these and delete the others:
If adding a new definition:
.d.ts
files generated via--declaration
dts-gen --dt
, not by basing it on an existing project.tslint.json
should contain{ "extends": "dtslint/dt.json" }
, and no additional rules.tsconfig.json
should havenoImplicitAny
,noImplicitThis
,strictNullChecks
, andstrictFunctionTypes
set totrue
.