fix(mysql): change Types const enum to regular enum - #75611
typescript-automation[bot] merged 1 commit into
Conversation
const enums cannot be imported when a consumer enables TypeScript's verbatimModuleSyntax, since the compiler needs the enum's runtime value to inline it and const enums are erased ambiently (TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled). Switching to a regular enum keeps the same values/behavior while remaining importable under verbatimModuleSyntax.
|
@skrtheboss Thank you for submitting this PR! This is a live comment that 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
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": 75611,
"author": "skrtheboss",
"headCommitOid": "d4156554068bc3514f6ff1e64899a624097da661",
"mergeBaseOid": "848f089767f368e5cd3b5afbb41f86f6a730eb0f",
"lastPushDate": "2026-09-23T07:39:37.000Z",
"lastActivityDate": "2026-09-29T05:26:17.000Z",
"mergeOfferDate": "2026-09-28T22:48:13.000Z",
"mergeRequestDate": "2026-09-29T05:26:17.000Z",
"mergeRequestUser": "skrtheboss",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "mysql",
"version": "2.15",
"kind": "edit",
"files": [
{
"path": "types/mysql/index.d.ts",
"kind": "definition"
}
],
"owners": [
"wjohnsto",
"kpping",
"jdmunro",
"sedenardi"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "RyanCavanaugh",
"date": "2026-09-28T22:47:33.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 5790992993,
"ciResult": "pass"
} |
|
Hey @skrtheboss, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
|
🔔 @wjohnsto @kpping @jdmunro @sedenardi — please review this PR in the next few days. Be sure to explicitly select |
|
@skrtheboss: Everything looks good here. I am ready to merge this PR (at d415655) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@wjohnsto, @kpping, @jdmunro, @sedenardi: you can do this too.) |
|
Ready to merge |
b69375c
into
DefinitelyTyped:master
const enums cannot be imported when a consumer enables TypeScript's verbatimModuleSyntax, since the compiler needs the enum's runtime value to inline it and const enums are erased ambiently (TS2748: Cannot access ambient const enums when 'verbatimModuleSyntax' is enabled). Switching to a regular enum keeps the same values/behavior while remaining importable under verbatimModuleSyntax.
Please fill in this template.
pnpm test <package to test>.Select one of these and delete the others:
If adding a new definition:
.d.tsfiles generated via--declarationdts-gen --dt, not by basing it on an existing project.tsconfig.jsonshould havenoImplicitAny,noImplicitThis,strictNullChecks, andstrictFunctionTypesset totrue.If changing an existing definition:
package.json.If removing a declaration:
notNeededPackages.json.