Skip to content

Commit 222f29f

Browse files
author
Orta Therox
authored
Update lib dom for 4.2 (#42067)
1 parent 9a2ae11 commit 222f29f

File tree

35 files changed

+460
-398
lines changed

35 files changed

+460
-398
lines changed

src/lib/dom.generated.d.ts

+268-173
Large diffs are not rendered by default.

src/lib/webworker.generated.d.ts

+114-139
Large diffs are not rendered by default.

tests/baselines/reference/copyrightWithNewLine1.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import model = require("./greeter")
99
var el = document.getElementById('content');
1010
>el : HTMLElement
1111
>document.getElementById('content') : HTMLElement
12-
>document.getElementById : (elementId: string) => HTMLElement
12+
>document.getElementById : <E extends Element = HTMLElement>(elementId: string) => E
1313
>document : Document
14-
>getElementById : (elementId: string) => HTMLElement
14+
>getElementById : <E extends Element = HTMLElement>(elementId: string) => E
1515
>'content' : "content"
1616

1717
var greeter = new model.Greeter(el);

tests/baselines/reference/copyrightWithoutNewLine1.types

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import model = require("./greeter")
88
var el = document.getElementById('content');
99
>el : HTMLElement
1010
>document.getElementById('content') : HTMLElement
11-
>document.getElementById : (elementId: string) => HTMLElement
11+
>document.getElementById : <E extends Element = HTMLElement>(elementId: string) => E
1212
>document : Document
13-
>getElementById : (elementId: string) => HTMLElement
13+
>getElementById : <E extends Element = HTMLElement>(elementId: string) => E
1414
>'content' : "content"
1515

1616
var greeter = new model.Greeter(el);

tests/baselines/reference/genericMethodOverspecialization.types

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ declare var document: Document;
2121

2222
interface Document {
2323
getElementById(elementId: string): HTMLElement;
24-
>getElementById : { (elementId: string): HTMLElement; (elementId: string): HTMLElement; }
24+
>getElementById : { <E extends Element = HTMLElement>(elementId: string): E; (elementId: string): HTMLElement; }
2525
>elementId : string
2626
}
2727

@@ -36,9 +36,9 @@ var elements = names.map(function (name) {
3636

3737
return document.getElementById(name);
3838
>document.getElementById(name) : HTMLElement
39-
>document.getElementById : { (elementId: string): HTMLElement; (elementId: string): HTMLElement; }
39+
>document.getElementById : { <E extends Element = HTMLElement>(elementId: string): E; (elementId: string): HTMLElement; }
4040
>document : Document
41-
>getElementById : { (elementId: string): HTMLElement; (elementId: string): HTMLElement; }
41+
>getElementById : { <E extends Element = HTMLElement>(elementId: string): E; (elementId: string): HTMLElement; }
4242
>name : string
4343

4444
});

tests/baselines/reference/globalThisBlockscopedProperties.types

+1-1
Large diffs are not rendered by default.

tests/baselines/reference/importMeta(module=commonjs,target=es5).errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS236
99
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
1010
tests/cases/conformance/es2019/importMeta/example.ts(2,2): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
1111
tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
12-
tests/cases/conformance/es2019/importMeta/example.ts(3,71): error TS2339: Property 'url' does not exist on type 'ImportMeta'.
1312
tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
1413
tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
1514
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
@@ -25,16 +24,14 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS
2524

2625

2726
!!! error TS2468: Cannot find global value 'Promise'.
28-
==== tests/cases/conformance/es2019/importMeta/example.ts (5 errors) ====
27+
==== tests/cases/conformance/es2019/importMeta/example.ts (4 errors) ====
2928
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
3029
(async () => {
3130
~~~~~~~~~~~~~
3231
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
3332
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
3433
~~~~~~~~~~~
3534
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
36-
~~~
37-
!!! error TS2339: Property 'url' does not exist on type 'ImportMeta'.
3835
const blob = await response.blob();
3936

4037
const size = import.meta.scriptElement.dataset.size || 300;

tests/baselines/reference/importMeta(module=commonjs,target=es5).symbols

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
>fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --))
77
>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
88
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
9+
>import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
10+
>url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
911
>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
1012

1113
const blob = await response.blob();
@@ -72,7 +74,7 @@ let globalC = import.import.import.malkovich;
7274
=== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts ===
7375
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
7476
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
75-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
77+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
7678

7779
import.meta = foo;
7880
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
@@ -82,7 +84,7 @@ declare global {
8284
>global : Symbol(global, Decl(assignmentTargets.ts, 1, 18))
8385

8486
interface ImportMeta {
85-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
87+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
8688

8789
wellKnownProperty: { a: number, b: string, c: boolean };
8890
>wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24))

tests/baselines/reference/importMeta(module=commonjs,target=es5).types

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
>new URL("../hamsters.jpg", import.meta.url) : URL
1616
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
1717
>"../hamsters.jpg" : "../hamsters.jpg"
18-
>import.meta.url : any
18+
>import.meta.url : string
1919
>import.meta : ImportMeta
2020
>meta : any
21-
>url : any
21+
>url : string
2222
>toString : () => string
2323

2424
const blob = await response.blob();

tests/baselines/reference/importMeta(module=commonjs,target=esnext).errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS236
99
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
1010
tests/cases/conformance/es2019/importMeta/example.ts(2,2): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
1111
tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
12-
tests/cases/conformance/es2019/importMeta/example.ts(3,71): error TS2339: Property 'url' does not exist on type 'ImportMeta'.
1312
tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
1413
tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
1514
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
@@ -25,16 +24,14 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS
2524

2625

2726
!!! error TS2468: Cannot find global value 'Promise'.
28-
==== tests/cases/conformance/es2019/importMeta/example.ts (5 errors) ====
27+
==== tests/cases/conformance/es2019/importMeta/example.ts (4 errors) ====
2928
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
3029
(async () => {
3130
~~~~~~~~~~~~~
3231
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
3332
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
3433
~~~~~~~~~~~
3534
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'.
36-
~~~
37-
!!! error TS2339: Property 'url' does not exist on type 'ImportMeta'.
3835
const blob = await response.blob();
3936

4037
const size = import.meta.scriptElement.dataset.size || 300;

tests/baselines/reference/importMeta(module=commonjs,target=esnext).symbols

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
>fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --))
77
>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
88
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
9+
>import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
10+
>url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
911
>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
1012

1113
const blob = await response.blob();
@@ -72,7 +74,7 @@ let globalC = import.import.import.malkovich;
7274
=== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts ===
7375
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
7476
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
75-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
77+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
7678

7779
import.meta = foo;
7880
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
@@ -82,7 +84,7 @@ declare global {
8284
>global : Symbol(global, Decl(assignmentTargets.ts, 1, 18))
8385

8486
interface ImportMeta {
85-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
87+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
8688

8789
wellKnownProperty: { a: number, b: string, c: boolean };
8890
>wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24))

tests/baselines/reference/importMeta(module=commonjs,target=esnext).types

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
>new URL("../hamsters.jpg", import.meta.url) : URL
1616
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
1717
>"../hamsters.jpg" : "../hamsters.jpg"
18-
>import.meta.url : any
18+
>import.meta.url : string
1919
>import.meta : ImportMeta
2020
>meta : any
21-
>url : any
21+
>url : string
2222
>toString : () => string
2323

2424
const blob = await response.blob();

tests/baselines/reference/importMeta(module=es2020,target=es5).errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,44): error TS23
33
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
44
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
55
tests/cases/conformance/es2019/importMeta/example.ts(2,2): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
6-
tests/cases/conformance/es2019/importMeta/example.ts(3,71): error TS2339: Property 'url' does not exist on type 'ImportMeta'.
76
tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
87
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,23): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
98
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,23): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
@@ -12,14 +11,12 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS
1211

1312

1413
!!! error TS2468: Cannot find global value 'Promise'.
15-
==== tests/cases/conformance/es2019/importMeta/example.ts (3 errors) ====
14+
==== tests/cases/conformance/es2019/importMeta/example.ts (2 errors) ====
1615
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
1716
(async () => {
1817
~~~~~~~~~~~~~
1918
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
2019
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
21-
~~~
22-
!!! error TS2339: Property 'url' does not exist on type 'ImportMeta'.
2320
const blob = await response.blob();
2421

2522
const size = import.meta.scriptElement.dataset.size || 300;

tests/baselines/reference/importMeta(module=es2020,target=es5).symbols

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
>fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --))
77
>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
88
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
9+
>import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
10+
>url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
911
>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
1012

1113
const blob = await response.blob();
@@ -72,7 +74,7 @@ let globalC = import.import.import.malkovich;
7274
=== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts ===
7375
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
7476
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
75-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
77+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
7678

7779
import.meta = foo;
7880
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
@@ -82,7 +84,7 @@ declare global {
8284
>global : Symbol(global, Decl(assignmentTargets.ts, 1, 18))
8385

8486
interface ImportMeta {
85-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
87+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
8688

8789
wellKnownProperty: { a: number, b: string, c: boolean };
8890
>wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24))

tests/baselines/reference/importMeta(module=es2020,target=es5).types

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
>new URL("../hamsters.jpg", import.meta.url) : URL
1616
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
1717
>"../hamsters.jpg" : "../hamsters.jpg"
18-
>import.meta.url : any
18+
>import.meta.url : string
1919
>import.meta : ImportMeta
2020
>meta : any
21-
>url : any
21+
>url : string
2222
>toString : () => string
2323

2424
const blob = await response.blob();

tests/baselines/reference/importMeta(module=es2020,target=esnext).errors.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,44): error TS23
33
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
44
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
55
tests/cases/conformance/es2019/importMeta/example.ts(2,2): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
6-
tests/cases/conformance/es2019/importMeta/example.ts(3,71): error TS2339: Property 'url' does not exist on type 'ImportMeta'.
76
tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
87
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,23): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
98
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,23): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
@@ -12,14 +11,12 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS
1211

1312

1413
!!! error TS2468: Cannot find global value 'Promise'.
15-
==== tests/cases/conformance/es2019/importMeta/example.ts (3 errors) ====
14+
==== tests/cases/conformance/es2019/importMeta/example.ts (2 errors) ====
1615
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
1716
(async () => {
1817
~~~~~~~~~~~~~
1918
!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.
2019
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
21-
~~~
22-
!!! error TS2339: Property 'url' does not exist on type 'ImportMeta'.
2320
const blob = await response.blob();
2421

2522
const size = import.meta.scriptElement.dataset.size || 300;

tests/baselines/reference/importMeta(module=es2020,target=esnext).symbols

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
>fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --))
77
>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
88
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
9+
>import.meta.url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
10+
>url : Symbol(ImportMeta.url, Decl(lib.dom.d.ts, --, --))
911
>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
1012

1113
const blob = await response.blob();
@@ -72,7 +74,7 @@ let globalC = import.import.import.malkovich;
7274
=== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts ===
7375
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
7476
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
75-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
77+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
7678

7779
import.meta = foo;
7880
>foo : Symbol(foo, Decl(assignmentTargets.ts, 0, 12))
@@ -82,7 +84,7 @@ declare global {
8284
>global : Symbol(global, Decl(assignmentTargets.ts, 1, 18))
8385

8486
interface ImportMeta {
85-
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
87+
>ImportMeta : Symbol(ImportMeta, Decl(lib.es5.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(assignmentTargets.ts, 4, 16))
8688

8789
wellKnownProperty: { a: number, b: string, c: boolean };
8890
>wellKnownProperty : Symbol(ImportMeta.wellKnownProperty, Decl(assignmentTargets.ts, 5, 24))

tests/baselines/reference/importMeta(module=es2020,target=esnext).types

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
>new URL("../hamsters.jpg", import.meta.url) : URL
1616
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
1717
>"../hamsters.jpg" : "../hamsters.jpg"
18-
>import.meta.url : any
18+
>import.meta.url : string
1919
>import.meta : ImportMeta
2020
>meta : any
21-
>url : any
21+
>url : string
2222
>toString : () => string
2323

2424
const blob = await response.blob();

0 commit comments

Comments
 (0)