-
Notifications
You must be signed in to change notification settings - Fork 30.5k
feat: add AbortSignal.timeout(number) #60628
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
feat: add AbortSignal.timeout(number) #60628
Conversation
@zone117x Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 31 days — it is considered abandoned, and therefore closed! Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 60628,
"author": "zone117x",
"headCommitOid": "1ee7f133f45f1375cd370c5b63a7b61dab3a0180",
"mergeBaseOid": "e8b369c1b9d01c667aa871bc714dd23561a21cea",
"lastPushDate": "2022-06-02T12:59:12.000Z",
"lastActivityDate": "2022-06-10T01:47:19.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "node",
"kind": "edit",
"files": [
{
"path": "types/node/globals.d.ts",
"kind": "definition"
},
{
"path": "types/node/v14/globals.d.ts",
"kind": "definition"
},
{
"path": "types/node/v16/globals.d.ts",
"kind": "definition"
},
{
"path": "types/node/v16/test/globals.ts",
"kind": "test"
}
],
"owners": [
"Microsoft",
"DefinitelyTyped",
"jkomyno",
"alvis",
"r3nya",
"btoueg",
"smac89",
"touffy",
"DeividasBakanas",
"eyqs",
"Hannes-Magnusson-CK",
"hoo29",
"kjin",
"ajafff",
"islishude",
"mwiktorczyk",
"mohsen1",
"n-e",
"galkin",
"parambirs",
"eps1lon",
"SimonSchick",
"ThomasdenH",
"WilcoBakker",
"wwwy3y3",
"samuela",
"kuehlein",
"bhongy",
"chyzwar",
"trivikr",
"yoursunny",
"qwelias",
"ExE-Boss",
"peterblazejewicz",
"addaleax",
"victorperin",
"ZYSzys",
"NodeJS",
"LinusU",
"wafuwafu13",
"mcollina"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "mcollina",
"date": "2022-06-05T11:49:11.000Z",
"isMaintainer": false
},
{
"type": "stale",
"reviewer": "eps1lon",
"date": "2022-06-01T23:21:14.000Z",
"abbrOid": "c77989d"
}
],
"mainBotCommentID": 1144190626,
"ciResult": "fail",
"ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/1ee7f133f45f1375cd370c5b63a7b61dab3a0180/checks?check_suite_id=6764929039"
} |
🔔 @microsoft @DefinitelyTyped @jkomyno @alvis @r3nya @btoueg @smac89 @Touffy @DeividasBakanas @eyqs @Hannes-Magnusson-CK @hoo29 @kjin @ajafff @islishude @mwiktorczyk @mohsen1 @n-e @galkin @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @samuela @kuehlein @bhongy @chyzwar @trivikr @yoursunny @qwelias @ExE-Boss @peterblazejewicz @addaleax @victorperin @ZYSzys @nodejs @LinusU @wafuwafu13 @mcollina — please review this PR in the next few days. Be sure to explicitly select |
ee4dc2b
to
c77989d
Compare
@zone117x The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review. |
…lib/lib.dom.d.ts`
@zone117x The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review. |
@peterblazejewicz I'm struggling with getting this to work. It looks like the problem is that
Is it possible to make this change without also changing |
@zone117x The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review. |
I assume this is because some setups use, say: /// <reference types="node" /> (a global reference) lib: [ "dom" ] this results in both being used to resolve the same symbol. |
How about making |
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
Ah, looks like the issue keeps getting pushed as well. I've been looking at how this is handled in similar scenarios, for example with the DefinitelyTyped/types/node/url.d.ts Lines 860 to 887 in ee088b6
Does an approach like this make sense for
Interesting, is there precedent for doing something like this, especially in this package? |
@antongolub it looks like you have experience with this situation (like in #58619) -- any suggestions here? |
No precedent, but this could be a solution. A drawback is that the typing would not be able to capture the difference between web standards and Node implementation. |
@zone117x I'm not using Node on daily basis (.NET stack here), I do not have opinion on this one, as this was always problematic and I do not have a great experience on seeing in wider context a subtle change and it's possible ramification(s). The issue you've linked #58019 was the one approved by MS team member, e.g. see this comment on what I mean: |
@rbuckton do you have any recommendations for a workaround here? |
Unfortunately, I think the only solution is to update |
@zone117x I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Jul 10th (in a week) if the issues aren't addressed. |
@zone117x To keep things tidy, we have to close PRs that aren't mergeable and don't have activity in the last month. No worries, though — please open a new PR if you'd like to continue with this change. Thank you! |
Add
AbortSignal.timeout(number)
definition to@types/node
, available since Nodejs v17.3.0, v16.14.0.See https://nodejs.org/api/globals.html#static-method-abortsignaltimeoutdelay for more details.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition: