Let harness to name file even when single unit data specified but there is filename tag

This commit is contained in:
Sheetal Nandi
2015-09-10 14:19:57 -07:00
parent 1dc3414007
commit 63de162d1e
159 changed files with 799 additions and 822 deletions
+1 -1
View File
@@ -1673,7 +1673,7 @@ module Harness {
}
// normalize the fileName for the single file case
currentFileName = testUnitData.length > 0 ? currentFileName : Path.getFileName(fileName);
currentFileName = testUnitData.length > 0 || currentFileName ? currentFileName : Path.getFileName(fileName);
// EOF, push whatever remains
let newTestFile2 = {
@@ -1,4 +1,4 @@
//// [constEnumMergingWithValues1.ts]
//// [m1.ts]
function foo() {}
module foo {
@@ -7,7 +7,7 @@ module foo {
export = foo
//// [constEnumMergingWithValues1.js]
//// [m1.js]
define(["require", "exports"], function (require, exports) {
function foo() { }
return foo;
@@ -1,16 +1,16 @@
=== tests/cases/compiler/constEnumMergingWithValues1.ts ===
=== tests/cases/compiler/m1.ts ===
function foo() {}
>foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17))
module foo {
>foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17))
const enum E { X }
>E : Symbol(E, Decl(constEnumMergingWithValues1.ts, 2, 12))
>X : Symbol(E.X, Decl(constEnumMergingWithValues1.ts, 3, 18))
>E : Symbol(E, Decl(m1.ts, 2, 12))
>X : Symbol(E.X, Decl(m1.ts, 3, 18))
}
export = foo
>foo : Symbol(foo, Decl(constEnumMergingWithValues1.ts, 0, 0), Decl(constEnumMergingWithValues1.ts, 1, 17))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 17))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/constEnumMergingWithValues1.ts ===
=== tests/cases/compiler/m1.ts ===
function foo() {}
>foo : typeof foo
@@ -1,4 +1,4 @@
//// [constEnumMergingWithValues2.ts]
//// [m1.ts]
class foo {}
module foo {
@@ -7,7 +7,7 @@ module foo {
export = foo
//// [constEnumMergingWithValues2.js]
//// [m1.js]
define(["require", "exports"], function (require, exports) {
var foo = (function () {
function foo() {
@@ -1,16 +1,16 @@
=== tests/cases/compiler/constEnumMergingWithValues2.ts ===
=== tests/cases/compiler/m1.ts ===
class foo {}
>foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12))
module foo {
>foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12))
const enum E { X }
>E : Symbol(E, Decl(constEnumMergingWithValues2.ts, 2, 12))
>X : Symbol(E.X, Decl(constEnumMergingWithValues2.ts, 3, 18))
>E : Symbol(E, Decl(m1.ts, 2, 12))
>X : Symbol(E.X, Decl(m1.ts, 3, 18))
}
export = foo
>foo : Symbol(foo, Decl(constEnumMergingWithValues2.ts, 0, 0), Decl(constEnumMergingWithValues2.ts, 1, 12))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 12))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/constEnumMergingWithValues2.ts ===
=== tests/cases/compiler/m1.ts ===
class foo {}
>foo : foo
@@ -1,4 +1,4 @@
//// [constEnumMergingWithValues3.ts]
//// [m1.ts]
enum foo { A }
module foo {
@@ -7,7 +7,7 @@ module foo {
export = foo
//// [constEnumMergingWithValues3.js]
//// [m1.js]
define(["require", "exports"], function (require, exports) {
var foo;
(function (foo) {
@@ -1,17 +1,17 @@
=== tests/cases/compiler/constEnumMergingWithValues3.ts ===
=== tests/cases/compiler/m1.ts ===
enum foo { A }
>foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14))
>A : Symbol(foo.A, Decl(constEnumMergingWithValues3.ts, 1, 10))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14))
>A : Symbol(foo.A, Decl(m1.ts, 1, 10))
module foo {
>foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14))
const enum E { X }
>E : Symbol(E, Decl(constEnumMergingWithValues3.ts, 2, 12))
>X : Symbol(E.X, Decl(constEnumMergingWithValues3.ts, 3, 18))
>E : Symbol(E, Decl(m1.ts, 2, 12))
>X : Symbol(E.X, Decl(m1.ts, 3, 18))
}
export = foo
>foo : Symbol(foo, Decl(constEnumMergingWithValues3.ts, 0, 0), Decl(constEnumMergingWithValues3.ts, 1, 14))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 1, 14))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/constEnumMergingWithValues3.ts ===
=== tests/cases/compiler/m1.ts ===
enum foo { A }
>foo : foo
@@ -1,4 +1,4 @@
//// [constEnumMergingWithValues4.ts]
//// [m1.ts]
module foo {
const enum E { X }
@@ -11,7 +11,7 @@ module foo {
export = foo
//// [constEnumMergingWithValues4.js]
//// [m1.js]
define(["require", "exports"], function (require, exports) {
var foo;
(function (foo) {
@@ -1,21 +1,21 @@
=== tests/cases/compiler/constEnumMergingWithValues4.ts ===
=== tests/cases/compiler/m1.ts ===
module foo {
>foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1))
const enum E { X }
>E : Symbol(E, Decl(constEnumMergingWithValues4.ts, 1, 12))
>X : Symbol(E.X, Decl(constEnumMergingWithValues4.ts, 2, 18))
>E : Symbol(E, Decl(m1.ts, 1, 12))
>X : Symbol(E.X, Decl(m1.ts, 2, 18))
}
module foo {
>foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1))
var x = 1;
>x : Symbol(x, Decl(constEnumMergingWithValues4.ts, 6, 7))
>x : Symbol(x, Decl(m1.ts, 6, 7))
}
export = foo
>foo : Symbol(foo, Decl(constEnumMergingWithValues4.ts, 0, 0), Decl(constEnumMergingWithValues4.ts, 3, 1))
>foo : Symbol(foo, Decl(m1.ts, 0, 0), Decl(m1.ts, 3, 1))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/constEnumMergingWithValues4.ts ===
=== tests/cases/compiler/m1.ts ===
module foo {
>foo : typeof foo
@@ -1,4 +1,4 @@
//// [constEnumMergingWithValues5.ts]
//// [m1.ts]
module foo {
const enum E { X }
@@ -6,7 +6,7 @@ module foo {
export = foo
//// [constEnumMergingWithValues5.js]
//// [m1.js]
define(["require", "exports"], function (require, exports) {
var foo;
(function (foo) {
@@ -1,13 +1,13 @@
=== tests/cases/compiler/constEnumMergingWithValues5.ts ===
=== tests/cases/compiler/m1.ts ===
module foo {
>foo : Symbol(foo, Decl(constEnumMergingWithValues5.ts, 0, 0))
>foo : Symbol(foo, Decl(m1.ts, 0, 0))
const enum E { X }
>E : Symbol(E, Decl(constEnumMergingWithValues5.ts, 1, 12))
>X : Symbol(E.X, Decl(constEnumMergingWithValues5.ts, 2, 18))
>E : Symbol(E, Decl(m1.ts, 1, 12))
>X : Symbol(E.X, Decl(m1.ts, 2, 18))
}
export = foo
>foo : Symbol(foo, Decl(constEnumMergingWithValues5.ts, 0, 0))
>foo : Symbol(foo, Decl(m1.ts, 0, 0))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/constEnumMergingWithValues5.ts ===
=== tests/cases/compiler/m1.ts ===
module foo {
>foo : typeof foo
@@ -1,4 +1,4 @@
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts]
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts]
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js]
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.js]
@@ -1,3 +1,3 @@
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts ===
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts ===
No type information for this code.
@@ -1,3 +1,3 @@
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts ===
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts ===
No type information for this code.
+3 -3
View File
@@ -1,4 +1,4 @@
//// [es6ExportClause.ts]
//// [server.ts]
class c {
}
@@ -16,7 +16,7 @@ export { i, m as instantiatedModule };
export { uninstantiated };
export { x };
//// [es6ExportClause.js]
//// [server.js]
class c {
}
var m;
@@ -30,7 +30,7 @@ export { m as instantiatedModule };
export { x };
//// [es6ExportClause.d.ts]
//// [server.d.ts]
declare class c {
}
interface i {
@@ -1,38 +1,38 @@
=== tests/cases/compiler/es6ExportClause.ts ===
=== tests/cases/compiler/server.ts ===
class c {
>c : Symbol(c, Decl(es6ExportClause.ts, 0, 0))
>c : Symbol(c, Decl(server.ts, 0, 0))
}
interface i {
>i : Symbol(i, Decl(es6ExportClause.ts, 2, 1))
>i : Symbol(i, Decl(server.ts, 2, 1))
}
module m {
>m : Symbol(m, Decl(es6ExportClause.ts, 4, 1))
>m : Symbol(m, Decl(server.ts, 4, 1))
export var x = 10;
>x : Symbol(x, Decl(es6ExportClause.ts, 6, 14))
>x : Symbol(x, Decl(server.ts, 6, 14))
}
var x = 10;
>x : Symbol(x, Decl(es6ExportClause.ts, 8, 3))
>x : Symbol(x, Decl(server.ts, 8, 3))
module uninstantiated {
>uninstantiated : Symbol(uninstantiated, Decl(es6ExportClause.ts, 8, 11))
>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 8, 11))
}
export { c };
>c : Symbol(c, Decl(es6ExportClause.ts, 11, 8))
>c : Symbol(c, Decl(server.ts, 11, 8))
export { c as c2 };
>c : Symbol(c2, Decl(es6ExportClause.ts, 12, 8))
>c2 : Symbol(c2, Decl(es6ExportClause.ts, 12, 8))
>c : Symbol(c2, Decl(server.ts, 12, 8))
>c2 : Symbol(c2, Decl(server.ts, 12, 8))
export { i, m as instantiatedModule };
>i : Symbol(i, Decl(es6ExportClause.ts, 13, 8))
>m : Symbol(instantiatedModule, Decl(es6ExportClause.ts, 13, 11))
>instantiatedModule : Symbol(instantiatedModule, Decl(es6ExportClause.ts, 13, 11))
>i : Symbol(i, Decl(server.ts, 13, 8))
>m : Symbol(instantiatedModule, Decl(server.ts, 13, 11))
>instantiatedModule : Symbol(instantiatedModule, Decl(server.ts, 13, 11))
export { uninstantiated };
>uninstantiated : Symbol(uninstantiated, Decl(es6ExportClause.ts, 14, 8))
>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 14, 8))
export { x };
>x : Symbol(x, Decl(es6ExportClause.ts, 15, 8))
>x : Symbol(x, Decl(server.ts, 15, 8))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/es6ExportClause.ts ===
=== tests/cases/compiler/server.ts ===
class c {
>c : c
@@ -1,4 +1,4 @@
//// [es6ExportClauseInEs5.ts]
//// [server.ts]
class c {
}
@@ -16,7 +16,7 @@ export { i, m as instantiatedModule };
export { uninstantiated };
export { x };
//// [es6ExportClauseInEs5.js]
//// [server.js]
var c = (function () {
function c() {
}
@@ -33,7 +33,7 @@ var x = 10;
exports.x = x;
//// [es6ExportClauseInEs5.d.ts]
//// [server.d.ts]
declare class c {
}
interface i {
@@ -1,38 +1,38 @@
=== tests/cases/compiler/es6ExportClauseInEs5.ts ===
=== tests/cases/compiler/server.ts ===
class c {
>c : Symbol(c, Decl(es6ExportClauseInEs5.ts, 0, 0))
>c : Symbol(c, Decl(server.ts, 0, 0))
}
interface i {
>i : Symbol(i, Decl(es6ExportClauseInEs5.ts, 2, 1))
>i : Symbol(i, Decl(server.ts, 2, 1))
}
module m {
>m : Symbol(m, Decl(es6ExportClauseInEs5.ts, 4, 1))
>m : Symbol(m, Decl(server.ts, 4, 1))
export var x = 10;
>x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 6, 14))
>x : Symbol(x, Decl(server.ts, 6, 14))
}
var x = 10;
>x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 8, 3))
>x : Symbol(x, Decl(server.ts, 8, 3))
module uninstantiated {
>uninstantiated : Symbol(uninstantiated, Decl(es6ExportClauseInEs5.ts, 8, 11))
>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 8, 11))
}
export { c };
>c : Symbol(c, Decl(es6ExportClauseInEs5.ts, 11, 8))
>c : Symbol(c, Decl(server.ts, 11, 8))
export { c as c2 };
>c : Symbol(c2, Decl(es6ExportClauseInEs5.ts, 12, 8))
>c2 : Symbol(c2, Decl(es6ExportClauseInEs5.ts, 12, 8))
>c : Symbol(c2, Decl(server.ts, 12, 8))
>c2 : Symbol(c2, Decl(server.ts, 12, 8))
export { i, m as instantiatedModule };
>i : Symbol(i, Decl(es6ExportClauseInEs5.ts, 13, 8))
>m : Symbol(instantiatedModule, Decl(es6ExportClauseInEs5.ts, 13, 11))
>instantiatedModule : Symbol(instantiatedModule, Decl(es6ExportClauseInEs5.ts, 13, 11))
>i : Symbol(i, Decl(server.ts, 13, 8))
>m : Symbol(instantiatedModule, Decl(server.ts, 13, 11))
>instantiatedModule : Symbol(instantiatedModule, Decl(server.ts, 13, 11))
export { uninstantiated };
>uninstantiated : Symbol(uninstantiated, Decl(es6ExportClauseInEs5.ts, 14, 8))
>uninstantiated : Symbol(uninstantiated, Decl(server.ts, 14, 8))
export { x };
>x : Symbol(x, Decl(es6ExportClauseInEs5.ts, 15, 8))
>x : Symbol(x, Decl(server.ts, 15, 8))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/es6ExportClauseInEs5.ts ===
=== tests/cases/compiler/server.ts ===
class c {
>c : c
@@ -1,7 +1,7 @@
tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
tests/cases/conformance/externalModules/foo_0.ts(10,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
==== tests/cases/conformance/externalModules/exportAssignmentAndDeclaration.ts (1 errors) ====
==== tests/cases/conformance/externalModules/foo_0.ts (1 errors) ====
export enum E1 {
A,B,C
}
@@ -1,4 +1,4 @@
//// [exportAssignmentAndDeclaration.ts]
//// [foo_0.ts]
export enum E1 {
A,B,C
}
@@ -10,7 +10,7 @@ class C1 {
// Invalid, as there is already an exported member.
export = C1;
//// [exportAssignmentAndDeclaration.js]
//// [foo_0.js]
define(["require", "exports"], function (require, exports) {
(function (E1) {
E1[E1["A"] = 0] = "A";
@@ -1,4 +1,4 @@
//// [exportAssignmentError.ts]
//// [exportEqualsModule_A.ts]
module M {
export var x;
}
@@ -8,7 +8,7 @@ import M2 = M;
export = M2; // should not error
//// [exportAssignmentError.js]
//// [exportEqualsModule_A.js]
define(["require", "exports"], function (require, exports) {
var M;
(function (M) {
@@ -1,15 +1,15 @@
=== tests/cases/compiler/exportAssignmentError.ts ===
=== tests/cases/compiler/exportEqualsModule_A.ts ===
module M {
>M : Symbol(M, Decl(exportAssignmentError.ts, 0, 0))
>M : Symbol(M, Decl(exportEqualsModule_A.ts, 0, 0))
export var x;
>x : Symbol(x, Decl(exportAssignmentError.ts, 1, 11))
>x : Symbol(x, Decl(exportEqualsModule_A.ts, 1, 11))
}
import M2 = M;
>M2 : Symbol(M2, Decl(exportAssignmentError.ts, 2, 1))
>M : Symbol(M, Decl(exportAssignmentError.ts, 0, 0))
>M2 : Symbol(M2, Decl(exportEqualsModule_A.ts, 2, 1))
>M : Symbol(M, Decl(exportEqualsModule_A.ts, 0, 0))
export = M2; // should not error
>M2 : Symbol(M2, Decl(exportAssignmentError.ts, 2, 1))
>M2 : Symbol(M2, Decl(exportEqualsModule_A.ts, 2, 1))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/exportAssignmentError.ts ===
=== tests/cases/compiler/exportEqualsModule_A.ts ===
module M {
>M : typeof M
@@ -1,7 +1,7 @@
tests/cases/conformance/externalModules/importNonStringLiteral.ts(2,22): error TS1141: String literal expected.
tests/cases/conformance/externalModules/vs/foo_0.ts(2,22): error TS1141: String literal expected.
==== tests/cases/conformance/externalModules/importNonStringLiteral.ts (1 errors) ====
==== tests/cases/conformance/externalModules/vs/foo_0.ts (1 errors) ====
var x = "filename";
import foo = require(x); // invalid
~
@@ -1,7 +1,7 @@
//// [importNonStringLiteral.ts]
//// [foo_0.ts]
var x = "filename";
import foo = require(x); // invalid
//// [importNonStringLiteral.js]
//// [foo_0.js]
var x = "filename";
@@ -1,13 +1,13 @@
tests/cases/conformance/externalModules/initializersInDeclarations.ts(5,9): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/initializersInDeclarations.ts(6,16): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/initializersInDeclarations.ts(7,16): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/conformance/externalModules/initializersInDeclarations.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/initializersInDeclarations.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/initializersInDeclarations.ts(16,2): error TS1036: Statements are not allowed in ambient contexts.
tests/cases/conformance/externalModules/initializersInDeclarations.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/file1.d.ts(5,9): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/file1.d.ts(6,16): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/file1.d.ts(7,16): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/conformance/externalModules/file1.d.ts(12,15): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/file1.d.ts(13,15): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/file1.d.ts(16,2): error TS1036: Statements are not allowed in ambient contexts.
tests/cases/conformance/externalModules/file1.d.ts(18,16): error TS1039: Initializers are not allowed in ambient contexts.
==== tests/cases/conformance/externalModules/initializersInDeclarations.ts (7 errors) ====
==== tests/cases/conformance/externalModules/file1.d.ts (7 errors) ====
// Errors: Initializers & statements in declaration file
@@ -1,23 +0,0 @@
//// [initializersInDeclarations.ts]
// Errors: Initializers & statements in declaration file
declare class Foo {
name = "test";
"some prop" = 42;
fn(): boolean {
return false;
}
}
declare var x = [];
declare var y = {};
declare module M1 {
while(true);
export var v1 = () => false;
}
//// [initializersInDeclarations.js]
// Errors: Initializers & statements in declaration file
@@ -1,7 +1,7 @@
tests/cases/compiler/isolatedModulesAmbientConstEnum.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided.
tests/cases/compiler/file1.ts(3,20): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/isolatedModulesAmbientConstEnum.ts (1 errors) ====
==== tests/cases/compiler/file1.ts (1 errors) ====
declare const enum E { X = 1}
@@ -1,8 +1,8 @@
//// [isolatedModulesAmbientConstEnum.ts]
//// [file1.ts]
declare const enum E { X = 1}
export var y;
//// [isolatedModulesAmbientConstEnum.js]
//// [file1.js]
export var y;
@@ -2,6 +2,6 @@ error TS5053: Option 'declaration' cannot be specified with option 'isolatedModu
!!! error TS5053: Option 'declaration' cannot be specified with option 'isolatedModules'.
==== tests/cases/compiler/isolatedModulesDeclaration.ts (0 errors) ====
==== tests/cases/compiler/file1.ts (0 errors) ====
export var x;
@@ -1,10 +1,10 @@
//// [isolatedModulesDeclaration.ts]
//// [file1.ts]
export var x;
//// [isolatedModulesDeclaration.js]
//// [file1.js]
export var x;
//// [isolatedModulesDeclaration.d.ts]
//// [file1.d.ts]
export declare var x: any;
@@ -1,5 +1,5 @@
//// [isolatedModulesES6.ts]
//// [file1.ts]
export var x;
//// [isolatedModulesES6.js]
//// [file1.js]
export var x;
@@ -1,4 +1,4 @@
=== tests/cases/compiler/isolatedModulesES6.ts ===
=== tests/cases/compiler/file1.ts ===
export var x;
>x : Symbol(x, Decl(isolatedModulesES6.ts, 0, 10))
>x : Symbol(x, Decl(file1.ts, 0, 10))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/isolatedModulesES6.ts ===
=== tests/cases/compiler/file1.ts ===
export var x;
>x : any
@@ -1,10 +1,10 @@
tests/cases/compiler/isolatedModulesImportExportElision.ts(2,17): error TS2307: Cannot find module 'module'.
tests/cases/compiler/isolatedModulesImportExportElision.ts(3,18): error TS2307: Cannot find module 'module'.
tests/cases/compiler/isolatedModulesImportExportElision.ts(4,21): error TS2307: Cannot find module 'module'.
tests/cases/compiler/isolatedModulesImportExportElision.ts(12,18): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(2,17): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(3,18): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(4,21): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(12,18): error TS2307: Cannot find module 'module'.
==== tests/cases/compiler/isolatedModulesImportExportElision.ts (4 errors) ====
==== tests/cases/compiler/file1.ts (4 errors) ====
import {c} from "module"
~~~~~~~~
@@ -1,4 +1,4 @@
//// [isolatedModulesImportExportElision.ts]
//// [file1.ts]
import {c} from "module"
import {c2} from "module"
@@ -13,7 +13,7 @@ let y = ns.value;
export {c1} from "module";
export var z = x;
//// [isolatedModulesImportExportElision.js]
//// [file1.js]
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
@@ -2,6 +2,6 @@ error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedMo
!!! error TS5053: Option 'noEmitOnError' cannot be specified with option 'isolatedModules'.
==== tests/cases/compiler/isolatedModulesNoEmitOnError.ts (0 errors) ====
==== tests/cases/compiler/file1.ts (0 errors) ====
export var x;
@@ -1,7 +1,7 @@
tests/cases/compiler/isolatedModulesNoExternalModule.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
tests/cases/compiler/file1.ts(2,1): error TS1208: Cannot compile namespaces when the '--isolatedModules' flag is provided.
==== tests/cases/compiler/isolatedModulesNoExternalModule.ts (1 errors) ====
==== tests/cases/compiler/file1.ts (1 errors) ====
var x;
~~~
@@ -1,6 +1,6 @@
//// [isolatedModulesNoExternalModule.ts]
//// [file1.ts]
var x;
//// [isolatedModulesNoExternalModule.js]
//// [file1.js]
var x;
@@ -1,10 +1,10 @@
//// [isolatedModulesNonAmbientConstEnum.ts]
//// [file1.ts]
const enum E { X = 100 };
var e = E.X;
export var x;
//// [isolatedModulesNonAmbientConstEnum.js]
//// [file1.js]
var E;
(function (E) {
E[E["X"] = 100] = "X";
@@ -1,15 +1,15 @@
=== tests/cases/compiler/isolatedModulesNonAmbientConstEnum.ts ===
=== tests/cases/compiler/file1.ts ===
const enum E { X = 100 };
>E : Symbol(E, Decl(isolatedModulesNonAmbientConstEnum.ts, 0, 0))
>X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14))
>E : Symbol(E, Decl(file1.ts, 0, 0))
>X : Symbol(E.X, Decl(file1.ts, 1, 14))
var e = E.X;
>e : Symbol(e, Decl(isolatedModulesNonAmbientConstEnum.ts, 2, 3))
>E.X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14))
>E : Symbol(E, Decl(isolatedModulesNonAmbientConstEnum.ts, 0, 0))
>X : Symbol(E.X, Decl(isolatedModulesNonAmbientConstEnum.ts, 1, 14))
>e : Symbol(e, Decl(file1.ts, 2, 3))
>E.X : Symbol(E.X, Decl(file1.ts, 1, 14))
>E : Symbol(E, Decl(file1.ts, 0, 0))
>X : Symbol(E.X, Decl(file1.ts, 1, 14))
export var x;
>x : Symbol(x, Decl(isolatedModulesNonAmbientConstEnum.ts, 3, 10))
>x : Symbol(x, Decl(file1.ts, 3, 10))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/isolatedModulesNonAmbientConstEnum.ts ===
=== tests/cases/compiler/file1.ts ===
const enum E { X = 100 };
>E : E
@@ -1,7 +1,7 @@
//// [isolatedModulesSourceMap.ts]
//// [file1.ts]
export var x = 1;
//// [isolatedModulesSourceMap.js]
//// [file1.js]
export var x = 1;
//# sourceMappingURL=isolatedModulesSourceMap.js.map
//# sourceMappingURL=file1.js.map
@@ -1,2 +1,2 @@
//// [isolatedModulesSourceMap.js.map]
{"version":3,"file":"isolatedModulesSourceMap.js","sourceRoot":"","sources":["isolatedModulesSourceMap.ts"],"names":[],"mappings":"AACA,WAAW,CAAC,GAAG,CAAC,CAAC"}
//// [file1.js.map]
{"version":3,"file":"file1.js","sourceRoot":"","sources":["file1.ts"],"names":[],"mappings":"AACA,WAAW,CAAC,GAAG,CAAC,CAAC"}
@@ -1,12 +1,12 @@
===================================================================
JsFile: isolatedModulesSourceMap.js
mapUrl: isolatedModulesSourceMap.js.map
JsFile: file1.js
mapUrl: file1.js.map
sourceRoot:
sources: isolatedModulesSourceMap.ts
sources: file1.ts
===================================================================
-------------------------------------------------------------------
emittedFile:tests/cases/compiler/isolatedModulesSourceMap.js
sourceFile:isolatedModulesSourceMap.ts
emittedFile:tests/cases/compiler/file1.js
sourceFile:file1.ts
-------------------------------------------------------------------
>>>export var x = 1;
1 >
@@ -15,7 +15,7 @@ sourceFile:isolatedModulesSourceMap.ts
4 > ^^^
5 > ^
6 > ^
7 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
7 > ^^^^^^^^^^^^^^^->
1 >
>
2 >export var
@@ -30,4 +30,4 @@ sourceFile:isolatedModulesSourceMap.ts
5 >Emitted(1, 17) Source(2, 17) + SourceIndex(0)
6 >Emitted(1, 18) Source(2, 18) + SourceIndex(0)
---
>>>//# sourceMappingURL=isolatedModulesSourceMap.js.map
>>>//# sourceMappingURL=file1.js.map
@@ -1,5 +1,5 @@
=== tests/cases/compiler/isolatedModulesSourceMap.ts ===
=== tests/cases/compiler/file1.ts ===
export var x = 1;
>x : Symbol(x, Decl(isolatedModulesSourceMap.ts, 1, 10))
>x : Symbol(x, Decl(file1.ts, 1, 10))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/isolatedModulesSourceMap.ts ===
=== tests/cases/compiler/file1.ts ===
export var x = 1;
>x : number
@@ -1,4 +1,4 @@
//// [isolatedModulesSpecifiedModule.ts]
//// [file1.ts]
export var x;
//// [isolatedModulesSpecifiedModule.js]
//// [file1.js]
@@ -1,4 +1,4 @@
=== tests/cases/compiler/isolatedModulesSpecifiedModule.ts ===
=== tests/cases/compiler/file1.ts ===
export var x;
>x : Symbol(x, Decl(isolatedModulesSpecifiedModule.ts, 0, 10))
>x : Symbol(x, Decl(file1.ts, 0, 10))
@@ -1,4 +1,4 @@
=== tests/cases/compiler/isolatedModulesSpecifiedModule.ts ===
=== tests/cases/compiler/file1.ts ===
export var x;
>x : any
@@ -2,5 +2,5 @@ error TS5047: Option 'isolatedModules' can only be used when either option'--mod
!!! error TS5047: Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher.
==== tests/cases/compiler/isolatedModulesUnspecifiedModule.ts (0 errors) ====
==== tests/cases/compiler/file1.ts (0 errors) ====
export var x;
@@ -1,4 +1,4 @@
//// [isolatedModulesUnspecifiedModule.ts]
//// [file1.ts]
export var x;
//// [isolatedModulesUnspecifiedModule.js]
//// [file1.js]
@@ -1,18 +1,18 @@
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,8): error TS1003: Identifier expected.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,10): error TS1005: ';' expected.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,10): error TS2304: Cannot find name 'data'.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,15): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,18): error TS1005: ':' expected.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,21): error TS1109: Expression expected.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(10,22): error TS1109: Expression expected.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,8): error TS1003: Identifier expected.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,9): error TS2304: Cannot find name 'data'.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,13): error TS1005: ';' expected.
tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx(11,20): error TS1161: Unterminated regular expression literal.
tests/cases/conformance/jsx/file.tsx(10,8): error TS1003: Identifier expected.
tests/cases/conformance/jsx/file.tsx(10,10): error TS1005: ';' expected.
tests/cases/conformance/jsx/file.tsx(10,10): error TS2304: Cannot find name 'data'.
tests/cases/conformance/jsx/file.tsx(10,15): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/jsx/file.tsx(10,18): error TS1005: ':' expected.
tests/cases/conformance/jsx/file.tsx(10,21): error TS1109: Expression expected.
tests/cases/conformance/jsx/file.tsx(10,22): error TS1109: Expression expected.
tests/cases/conformance/jsx/file.tsx(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/jsx/file.tsx(11,8): error TS1003: Identifier expected.
tests/cases/conformance/jsx/file.tsx(11,9): error TS2304: Cannot find name 'data'.
tests/cases/conformance/jsx/file.tsx(11,13): error TS1005: ';' expected.
tests/cases/conformance/jsx/file.tsx(11,20): error TS1161: Unterminated regular expression literal.
==== tests/cases/conformance/jsx/tsxAttributeInvalidNames.tsx (12 errors) ====
==== tests/cases/conformance/jsx/file.tsx (12 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeInvalidNames.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -11,7 +11,7 @@ declare module JSX {
<test1 32data={32} />;
<test2 -data={32} />;
//// [tsxAttributeInvalidNames.jsx]
//// [file.jsx]
// Invalid names
<test1 />;
32;
@@ -1,13 +1,13 @@
tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(23,8): error TS2322: Type 'string' is not assignable to type 'number'.
tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(24,8): error TS2339: Property 'y' does not exist on type 'Attribs1'.
tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(25,8): error TS2339: Property 'y' does not exist on type 'Attribs1'.
tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(26,8): error TS2322: Type 'string' is not assignable to type 'number'.
tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(27,8): error TS2339: Property 'var' does not exist on type 'Attribs1'.
tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(29,1): error TS2324: Property 'reqd' is missing in type '{ reqd: string; }'.
tests/cases/conformance/jsx/tsxAttributeResolution1.tsx(30,8): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(23,8): error TS2322: Type 'string' is not assignable to type 'number'.
tests/cases/conformance/jsx/file.tsx(24,8): error TS2339: Property 'y' does not exist on type 'Attribs1'.
tests/cases/conformance/jsx/file.tsx(25,8): error TS2339: Property 'y' does not exist on type 'Attribs1'.
tests/cases/conformance/jsx/file.tsx(26,8): error TS2322: Type 'string' is not assignable to type 'number'.
tests/cases/conformance/jsx/file.tsx(27,8): error TS2339: Property 'var' does not exist on type 'Attribs1'.
tests/cases/conformance/jsx/file.tsx(29,1): error TS2324: Property 'reqd' is missing in type '{ reqd: string; }'.
tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type 'number' is not assignable to type 'string'.
==== tests/cases/conformance/jsx/tsxAttributeResolution1.tsx (7 errors) ====
==== tests/cases/conformance/jsx/file.tsx (7 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution1.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -34,7 +34,7 @@ interface Attribs1 {
<var var='var' />;
//// [tsxAttributeResolution1.jsx]
//// [file.jsx]
// OK
<test1 x={0}/>; // OK
<test1 />; // OK
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/tsxAttributeResolution2.tsx(17,21): error TS2339: Property 'leng' does not exist on type 'string'.
tests/cases/conformance/jsx/file.tsx(17,21): error TS2339: Property 'leng' does not exist on type 'string'.
==== tests/cases/conformance/jsx/tsxAttributeResolution2.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution2.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -18,7 +18,7 @@ interface Attribs1 {
<test1 c1={(x) => x.leng} />; // Error, no leng on 'string'
//// [tsxAttributeResolution2.jsx]
//// [file.jsx]
// OK
<test1 c1={function (x) { return x.length; }}/>; // OK
<test1 data-c1={function (x) { return x.leng; }}/>; // OK
@@ -1,12 +1,12 @@
tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(19,8): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property.
tests/cases/conformance/jsx/file.tsx(19,8): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property.
Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(23,1): error TS2324: Property 'x' is missing in type 'Attribs1'.
tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(31,15): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property.
tests/cases/conformance/jsx/file.tsx(23,1): error TS2324: Property 'x' is missing in type 'Attribs1'.
tests/cases/conformance/jsx/file.tsx(31,15): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property.
Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/tsxAttributeResolution3.tsx(39,8): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(39,8): error TS2322: Type 'number' is not assignable to type 'string'.
==== tests/cases/conformance/jsx/tsxAttributeResolution3.tsx (4 errors) ====
==== tests/cases/conformance/jsx/file.tsx (4 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution3.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -40,7 +40,7 @@ var obj7 = { x: 'foo' };
<test1 x={32} {...obj7} />
//// [tsxAttributeResolution3.jsx]
//// [file.jsx]
// OK
var obj1 = { x: 'foo' };
<test1 {...obj1}/>;
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/tsxAttributeResolution4.tsx(15,26): error TS2339: Property 'len' does not exist on type 'string'.
tests/cases/conformance/jsx/file.tsx(15,26): error TS2339: Property 'len' does not exist on type 'string'.
==== tests/cases/conformance/jsx/tsxAttributeResolution4.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution4.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -16,7 +16,7 @@ interface Attribs1 {
<test1 {... {x: (n) => n.len} } />;
//// [tsxAttributeResolution4.jsx]
//// [file.jsx]
// OK
<test1 {...{ x: function (n) { return 0; } }}/>;
// Error, no member 'len' on 'string'
@@ -1,10 +1,10 @@
tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(21,16): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property.
tests/cases/conformance/jsx/file.tsx(21,16): error TS2606: Property 'x' of JSX spread attribute is not assignable to target property.
Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(25,9): error TS2324: Property 'x' is missing in type 'Attribs1'.
tests/cases/conformance/jsx/tsxAttributeResolution5.tsx(29,1): error TS2324: Property 'x' is missing in type 'Attribs1'.
tests/cases/conformance/jsx/file.tsx(25,9): error TS2324: Property 'x' is missing in type 'Attribs1'.
tests/cases/conformance/jsx/file.tsx(29,1): error TS2324: Property 'x' is missing in type 'Attribs1'.
==== tests/cases/conformance/jsx/tsxAttributeResolution5.tsx (3 errors) ====
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution5.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -31,7 +31,7 @@ function make3<T extends {y: string}> (obj: T) {
<test2 {...{}} />; // OK
//// [tsxAttributeResolution5.jsx]
//// [file.jsx]
function make1(obj) {
return <test1 {...obj}/>; // OK
}
@@ -1,9 +1,9 @@
tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(10,8): error TS2322: Type 'boolean' is not assignable to type 'string'.
tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(11,8): error TS2322: Type 'string' is not assignable to type 'boolean'.
tests/cases/conformance/jsx/tsxAttributeResolution6.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: boolean; }'.
tests/cases/conformance/jsx/file.tsx(10,8): error TS2322: Type 'boolean' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(11,8): error TS2322: Type 'string' is not assignable to type 'boolean'.
tests/cases/conformance/jsx/file.tsx(12,1): error TS2324: Property 'n' is missing in type '{ n: boolean; }'.
==== tests/cases/conformance/jsx/tsxAttributeResolution6.tsx (3 errors) ====
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution6.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -18,7 +18,7 @@ declare module JSX {
<test2 n />;
//// [tsxAttributeResolution6.jsx]
//// [file.jsx]
// Error
<test1 s=/>;
<test1 n='true'/>;
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/tsxAttributeResolution7.tsx(9,8): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/conformance/jsx/file.tsx(9,8): error TS2322: Type 'number' is not assignable to type 'string'.
==== tests/cases/conformance/jsx/tsxAttributeResolution7.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution7.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -15,7 +15,7 @@ declare module JSX {
<test1 data-bar={32} />;
//// [tsxAttributeResolution7.jsx]
//// [file.jsx]
// Error
<test1 data-foo={32}/>;
// OK
@@ -1,4 +1,4 @@
//// [tsxAttributeResolution8.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -10,7 +10,7 @@ var x: any;
// Should be OK
<test1 {...x} />
//// [tsxAttributeResolution8.jsx]
//// [file.jsx]
var x;
// Should be OK
<test1 {...x}/>;
@@ -1,23 +1,23 @@
=== tests/cases/conformance/jsx/tsxAttributeResolution8.tsx ===
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : Symbol(JSX, Decl(tsxAttributeResolution8.tsx, 0, 0))
>JSX : Symbol(JSX, Decl(file.tsx, 0, 0))
interface Element { }
>Element : Symbol(Element, Decl(tsxAttributeResolution8.tsx, 0, 20))
>Element : Symbol(Element, Decl(file.tsx, 0, 20))
interface IntrinsicElements {
>IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxAttributeResolution8.tsx, 1, 22))
>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22))
test1: {x: string};
>test1 : Symbol(test1, Decl(tsxAttributeResolution8.tsx, 2, 30))
>x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 3, 10))
>test1 : Symbol(test1, Decl(file.tsx, 2, 30))
>x : Symbol(x, Decl(file.tsx, 3, 10))
}
}
var x: any;
>x : Symbol(x, Decl(tsxAttributeResolution8.tsx, 7, 3))
>x : Symbol(x, Decl(file.tsx, 7, 3))
// Should be OK
<test1 {...x} />
>test1 : Symbol(JSX.IntrinsicElements.test1, Decl(tsxAttributeResolution8.tsx, 2, 30))
>test1 : Symbol(JSX.IntrinsicElements.test1, Decl(file.tsx, 2, 30))
@@ -1,4 +1,4 @@
=== tests/cases/conformance/jsx/tsxAttributeResolution8.tsx ===
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : any
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/tsxElementResolution1.tsx(12,1): error TS2339: Property 'span' does not exist on type 'JSX.IntrinsicElements'.
tests/cases/conformance/jsx/file.tsx(12,1): error TS2339: Property 'span' does not exist on type 'JSX.IntrinsicElements'.
==== tests/cases/conformance/jsx/tsxElementResolution1.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -1,4 +1,4 @@
//// [tsxElementResolution1.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -12,7 +12,7 @@ declare module JSX {
// Fail
<span />;
//// [tsxElementResolution1.jsx]
//// [file.jsx]
// OK
<div />;
// Fail
@@ -1,8 +1,8 @@
tests/cases/conformance/jsx/tsxElementResolution10.tsx(13,1): error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements.
tests/cases/conformance/jsx/file.tsx(13,1): error TS2605: JSX element type '{ x: number; }' is not a constructor function for JSX elements.
Property 'render' is missing in type '{ x: number; }'.
==== tests/cases/conformance/jsx/tsxElementResolution10.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare module JSX {
interface Element { }
interface ElementClass {
@@ -1,4 +1,4 @@
//// [tsxElementResolution10.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface ElementClass {
@@ -20,7 +20,7 @@ var Obj2: Obj2type;
<Obj2 x={32} render={100} />; // OK
//// [tsxElementResolution10.jsx]
//// [file.jsx]
var Obj1;
<Obj1 x={10}/>; // Error, no render member
var Obj2;
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/tsxElementResolution11.tsx(17,7): error TS2339: Property 'x' does not exist on type '{ q?: number; }'.
tests/cases/conformance/jsx/file.tsx(17,7): error TS2339: Property 'x' does not exist on type '{ q?: number; }'.
==== tests/cases/conformance/jsx/tsxElementResolution11.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare module JSX {
interface Element { }
interface ElementAttributesProperty { }
@@ -1,4 +1,4 @@
//// [tsxElementResolution11.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface ElementAttributesProperty { }
@@ -24,7 +24,7 @@ var Obj3: Obj3type;
<Obj3 x={10} />; // OK
//// [tsxElementResolution11.jsx]
//// [file.jsx]
var Obj1;
<Obj1 x={10}/>; // OK
var Obj2;
@@ -1,9 +1,9 @@
tests/cases/conformance/jsx/tsxElementResolution12.tsx(17,2): error TS2304: Cannot find name 'Obj2'.
tests/cases/conformance/jsx/tsxElementResolution12.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property
tests/cases/conformance/jsx/tsxElementResolution12.tsx(30,7): error TS2322: Type 'string' is not assignable to type 'number'.
tests/cases/conformance/jsx/file.tsx(17,2): error TS2304: Cannot find name 'Obj2'.
tests/cases/conformance/jsx/file.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property
tests/cases/conformance/jsx/file.tsx(30,7): error TS2322: Type 'string' is not assignable to type 'number'.
==== tests/cases/conformance/jsx/tsxElementResolution12.tsx (3 errors) ====
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
declare module JSX {
interface Element { }
interface ElementAttributesProperty { pr: any; }
@@ -1,4 +1,4 @@
//// [tsxElementResolution12.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface ElementAttributesProperty { pr: any; }
@@ -31,7 +31,7 @@ var Obj4: Obj4type;
<Obj4 x={'10'} />; // Error
//// [tsxElementResolution12.jsx]
//// [file.jsx]
var Obj1;
<Obj1 x={10}/>; // OK
var obj2;
@@ -1,4 +1,4 @@
//// [tsxElementResolution13.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface ElementAttributesProperty { pr1: any; pr2: any; }
@@ -11,6 +11,6 @@ var obj1: Obj1;
<obj1 x={10} />; // Error
//// [tsxElementResolution13.jsx]
//// [file.jsx]
var obj1;
<obj1 x={10}/>; // Error
@@ -1,25 +1,25 @@
=== tests/cases/conformance/jsx/tsxElementResolution13.tsx ===
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : Symbol(JSX, Decl(tsxElementResolution13.tsx, 0, 0))
>JSX : Symbol(JSX, Decl(file.tsx, 0, 0))
interface Element { }
>Element : Symbol(Element, Decl(tsxElementResolution13.tsx, 0, 20))
>Element : Symbol(Element, Decl(file.tsx, 0, 20))
interface ElementAttributesProperty { pr1: any; pr2: any; }
>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(tsxElementResolution13.tsx, 1, 22))
>pr1 : Symbol(pr1, Decl(tsxElementResolution13.tsx, 2, 38))
>pr2 : Symbol(pr2, Decl(tsxElementResolution13.tsx, 2, 48))
>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(file.tsx, 1, 22))
>pr1 : Symbol(pr1, Decl(file.tsx, 2, 38))
>pr2 : Symbol(pr2, Decl(file.tsx, 2, 48))
}
interface Obj1 {
>Obj1 : Symbol(Obj1, Decl(tsxElementResolution13.tsx, 3, 1))
>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1))
new(n: string): any;
>n : Symbol(n, Decl(tsxElementResolution13.tsx, 6, 5))
>n : Symbol(n, Decl(file.tsx, 6, 5))
}
var obj1: Obj1;
>obj1 : Symbol(obj1, Decl(tsxElementResolution13.tsx, 8, 3))
>Obj1 : Symbol(Obj1, Decl(tsxElementResolution13.tsx, 3, 1))
>obj1 : Symbol(obj1, Decl(file.tsx, 8, 3))
>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1))
<obj1 x={10} />; // Error
>x : Symbol(unknown)
@@ -1,4 +1,4 @@
=== tests/cases/conformance/jsx/tsxElementResolution13.tsx ===
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : any
@@ -1,4 +1,4 @@
//// [tsxElementResolution14.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
}
@@ -10,6 +10,6 @@ var obj1: Obj1;
<obj1 x={10} />; // OK
//// [tsxElementResolution14.jsx]
//// [file.jsx]
var obj1;
<obj1 x={10}/>; // OK
@@ -1,20 +1,20 @@
=== tests/cases/conformance/jsx/tsxElementResolution14.tsx ===
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : Symbol(JSX, Decl(tsxElementResolution14.tsx, 0, 0))
>JSX : Symbol(JSX, Decl(file.tsx, 0, 0))
interface Element { }
>Element : Symbol(Element, Decl(tsxElementResolution14.tsx, 0, 20))
>Element : Symbol(Element, Decl(file.tsx, 0, 20))
}
interface Obj1 {
>Obj1 : Symbol(Obj1, Decl(tsxElementResolution14.tsx, 2, 1))
>Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1))
new(n: string): {};
>n : Symbol(n, Decl(tsxElementResolution14.tsx, 5, 5))
>n : Symbol(n, Decl(file.tsx, 5, 5))
}
var obj1: Obj1;
>obj1 : Symbol(obj1, Decl(tsxElementResolution14.tsx, 7, 3))
>Obj1 : Symbol(Obj1, Decl(tsxElementResolution14.tsx, 2, 1))
>obj1 : Symbol(obj1, Decl(file.tsx, 7, 3))
>Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1))
<obj1 x={10} />; // OK
>x : Symbol(unknown)
@@ -1,4 +1,4 @@
=== tests/cases/conformance/jsx/tsxElementResolution14.tsx ===
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : any
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/tsxElementResolution15.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property
tests/cases/conformance/jsx/file.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property
==== tests/cases/conformance/jsx/tsxElementResolution15.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
declare module JSX {
interface Element { }
interface ElementAttributesProperty { pr1: any; pr2: any; }
@@ -1,4 +1,4 @@
//// [tsxElementResolution15.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface ElementAttributesProperty { pr1: any; pr2: any; }
@@ -12,6 +12,6 @@ var Obj1: Obj1type;
<Obj1 x={10} />; // Error
//// [tsxElementResolution15.jsx]
//// [file.jsx]
var Obj1;
<Obj1 x={10}/>; // Error
@@ -1,8 +1,8 @@
tests/cases/conformance/jsx/tsxElementResolution16.tsx(8,1): error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist.
tests/cases/conformance/jsx/tsxElementResolution16.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists
tests/cases/conformance/jsx/file.tsx(8,1): error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist.
tests/cases/conformance/jsx/file.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists
==== tests/cases/conformance/jsx/tsxElementResolution16.tsx (2 errors) ====
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
declare module JSX {
}
@@ -1,4 +1,4 @@
//// [tsxElementResolution16.tsx]
//// [file.tsx]
declare module JSX {
}
@@ -9,6 +9,6 @@ var obj1: Obj1;
<obj1 x={10} />; // Error (JSX.Element is implicit any)
//// [tsxElementResolution16.jsx]
//// [file.jsx]
var obj1;
<obj1 x={10}/>; // Error (JSX.Element is implicit any)
@@ -1,7 +1,7 @@
tests/cases/conformance/jsx/tsxElementResolution18.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists
tests/cases/conformance/jsx/file1.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists
==== tests/cases/conformance/jsx/tsxElementResolution18.tsx (1 errors) ====
==== tests/cases/conformance/jsx/file1.tsx (1 errors) ====
declare module JSX {
interface Element { }
}
@@ -1,4 +1,4 @@
//// [tsxElementResolution18.tsx]
//// [file1.tsx]
declare module JSX {
interface Element { }
}
@@ -7,6 +7,6 @@ declare module JSX {
<div n='x' />;
//// [tsxElementResolution18.jsx]
//// [file1.jsx]
// Error under implicit any
<div n='x'/>;
@@ -1,4 +1,4 @@
//// [tsxElementResolution2.tsx]
//// [file.tsx]
declare module JSX {
interface Element { }
interface IntrinsicElements {
@@ -12,7 +12,7 @@ declare module JSX {
// OK
<span />;
//// [tsxElementResolution2.jsx]
//// [file.jsx]
// OK
<div />;
// OK
@@ -1,23 +1,23 @@
=== tests/cases/conformance/jsx/tsxElementResolution2.tsx ===
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : Symbol(JSX, Decl(tsxElementResolution2.tsx, 0, 0))
>JSX : Symbol(JSX, Decl(file.tsx, 0, 0))
interface Element { }
>Element : Symbol(Element, Decl(tsxElementResolution2.tsx, 0, 20))
>Element : Symbol(Element, Decl(file.tsx, 0, 20))
interface IntrinsicElements {
>IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22))
>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22))
[x: string]: any;
>x : Symbol(x, Decl(tsxElementResolution2.tsx, 3, 6))
>x : Symbol(x, Decl(file.tsx, 3, 6))
}
}
// OK
<div />;
>div : Symbol(JSX.IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
// OK
<span />;
>span : Symbol(JSX.IntrinsicElements, Decl(tsxElementResolution2.tsx, 1, 22))
>span : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))

Some files were not shown because too many files have changed in this diff Show More