Add es2018.intl ref to es2020.intl#49152
Add es2018.intl ref to es2020.intl#49152sandersn merged 2 commits intomainmicrosoft/TypeScript:mainfrom add-es2018.intl-ref-to-es2020.intlmicrosoft/TypeScript:add-es2018.intl-ref-to-es2020.intlCopy head branch name to clipboard
Conversation
es2020.intl refers to NumberFormatPartTypes declared in es2018.intl as of #46508. I'm not sure how to test this; it repros on Definitely Typed in types/ndarray, but when I copy the same files into a compiler test it passes without a problem.
|
For comparison, here is the test I tried: // @Filename: tsconfig.json
{
"compilerOptions": {
"lib": [
"es6"
],
"types": [],
"noEmit": true
}
}
// @Filename: ndarray-test.ts
/// <reference lib="esnext.bigint" />and here is the failing DT package after cutting out unnecessary code: // @Filename: ndarray-test.ts
/// <reference lib="esnext.bigint" />
// @Filename: tsconfig.json
{
"compilerOptions": {
"lib": [
"es6"
],
"types": [],
"noEmit": true,
},
"files": [
"ndarray-tests.ts"
]
}Those two files also fail on their own, outside the DT repo. |
|
I think in general I don't understand how lib files supposed to work together. In this case, both the es2020.intl and es2018.intl have |
It doesn't actually show that the original bug has been fixed, though.
|
|
I'm going to merge this because I'm confident of the fix, the test at least shows that it does a related, correct thing, and I'm out of time to debug it. |
es2020.intl refers to NumberFormatPartTypes declared in es2018.intl as of #46508.
I'm not sure how to test this; it repros on Definitely Typed in types/ndarray, but when I copy the same files into a compiler test it passes without a problem.
Fixes 3 test failures on DT's overnight run.
Edit: The most recent commit adds a tests to show that the lib change does what it should. But it doesn't show that the bug is fixed -- just that
Intl.NumberFormatPartTypesis resolved in a file with/// <reference lib="esnext.bigint" />.