mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 03:20:56 -06:00
Point es2020 in esnext.d.ts (#32776)
This commit is contained in:
parent
2dd10bdfa1
commit
f304b81fa5
2
src/lib/esnext.d.ts
vendored
2
src/lib/esnext.d.ts
vendored
@ -1,3 +1,3 @@
|
||||
/// <reference lib="es2019" />
|
||||
/// <reference lib="es2020" />
|
||||
/// <reference lib="esnext.bigint" />
|
||||
/// <reference lib="esnext.intl" />
|
||||
|
||||
@ -53,7 +53,7 @@ typedArray[bigNum] = 0xAA; // should error
|
||||
|
||||
typedArray[String(bigNum)] = 0xAA;
|
||||
>typedArray : Symbol(typedArray, Decl(a.ts, 17, 5))
|
||||
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 3 more)
|
||||
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 4 more)
|
||||
>bigNum : Symbol(bigNum, Decl(a.ts, 16, 5))
|
||||
|
||||
typedArray["1"] = 0xBB;
|
||||
|
||||
10
tests/baselines/reference/regexMatchAll-esnext.js
Normal file
10
tests/baselines/reference/regexMatchAll-esnext.js
Normal file
@ -0,0 +1,10 @@
|
||||
//// [regexMatchAll-esnext.ts]
|
||||
const matches = /\w/g[Symbol.matchAll]("matchAll");
|
||||
const array = [...matches];
|
||||
const { index, input } = array[0];
|
||||
|
||||
|
||||
//// [regexMatchAll-esnext.js]
|
||||
const matches = /\w/g[Symbol.matchAll]("matchAll");
|
||||
const array = [...matches];
|
||||
const { index, input } = array[0];
|
||||
16
tests/baselines/reference/regexMatchAll-esnext.symbols
Normal file
16
tests/baselines/reference/regexMatchAll-esnext.symbols
Normal file
@ -0,0 +1,16 @@
|
||||
=== tests/cases/compiler/regexMatchAll-esnext.ts ===
|
||||
const matches = /\w/g[Symbol.matchAll]("matchAll");
|
||||
>matches : Symbol(matches, Decl(regexMatchAll-esnext.ts, 0, 5))
|
||||
>Symbol.matchAll : Symbol(SymbolConstructor.matchAll, Decl(lib.es2020.symbol.wellknown.d.ts, --, --))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --))
|
||||
>matchAll : Symbol(SymbolConstructor.matchAll, Decl(lib.es2020.symbol.wellknown.d.ts, --, --))
|
||||
|
||||
const array = [...matches];
|
||||
>array : Symbol(array, Decl(regexMatchAll-esnext.ts, 1, 5))
|
||||
>matches : Symbol(matches, Decl(regexMatchAll-esnext.ts, 0, 5))
|
||||
|
||||
const { index, input } = array[0];
|
||||
>index : Symbol(index, Decl(regexMatchAll-esnext.ts, 2, 7))
|
||||
>input : Symbol(input, Decl(regexMatchAll-esnext.ts, 2, 14))
|
||||
>array : Symbol(array, Decl(regexMatchAll-esnext.ts, 1, 5))
|
||||
|
||||
24
tests/baselines/reference/regexMatchAll-esnext.types
Normal file
24
tests/baselines/reference/regexMatchAll-esnext.types
Normal file
@ -0,0 +1,24 @@
|
||||
=== tests/cases/compiler/regexMatchAll-esnext.ts ===
|
||||
const matches = /\w/g[Symbol.matchAll]("matchAll");
|
||||
>matches : IterableIterator<RegExpMatchArray>
|
||||
>/\w/g[Symbol.matchAll]("matchAll") : IterableIterator<RegExpMatchArray>
|
||||
>/\w/g[Symbol.matchAll] : (str: string) => IterableIterator<RegExpMatchArray>
|
||||
>/\w/g : RegExp
|
||||
>Symbol.matchAll : symbol
|
||||
>Symbol : SymbolConstructor
|
||||
>matchAll : symbol
|
||||
>"matchAll" : "matchAll"
|
||||
|
||||
const array = [...matches];
|
||||
>array : RegExpMatchArray[]
|
||||
>[...matches] : RegExpMatchArray[]
|
||||
>...matches : RegExpMatchArray
|
||||
>matches : IterableIterator<RegExpMatchArray>
|
||||
|
||||
const { index, input } = array[0];
|
||||
>index : number
|
||||
>input : string
|
||||
>array[0] : RegExpMatchArray
|
||||
>array : RegExpMatchArray[]
|
||||
>0 : 0
|
||||
|
||||
5
tests/cases/compiler/regexMatchAll-esnext.ts
Normal file
5
tests/cases/compiler/regexMatchAll-esnext.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// @target: esnext
|
||||
|
||||
const matches = /\w/g[Symbol.matchAll]("matchAll");
|
||||
const array = [...matches];
|
||||
const { index, input } = array[0];
|
||||
Loading…
x
Reference in New Issue
Block a user