Skip to content

Commit d480ef1

Browse files
committed
Change target lib test and target features
1 parent cad1884 commit d480ef1

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/compiler/utilities.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ namespace ts {
606606
AsyncIterableIterator: emptyArray,
607607
AsyncGenerator: emptyArray,
608608
AsyncGeneratorFunction: emptyArray,
609+
NumberFormat: ["formatToParts"]
609610
},
610611
es2019: {
611612
Array: ["flat", "flatMap"],
@@ -626,9 +627,6 @@ namespace ts {
626627
es2021: {
627628
PromiseConstructor: ["any"],
628629
String: ["replaceAll"]
629-
},
630-
esnext: {
631-
NumberFormat: ["formatToParts"]
632630
}
633631
};
634632
}

tests/cases/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const testAsyncGenerator: AsyncGenerator<any> = null as any;
2323
const testAsyncGeneratorFunction: AsyncGeneratorFunction = null as any;
2424
const testAsyncIterable: AsyncIterable<any> = null as any;
2525
const testAsyncIterableIterator: AsyncIterableIterator<any> = null as any;
26+
const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts();
27+
2628

2729
// es2019
2830
const testArrayFlat = [].flat();
@@ -43,6 +45,3 @@ const testBigInt = BigInt(123);
4345
// es2021
4446
const testPromiseAny = Promise.any([]);
4547
const testStringReplaceAll = "".replaceAll();
46-
47-
// esnext
48-
const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts();

0 commit comments

Comments
 (0)