Accepted baselines.
This commit is contained in:
parent
f0081f0a04
commit
910c5d338b
6 changed files with 50 additions and 132 deletions
|
@ -414,11 +414,11 @@ declare namespace ts {
|
|||
JavaScriptFile = 65536,
|
||||
ThisNodeOrAnySubNodesHasError = 131072,
|
||||
HasAggregatedChildData = 262144,
|
||||
JSDoc = 1048576,
|
||||
JSDoc = 2097152,
|
||||
BlockScoped = 3,
|
||||
ReachabilityCheckFlags = 384,
|
||||
ReachabilityAndEmitFlags = 1408,
|
||||
ContextFlags = 6387712,
|
||||
ContextFlags = 12679168,
|
||||
TypeExcludesFlags = 20480
|
||||
}
|
||||
enum ModifierFlags {
|
||||
|
@ -1070,7 +1070,7 @@ declare namespace ts {
|
|||
}
|
||||
interface MetaProperty extends PrimaryExpression {
|
||||
kind: SyntaxKind.MetaProperty;
|
||||
keywordToken: SyntaxKind.NewKeyword;
|
||||
keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
|
||||
name: Identifier;
|
||||
}
|
||||
interface JsxElement extends PrimaryExpression {
|
||||
|
|
|
@ -414,11 +414,11 @@ declare namespace ts {
|
|||
JavaScriptFile = 65536,
|
||||
ThisNodeOrAnySubNodesHasError = 131072,
|
||||
HasAggregatedChildData = 262144,
|
||||
JSDoc = 1048576,
|
||||
JSDoc = 2097152,
|
||||
BlockScoped = 3,
|
||||
ReachabilityCheckFlags = 384,
|
||||
ReachabilityAndEmitFlags = 1408,
|
||||
ContextFlags = 6387712,
|
||||
ContextFlags = 12679168,
|
||||
TypeExcludesFlags = 20480
|
||||
}
|
||||
enum ModifierFlags {
|
||||
|
@ -1070,7 +1070,7 @@ declare namespace ts {
|
|||
}
|
||||
interface MetaProperty extends PrimaryExpression {
|
||||
kind: SyntaxKind.MetaProperty;
|
||||
keywordToken: SyntaxKind.NewKeyword;
|
||||
keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
|
||||
name: Identifier;
|
||||
}
|
||||
interface JsxElement extends PrimaryExpression {
|
||||
|
|
|
@ -1,70 +1,21 @@
|
|||
error TS2468: Cannot find global value 'Promise'.
|
||||
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.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(3,59): error TS1135: Argument expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(3,65): error TS1135: Argument expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(3,66): error TS2448: Block-scoped variable 'meta' used before its declaration.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,9): error TS2451: Cannot redeclare block-scoped variable 'size'.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,16): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,22): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,27): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,41): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,49): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,50): error TS2451: Cannot redeclare block-scoped variable 'size'.
|
||||
tests/cases/conformance/es2019/importMeta/example.ts(6,55): error TS1005: ',' expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,16): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(1,22): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,16): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(2,22): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,16): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,22): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,23): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,29): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,30): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts(3,36): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(1,15): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(1,21): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,15): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(2,21): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,15): error TS1109: Expression expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,21): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,22): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,28): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,29): error TS1134: Variable declaration expected.
|
||||
tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,35): error TS1134: Variable declaration expected.
|
||||
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'?
|
||||
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'?
|
||||
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'?
|
||||
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'?
|
||||
|
||||
|
||||
!!! error TS2468: Cannot find global value 'Promise'.
|
||||
==== tests/cases/conformance/es2019/importMeta/example.ts (12 errors) ====
|
||||
==== tests/cases/conformance/es2019/importMeta/example.ts (1 errors) ====
|
||||
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
|
||||
(async () => {
|
||||
~~~~~~~~~~~~~
|
||||
!!! 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.
|
||||
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
|
||||
~~~~~~
|
||||
!!! error TS1135: Argument expression expected.
|
||||
~
|
||||
!!! error TS1135: Argument expression expected.
|
||||
~~~~
|
||||
!!! error TS2448: Block-scoped variable 'meta' used before its declaration.
|
||||
const blob = await response.blob();
|
||||
|
||||
const size = import.meta.scriptElement.dataset.size || 300;
|
||||
~~~~
|
||||
!!! error TS2451: Cannot redeclare block-scoped variable 'size'.
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~
|
||||
!!! error TS1005: ',' expected.
|
||||
~~~~
|
||||
!!! error TS2451: Cannot redeclare block-scoped variable 'size'.
|
||||
~~
|
||||
!!! error TS1005: ',' expected.
|
||||
|
||||
const image = new Image();
|
||||
image.src = URL.createObjectURL(blob);
|
||||
|
@ -73,53 +24,21 @@ tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts(3,35): error TS
|
|||
document.body.appendChild(image);
|
||||
})();
|
||||
|
||||
==== tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts (10 errors) ====
|
||||
==== tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts (2 errors) ====
|
||||
export let x = import.meta;
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
export let y = import.metal;
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~~~~~
|
||||
!!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
|
||||
export let z = import.import.import.malkovich;
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~~~~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~~~~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
|
||||
|
||||
==== tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts (10 errors) ====
|
||||
==== tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts (2 errors) ====
|
||||
let globalA = import.meta;
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
let globalB = import.metal;
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~~~~~
|
||||
!!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
|
||||
let globalC = import.import.import.malkovich;
|
||||
~~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~~~~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~~~~~~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
~
|
||||
!!! error TS1134: Variable declaration expected.
|
||||
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
|
||||
|
|
@ -29,20 +29,19 @@ let globalC = import.import.import.malkovich;
|
|||
//// [example.js]
|
||||
// Adapted from https://github.com/tc39/proposal-import-meta/tree/c3902a9ffe2e69a7ac42c19d7ea74cbdcea9b7fb#example
|
||||
(async () => {
|
||||
const response = await fetch(new URL("../hamsters.jpg", meta.url).toString());
|
||||
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
|
||||
const blob = await response.blob();
|
||||
const size = , meta, scriptElement, dataset, size;
|
||||
|| 300;
|
||||
const size = import.meta.scriptElement.dataset.size || 300;
|
||||
const image = new Image();
|
||||
image.src = URL.createObjectURL(blob);
|
||||
image.width = image.height = size;
|
||||
document.body.appendChild(image);
|
||||
})();
|
||||
//// [moduleLookingFile01.js]
|
||||
export let x = , meta;
|
||||
export let y = , metal;
|
||||
export let z = , malkovich;
|
||||
export let x = import.meta;
|
||||
export let y = import.metal;
|
||||
export let z = import.import.import.malkovich;
|
||||
//// [scriptLookingFile01.js]
|
||||
let globalA = , meta;
|
||||
let globalB = , metal;
|
||||
let globalC = , malkovich;
|
||||
let globalA = import.meta;
|
||||
let globalB = import.metal;
|
||||
let globalC = import.import.import.malkovich;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
>fetch : Symbol(fetch, Decl(lib.dom.d.ts, --, --))
|
||||
>new URL("../hamsters.jpg", import.meta.url).toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
|
||||
>URL : Symbol(URL, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
|
||||
>meta : Symbol(meta, Decl(example.ts, 5, 22))
|
||||
>toString : Symbol(URL.toString, Decl(lib.dom.d.ts, --, --))
|
||||
|
||||
const blob = await response.blob();
|
||||
|
@ -17,10 +16,6 @@
|
|||
|
||||
const size = import.meta.scriptElement.dataset.size || 300;
|
||||
>size : Symbol(size, Decl(example.ts, 5, 7))
|
||||
>meta : Symbol(meta, Decl(example.ts, 5, 22))
|
||||
>scriptElement : Symbol(scriptElement, Decl(example.ts, 5, 27))
|
||||
>dataset : Symbol(dataset, Decl(example.ts, 5, 41))
|
||||
>size : Symbol(size, Decl(example.ts, 5, 49))
|
||||
|
||||
const image = new Image();
|
||||
>image : Symbol(image, Decl(example.ts, 7, 7))
|
||||
|
@ -57,26 +52,20 @@
|
|||
=== tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts ===
|
||||
export let x = import.meta;
|
||||
>x : Symbol(x, Decl(moduleLookingFile01.ts, 0, 10))
|
||||
>meta : Symbol(meta, Decl(moduleLookingFile01.ts, 0, 22))
|
||||
|
||||
export let y = import.metal;
|
||||
>y : Symbol(y, Decl(moduleLookingFile01.ts, 1, 10))
|
||||
>metal : Symbol(metal, Decl(moduleLookingFile01.ts, 1, 22))
|
||||
|
||||
export let z = import.import.import.malkovich;
|
||||
>z : Symbol(z, Decl(moduleLookingFile01.ts, 2, 10))
|
||||
>malkovich : Symbol(malkovich, Decl(moduleLookingFile01.ts, 2, 36))
|
||||
|
||||
=== tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts ===
|
||||
let globalA = import.meta;
|
||||
>globalA : Symbol(globalA, Decl(scriptLookingFile01.ts, 0, 3))
|
||||
>meta : Symbol(meta, Decl(scriptLookingFile01.ts, 0, 21))
|
||||
|
||||
let globalB = import.metal;
|
||||
>globalB : Symbol(globalB, Decl(scriptLookingFile01.ts, 1, 3))
|
||||
>metal : Symbol(metal, Decl(scriptLookingFile01.ts, 1, 21))
|
||||
|
||||
let globalC = import.import.import.malkovich;
|
||||
>globalC : Symbol(globalC, Decl(scriptLookingFile01.ts, 2, 3))
|
||||
>malkovich : Symbol(malkovich, Decl(scriptLookingFile01.ts, 2, 35))
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
>new URL("../hamsters.jpg", import.meta.url) : URL
|
||||
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any, options?: ObjectURLOptions): string; revokeObjectURL(url: string): void; }
|
||||
>"../hamsters.jpg" : "../hamsters.jpg"
|
||||
>meta.url : any
|
||||
>import.meta.url : any
|
||||
>import.meta : ImportMeta
|
||||
>meta : any
|
||||
>url : any
|
||||
>toString : () => string
|
||||
|
@ -30,13 +31,15 @@
|
|||
|
||||
const size = import.meta.scriptElement.dataset.size || 300;
|
||||
>size : any
|
||||
> : any
|
||||
>import.meta.scriptElement.dataset.size || 300 : any
|
||||
>import.meta.scriptElement.dataset.size : any
|
||||
>import.meta.scriptElement.dataset : any
|
||||
>import.meta.scriptElement : any
|
||||
>import.meta : ImportMeta
|
||||
>meta : any
|
||||
>scriptElement : any
|
||||
>dataset : any
|
||||
>size : any
|
||||
>|| 300 : any
|
||||
> : any
|
||||
>300 : 300
|
||||
|
||||
const image = new Image();
|
||||
|
@ -79,33 +82,41 @@
|
|||
|
||||
=== tests/cases/conformance/es2019/importMeta/moduleLookingFile01.ts ===
|
||||
export let x = import.meta;
|
||||
>x : any
|
||||
> : any
|
||||
>x : ImportMeta
|
||||
>import.meta : ImportMeta
|
||||
>meta : any
|
||||
|
||||
export let y = import.metal;
|
||||
>y : any
|
||||
> : any
|
||||
>import.metal : any
|
||||
>metal : any
|
||||
|
||||
export let z = import.import.import.malkovich;
|
||||
>z : any
|
||||
> : any
|
||||
>import.import.import.malkovich : any
|
||||
>import.import.import : any
|
||||
>import.import : any
|
||||
>import : any
|
||||
>import : any
|
||||
>malkovich : any
|
||||
|
||||
=== tests/cases/conformance/es2019/importMeta/scriptLookingFile01.ts ===
|
||||
let globalA = import.meta;
|
||||
>globalA : any
|
||||
> : any
|
||||
>globalA : ImportMeta
|
||||
>import.meta : ImportMeta
|
||||
>meta : any
|
||||
|
||||
let globalB = import.metal;
|
||||
>globalB : any
|
||||
> : any
|
||||
>import.metal : any
|
||||
>metal : any
|
||||
|
||||
let globalC = import.import.import.malkovich;
|
||||
>globalC : any
|
||||
> : any
|
||||
>import.import.import.malkovich : any
|
||||
>import.import.import : any
|
||||
>import.import : any
|
||||
>import : any
|
||||
>import : any
|
||||
>malkovich : any
|
||||
|
||||
|
|
Loading…
Reference in a new issue