Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/checker/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,9 @@ var getFeatureMap = sync.OnceValue(func() map[string][]FeatureMapEntry {
"AsyncDisposableStack": {
{lib: "esnext", props: []string{}},
},
"Date": {
{lib: "esnext", props: []string{"toTemporalInstant"}},
},
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ doYouNeedToChangeYourTargetLibraryES2016Plus.ts(39,47): error TS2550: Property '
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(40,20): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(43,32): error TS2550: Property 'any' does not exist on type 'PromiseConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2021' or later.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(44,33): error TS2550: Property 'replaceAll' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2021' or later.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(47,46): error TS2339: Property 'toTemporalInstant' does not exist on type 'Date'.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(47,46): error TS2550: Property 'toTemporalInstant' does not exist on type 'Date'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.


==== doYouNeedToChangeYourTargetLibraryES2016Plus.ts (34 errors) ====
Expand Down Expand Up @@ -149,5 +149,5 @@ doYouNeedToChangeYourTargetLibraryES2016Plus.ts(47,46): error TS2339: Property '
// esnext
const testDateToTemporalInstant = new Date().toTemporalInstant();
~~~~~~~~~~~~~~~~~
!!! error TS2339: Property 'toTemporalInstant' does not exist on type 'Date'.
!!! error TS2550: Property 'toTemporalInstant' does not exist on type 'Date'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.

Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,16 @@
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(17,111): error TS2550: Property 'groups' does not exist on type 'RegExpExecArray'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(18,33): error TS2550: Property 'dotAll' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(19,38): error TS2550: Property 'PluralRules' does not exist on type 'typeof Intl'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
@@= skipped -29, +23 lines =@@
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(40,20): error TS2583: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(43,32): error TS2550: Property 'any' does not exist on type 'PromiseConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2021' or later.
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(44,33): error TS2550: Property 'replaceAll' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2021' or later.
-doYouNeedToChangeYourTargetLibraryES2016Plus.ts(47,46): error TS2550: Property 'toTemporalInstant' does not exist on type 'Date'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
-
-
@@= skipped -32, +26 lines =@@
doYouNeedToChangeYourTargetLibraryES2016Plus.ts(47,46): error TS2550: Property 'toTemporalInstant' does not exist on type 'Date'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.


-==== doYouNeedToChangeYourTargetLibraryES2016Plus.ts (40 errors) ====
+doYouNeedToChangeYourTargetLibraryES2016Plus.ts(47,46): error TS2339: Property 'toTemporalInstant' does not exist on type 'Date'.
+
+
+==== doYouNeedToChangeYourTargetLibraryES2016Plus.ts (34 errors) ====
// es2016
const testIncludes = ["hello"].includes("world");
~~~~~~~~
@@= skipped -40, +40 lines =@@
@@= skipped -37, +37 lines =@@
~~~~~~~
!!! error TS2550: Property 'finally' does not exist on type 'Promise<unknown>'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
const testRegExpMatchArrayGroups = "2019-04-30".match(/(?<year>[0-9]{4})-(?<month>[0-9]{2})-(?<day>[0-9]{2})/g).groups;
Expand All @@ -50,11 +44,4 @@
-!!! error TS1503: Named capturing groups are only available when targeting 'ES2018' or later.
~~~~~~
!!! error TS2550: Property 'groups' does not exist on type 'RegExpExecArray'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2018' or later.
const testRegExpDotAll = /foo/g.dotAll;
@@= skipped -90, +78 lines =@@
// esnext
const testDateToTemporalInstant = new Date().toTemporalInstant();
~~~~~~~~~~~~~~~~~
-!!! error TS2550: Property 'toTemporalInstant' does not exist on type 'Date'. Do you need to change your target library? Try changing the 'lib' compiler option to 'esnext' or later.
+!!! error TS2339: Property 'toTemporalInstant' does not exist on type 'Date'.

const testRegExpDotAll = /foo/g.dotAll;