-
Notifications
You must be signed in to change notification settings - Fork 30.5k
Fix codemirror types for TS 5.0 beta #64011
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
Conversation
Some event handlers got moved out of their custom type and into GlobalEventHandlersEventMap. This simplifies Editor.on/off overloads. The new code won't succeed until tomorrow, but the test should pass both before and after. See microsoft/TypeScript#52328
|
@sandersn Thank you for submitting this PR! This is a live comment which I will keep updated. 2 packages in this PRCode ReviewsBecause this PR edits multiple packages, it can be merged once it's reviewed by a DT maintainer. 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. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 64011,
"author": "sandersn",
"headCommitOid": "f6487d7cdc8e9fe8c9fda200fa175c0876be5232",
"mergeBaseOid": "d4ee2164bb9ad62636421e1bf1471e404d91d38d",
"lastPushDate": "2023-01-23T16:18:55.000Z",
"lastActivityDate": "2023-01-23T16:23:52.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "codemirror",
"kind": "edit",
"files": [
{
"path": "types/codemirror/codemirror-tests.ts",
"kind": "test"
},
{
"path": "types/codemirror/index.d.ts",
"kind": "definition"
}
],
"owners": [
"mihailik",
"nrbernard",
"Pr1st0n",
"rileymiller",
"toddself",
"ysulyma",
"azoson",
"kylesferrazza",
"fityocsaba96",
"koddsson",
"ficristo"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
},
{
"name": "react-codemirror",
"kind": "edit",
"files": [
{
"path": "types/react-codemirror/index.d.ts",
"kind": "definition"
}
],
"owners": [
"velveret",
"rudi-c"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [],
"mainBotCommentID": 1399094127,
"ciResult": "pass"
} |
|
🔔 @mihailik @nrbernard @Pr1st0n @rileymiller @toddself @ysulyma @azoson @kylesferrazza @fityocsaba96 @koddsson @ficristo @velveret @rudi-c — please review this PR in the next few days. Be sure to explicitly select |
|
@sandersn 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. |
|
@sandersn 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. |
|
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. codemirror (unpkg)was missing the following properties:
|
Some event handlers got moved out of their custom type and into GlobalEventHandlersEventMap. This simplifies Editor.on/off overloads.
The new code won't succeed until tomorrow, but the test should pass both before and after.
Edit: codemirror is popular enough that it might be worthwhile creating a ts4.9 subfolder so fixes to codemirror types can be provided to users of non-current Typescript versions.
Edit: No substantive changes to the types in 1.5 years, which is exactly the DT support window. I'm going to skip creating a 4.9 copy for now.
See microsoft/TypeScript#52328