Update ws types to allow custom properties on this argument#58555
Update ws types to allow custom properties on this argument#58555lavalleeale wants to merge 4 commits intoDefinitelyTyped:masterfrom lavalleeale-forks:master
Conversation
|
@lavalleeale Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. 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": 58555,
"author": "lavalleeale",
"headCommitOid": "0a2be70b8282ad1af55f37880a1766d211269833",
"mergeBaseOid": "66c5413f51d87a490a5e91944927076de67a0548",
"lastPushDate": "2022-02-01T23:55:57.000Z",
"lastActivityDate": "2022-02-16T19:35:34.000Z",
"maintainerBlessed": "Waiting for Code Reviews",
"hasMergeConflict": true,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "ws",
"kind": "edit",
"files": [
{
"path": "types/ws/index.d.ts",
"kind": "definition"
},
{
"path": "types/ws/ws-tests.ts",
"kind": "test"
}
],
"owners": [
"loyd",
"mlamp",
"TitaneBoy",
"reduckted",
"teidesu",
"wojtkowiak",
"k-yle"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [],
"mainBotCommentID": 1027400526,
"ciResult": "pass"
} |
|
🔔 @loyd @mlamp @TitaneBoy @reduckted @teidesu @wojtkowiak @k-yle — please review this PR in the next few days. Be sure to explicitly select |
|
@lavalleeale 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. |
|
Re-ping @loyd, @mlamp, @TitaneBoy, @reduckted, @teidesu, @wojtkowiak, @k-yle: This PR has been out for over a week, yet I haven't seen any reviews. Could someone please give it some attention? Thanks! |
|
I think this should be closed in favor of #58772, unless people like this approach better? |
Agree. The main goal of #58772 is to cover the websockets/ws#2007 PR. The #58753 PR covers the basic usage const ws = new WebSocket("ws://www.host.com/path");
ws.id; // want to access `id` hereBut to do that one requires to declare it declare module "ws" {
interface WebSocket {
id?: string;
}
}One can achieve the same result with classes though (not a good way but it is a way) import { WebSocket } from "ws";
class CustomWebSocket extends WebSocket {
id?: number;
}
const ws = new CustomWebSocket("ws://localhost:8080");
ws.id; // have an access hereI would prefer the #58772 approach (using generics). |
|
@lavalleeale Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
|
@lavalleeale 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 Mar 18th (in a week) if the issues aren't addressed. |
|
@lavalleeale 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! |
Please fill in this template.
npm test <package to test>.Select one of these and delete the others:
If changing an existing definition: