Skip to content

Commit 28f8d75

Browse files
Accepted baselines.
1 parent a55febd commit 28f8d75

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

tests/baselines/reference/importMeta.errors.txt

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
error TS2468: Cannot find global value 'Promise'.
2+
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,44): error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
3+
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
24
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.
35
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'.
7+
tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
48
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'?
59
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'?
610
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,22): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
711
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
812

913

1014
!!! error TS2468: Cannot find global value 'Promise'.
11-
==== tests/cases/conformance/es2019/importMeta/example.ts (1 errors) ====
15+
==== tests/cases/conformance/es2019/importMeta/example.ts (3 errors) ====
1216
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
1317
(async () => {
1418
~~~~~~~~~~~~~
1519
!!! 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.
1620
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
21+
~~~
22+
!!! error TS2339: Property 'url' does not exist on type 'ImportMeta'.
1723
const blob = await response.blob();
1824

1925
const size = import.meta.scriptElement.dataset.size || 300;
26+
~~~~~~~~~~~~~
27+
!!! error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
2028

2129
const image = new Image();
2230
image.src = URL.createObjectURL(blob);
@@ -43,8 +51,12 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS
4351
~~~~~~
4452
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
4553

46-
==== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts (1 errors) ====
54+
==== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts (3 errors) ====
4755
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
56+
~~~~
57+
!!! error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
58+
~~~~
59+
!!! error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
4860
import.meta = foo;
4961
~~~~~~~~~~~
5062
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.

tests/baselines/reference/importMetaES5.errors.txt

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
error TS2468: Cannot find global value 'Promise'.
22
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
3+
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,44): error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
34
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
5+
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
46
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
57
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
68
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.
79
tests/cases/conformance/es2019/importMeta/assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
810
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.
911
tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
12+
tests/cases/conformance/es2019/importMeta/example.ts(3,71): error TS2339: Property 'url' does not exist on type 'ImportMeta'.
1013
tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
14+
tests/cases/conformance/es2019/importMeta/example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
1115
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
1216
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
1317
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'?
@@ -21,19 +25,23 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS
2125

2226

2327
!!! error TS2468: Cannot find global value 'Promise'.
24-
==== tests/cases/conformance/es2019/importMeta/example.ts (3 errors) ====
28+
==== tests/cases/conformance/es2019/importMeta/example.ts (5 errors) ====
2529
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
2630
(async () => {
2731
~~~~~~~~~~~~~
2832
!!! 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.
2933
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
3034
~~~~~~~~~~~
3135
!!! error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
36+
~~~
37+
!!! error TS2339: Property 'url' does not exist on type 'ImportMeta'.
3238
const blob = await response.blob();
3339

3440
const size = import.meta.scriptElement.dataset.size || 300;
3541
~~~~~~~~~~~
3642
!!! error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
43+
~~~~~~~~~~~~~
44+
!!! error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
3745

3846
const image = new Image();
3947
image.src = URL.createObjectURL(blob);
@@ -72,12 +80,16 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS
7280
~~~~~~
7381
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
7482

75-
==== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts (6 errors) ====
83+
==== tests/cases/conformance/es2019/importMeta/assignmentTargets.ts (8 errors) ====
7684
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
7785
~~~~~~~~~~~
7886
!!! error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
87+
~~~~
88+
!!! error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
7989
~~~~~~~~~~~
8090
!!! error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
91+
~~~~
92+
!!! error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
8193
~~~~~~~~~~~
8294
!!! error TS1343: The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.
8395
import.meta = foo;

0 commit comments

Comments
 (0)