mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #5471 from Microsoft/jsFileCompilation
Compilation of Js Files
This commit is contained in:
@@ -1,108 +0,0 @@
|
||||
tests/cases/compiler/classdecl.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/classdecl.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/classdecl.ts(18,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/classdecl.ts(24,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classdecl.ts (4 errors) ====
|
||||
class a {
|
||||
//constructor ();
|
||||
constructor (n: number);
|
||||
constructor (s: string);
|
||||
constructor (ns: any) {
|
||||
|
||||
}
|
||||
|
||||
public pgF() { }
|
||||
|
||||
public pv;
|
||||
public get d() {
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
return 30;
|
||||
}
|
||||
public set d() {
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
}
|
||||
|
||||
public static get p2() {
|
||||
~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
return { x: 30, y: 40 };
|
||||
}
|
||||
|
||||
private static d2() {
|
||||
}
|
||||
private static get p3() {
|
||||
~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
return "string";
|
||||
}
|
||||
private pv3;
|
||||
|
||||
private foo(n: number): string;
|
||||
private foo(s: string): string;
|
||||
private foo(ns: any) {
|
||||
return ns.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class b extends a {
|
||||
}
|
||||
|
||||
module m1 {
|
||||
export class b {
|
||||
}
|
||||
class d {
|
||||
}
|
||||
|
||||
|
||||
export interface ib {
|
||||
}
|
||||
}
|
||||
|
||||
module m2 {
|
||||
|
||||
export module m3 {
|
||||
export class c extends b {
|
||||
}
|
||||
export class ib2 implements m1.ib {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class c extends m1.b {
|
||||
}
|
||||
|
||||
class ib2 implements m1.ib {
|
||||
}
|
||||
|
||||
declare class aAmbient {
|
||||
constructor (n: number);
|
||||
constructor (s: string);
|
||||
public pgF(): void;
|
||||
public pv;
|
||||
public d : number;
|
||||
static p2 : { x: number; y: number; };
|
||||
static d2();
|
||||
static p3;
|
||||
private pv3;
|
||||
private foo(s);
|
||||
}
|
||||
|
||||
class d {
|
||||
private foo(n: number): string;
|
||||
private foo(s: string): string;
|
||||
private foo(ns: any) {
|
||||
return ns.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class e {
|
||||
private foo(s: string): string;
|
||||
private foo(n: number): string;
|
||||
private foo(ns: any) {
|
||||
return ns.toString();
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class a {
|
||||
public get d() {
|
||||
return 30;
|
||||
}
|
||||
public set d() {
|
||||
public set d(a: number) {
|
||||
}
|
||||
|
||||
public static get p2() {
|
||||
@@ -107,7 +107,7 @@ var a = (function () {
|
||||
get: function () {
|
||||
return 30;
|
||||
},
|
||||
set: function () {
|
||||
set: function (a) {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
=== tests/cases/compiler/classdecl.ts ===
|
||||
class a {
|
||||
>a : Symbol(a, Decl(classdecl.ts, 0, 0))
|
||||
|
||||
//constructor ();
|
||||
constructor (n: number);
|
||||
>n : Symbol(n, Decl(classdecl.ts, 2, 17))
|
||||
|
||||
constructor (s: string);
|
||||
>s : Symbol(s, Decl(classdecl.ts, 3, 17))
|
||||
|
||||
constructor (ns: any) {
|
||||
>ns : Symbol(ns, Decl(classdecl.ts, 4, 17))
|
||||
|
||||
}
|
||||
|
||||
public pgF() { }
|
||||
>pgF : Symbol(pgF, Decl(classdecl.ts, 6, 5))
|
||||
|
||||
public pv;
|
||||
>pv : Symbol(pv, Decl(classdecl.ts, 8, 20))
|
||||
|
||||
public get d() {
|
||||
>d : Symbol(d, Decl(classdecl.ts, 10, 14), Decl(classdecl.ts, 13, 5))
|
||||
|
||||
return 30;
|
||||
}
|
||||
public set d(a: number) {
|
||||
>d : Symbol(d, Decl(classdecl.ts, 10, 14), Decl(classdecl.ts, 13, 5))
|
||||
>a : Symbol(a, Decl(classdecl.ts, 14, 17))
|
||||
}
|
||||
|
||||
public static get p2() {
|
||||
>p2 : Symbol(a.p2, Decl(classdecl.ts, 15, 5))
|
||||
|
||||
return { x: 30, y: 40 };
|
||||
>x : Symbol(x, Decl(classdecl.ts, 18, 16))
|
||||
>y : Symbol(y, Decl(classdecl.ts, 18, 23))
|
||||
}
|
||||
|
||||
private static d2() {
|
||||
>d2 : Symbol(a.d2, Decl(classdecl.ts, 19, 5))
|
||||
}
|
||||
private static get p3() {
|
||||
>p3 : Symbol(a.p3, Decl(classdecl.ts, 22, 5))
|
||||
|
||||
return "string";
|
||||
}
|
||||
private pv3;
|
||||
>pv3 : Symbol(pv3, Decl(classdecl.ts, 25, 5))
|
||||
|
||||
private foo(n: number): string;
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35))
|
||||
>n : Symbol(n, Decl(classdecl.ts, 28, 16))
|
||||
|
||||
private foo(s: string): string;
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35))
|
||||
>s : Symbol(s, Decl(classdecl.ts, 29, 16))
|
||||
|
||||
private foo(ns: any) {
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 26, 16), Decl(classdecl.ts, 28, 35), Decl(classdecl.ts, 29, 35))
|
||||
>ns : Symbol(ns, Decl(classdecl.ts, 30, 16))
|
||||
|
||||
return ns.toString();
|
||||
>ns : Symbol(ns, Decl(classdecl.ts, 30, 16))
|
||||
}
|
||||
}
|
||||
|
||||
class b extends a {
|
||||
>b : Symbol(b, Decl(classdecl.ts, 33, 1))
|
||||
>a : Symbol(a, Decl(classdecl.ts, 0, 0))
|
||||
}
|
||||
|
||||
module m1 {
|
||||
>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1))
|
||||
|
||||
export class b {
|
||||
>b : Symbol(b, Decl(classdecl.ts, 38, 11))
|
||||
}
|
||||
class d {
|
||||
>d : Symbol(d, Decl(classdecl.ts, 40, 5))
|
||||
}
|
||||
|
||||
|
||||
export interface ib {
|
||||
>ib : Symbol(ib, Decl(classdecl.ts, 42, 5))
|
||||
}
|
||||
}
|
||||
|
||||
module m2 {
|
||||
>m2 : Symbol(m2, Decl(classdecl.ts, 47, 1))
|
||||
|
||||
export module m3 {
|
||||
>m3 : Symbol(m3, Decl(classdecl.ts, 49, 11))
|
||||
|
||||
export class c extends b {
|
||||
>c : Symbol(c, Decl(classdecl.ts, 51, 22))
|
||||
>b : Symbol(b, Decl(classdecl.ts, 33, 1))
|
||||
}
|
||||
export class ib2 implements m1.ib {
|
||||
>ib2 : Symbol(ib2, Decl(classdecl.ts, 53, 9))
|
||||
>m1.ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5))
|
||||
>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1))
|
||||
>ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class c extends m1.b {
|
||||
>c : Symbol(c, Decl(classdecl.ts, 57, 1))
|
||||
>m1.b : Symbol(m1.b, Decl(classdecl.ts, 38, 11))
|
||||
>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1))
|
||||
>b : Symbol(m1.b, Decl(classdecl.ts, 38, 11))
|
||||
}
|
||||
|
||||
class ib2 implements m1.ib {
|
||||
>ib2 : Symbol(ib2, Decl(classdecl.ts, 60, 1))
|
||||
>m1.ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5))
|
||||
>m1 : Symbol(m1, Decl(classdecl.ts, 36, 1))
|
||||
>ib : Symbol(m1.ib, Decl(classdecl.ts, 42, 5))
|
||||
}
|
||||
|
||||
declare class aAmbient {
|
||||
>aAmbient : Symbol(aAmbient, Decl(classdecl.ts, 63, 1))
|
||||
|
||||
constructor (n: number);
|
||||
>n : Symbol(n, Decl(classdecl.ts, 66, 17))
|
||||
|
||||
constructor (s: string);
|
||||
>s : Symbol(s, Decl(classdecl.ts, 67, 17))
|
||||
|
||||
public pgF(): void;
|
||||
>pgF : Symbol(pgF, Decl(classdecl.ts, 67, 28))
|
||||
|
||||
public pv;
|
||||
>pv : Symbol(pv, Decl(classdecl.ts, 68, 23))
|
||||
|
||||
public d : number;
|
||||
>d : Symbol(d, Decl(classdecl.ts, 69, 14))
|
||||
|
||||
static p2 : { x: number; y: number; };
|
||||
>p2 : Symbol(aAmbient.p2, Decl(classdecl.ts, 70, 22))
|
||||
>x : Symbol(x, Decl(classdecl.ts, 71, 17))
|
||||
>y : Symbol(y, Decl(classdecl.ts, 71, 28))
|
||||
|
||||
static d2();
|
||||
>d2 : Symbol(aAmbient.d2, Decl(classdecl.ts, 71, 42))
|
||||
|
||||
static p3;
|
||||
>p3 : Symbol(aAmbient.p3, Decl(classdecl.ts, 72, 16))
|
||||
|
||||
private pv3;
|
||||
>pv3 : Symbol(pv3, Decl(classdecl.ts, 73, 14))
|
||||
|
||||
private foo(s);
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 74, 16))
|
||||
>s : Symbol(s, Decl(classdecl.ts, 75, 16))
|
||||
}
|
||||
|
||||
class d {
|
||||
>d : Symbol(d, Decl(classdecl.ts, 76, 1))
|
||||
|
||||
private foo(n: number): string;
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35))
|
||||
>n : Symbol(n, Decl(classdecl.ts, 79, 16))
|
||||
|
||||
private foo(s: string): string;
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35))
|
||||
>s : Symbol(s, Decl(classdecl.ts, 80, 16))
|
||||
|
||||
private foo(ns: any) {
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 78, 9), Decl(classdecl.ts, 79, 35), Decl(classdecl.ts, 80, 35))
|
||||
>ns : Symbol(ns, Decl(classdecl.ts, 81, 16))
|
||||
|
||||
return ns.toString();
|
||||
>ns : Symbol(ns, Decl(classdecl.ts, 81, 16))
|
||||
}
|
||||
}
|
||||
|
||||
class e {
|
||||
>e : Symbol(e, Decl(classdecl.ts, 84, 1))
|
||||
|
||||
private foo(s: string): string;
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35))
|
||||
>s : Symbol(s, Decl(classdecl.ts, 87, 16))
|
||||
|
||||
private foo(n: number): string;
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35))
|
||||
>n : Symbol(n, Decl(classdecl.ts, 88, 16))
|
||||
|
||||
private foo(ns: any) {
|
||||
>foo : Symbol(foo, Decl(classdecl.ts, 86, 9), Decl(classdecl.ts, 87, 35), Decl(classdecl.ts, 88, 35))
|
||||
>ns : Symbol(ns, Decl(classdecl.ts, 89, 16))
|
||||
|
||||
return ns.toString();
|
||||
>ns : Symbol(ns, Decl(classdecl.ts, 89, 16))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
=== tests/cases/compiler/classdecl.ts ===
|
||||
class a {
|
||||
>a : a
|
||||
|
||||
//constructor ();
|
||||
constructor (n: number);
|
||||
>n : number
|
||||
|
||||
constructor (s: string);
|
||||
>s : string
|
||||
|
||||
constructor (ns: any) {
|
||||
>ns : any
|
||||
|
||||
}
|
||||
|
||||
public pgF() { }
|
||||
>pgF : () => void
|
||||
|
||||
public pv;
|
||||
>pv : any
|
||||
|
||||
public get d() {
|
||||
>d : number
|
||||
|
||||
return 30;
|
||||
>30 : number
|
||||
}
|
||||
public set d(a: number) {
|
||||
>d : number
|
||||
>a : number
|
||||
}
|
||||
|
||||
public static get p2() {
|
||||
>p2 : { x: number; y: number; }
|
||||
|
||||
return { x: 30, y: 40 };
|
||||
>{ x: 30, y: 40 } : { x: number; y: number; }
|
||||
>x : number
|
||||
>30 : number
|
||||
>y : number
|
||||
>40 : number
|
||||
}
|
||||
|
||||
private static d2() {
|
||||
>d2 : () => void
|
||||
}
|
||||
private static get p3() {
|
||||
>p3 : string
|
||||
|
||||
return "string";
|
||||
>"string" : string
|
||||
}
|
||||
private pv3;
|
||||
>pv3 : any
|
||||
|
||||
private foo(n: number): string;
|
||||
>foo : { (n: number): string; (s: string): string; }
|
||||
>n : number
|
||||
|
||||
private foo(s: string): string;
|
||||
>foo : { (n: number): string; (s: string): string; }
|
||||
>s : string
|
||||
|
||||
private foo(ns: any) {
|
||||
>foo : { (n: number): string; (s: string): string; }
|
||||
>ns : any
|
||||
|
||||
return ns.toString();
|
||||
>ns.toString() : any
|
||||
>ns.toString : any
|
||||
>ns : any
|
||||
>toString : any
|
||||
}
|
||||
}
|
||||
|
||||
class b extends a {
|
||||
>b : b
|
||||
>a : a
|
||||
}
|
||||
|
||||
module m1 {
|
||||
>m1 : typeof m1
|
||||
|
||||
export class b {
|
||||
>b : b
|
||||
}
|
||||
class d {
|
||||
>d : d
|
||||
}
|
||||
|
||||
|
||||
export interface ib {
|
||||
>ib : ib
|
||||
}
|
||||
}
|
||||
|
||||
module m2 {
|
||||
>m2 : typeof m2
|
||||
|
||||
export module m3 {
|
||||
>m3 : typeof m3
|
||||
|
||||
export class c extends b {
|
||||
>c : c
|
||||
>b : b
|
||||
}
|
||||
export class ib2 implements m1.ib {
|
||||
>ib2 : ib2
|
||||
>m1.ib : any
|
||||
>m1 : typeof m1
|
||||
>ib : m1.ib
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class c extends m1.b {
|
||||
>c : c
|
||||
>m1.b : m1.b
|
||||
>m1 : typeof m1
|
||||
>b : typeof m1.b
|
||||
}
|
||||
|
||||
class ib2 implements m1.ib {
|
||||
>ib2 : ib2
|
||||
>m1.ib : any
|
||||
>m1 : typeof m1
|
||||
>ib : m1.ib
|
||||
}
|
||||
|
||||
declare class aAmbient {
|
||||
>aAmbient : aAmbient
|
||||
|
||||
constructor (n: number);
|
||||
>n : number
|
||||
|
||||
constructor (s: string);
|
||||
>s : string
|
||||
|
||||
public pgF(): void;
|
||||
>pgF : () => void
|
||||
|
||||
public pv;
|
||||
>pv : any
|
||||
|
||||
public d : number;
|
||||
>d : number
|
||||
|
||||
static p2 : { x: number; y: number; };
|
||||
>p2 : { x: number; y: number; }
|
||||
>x : number
|
||||
>y : number
|
||||
|
||||
static d2();
|
||||
>d2 : () => any
|
||||
|
||||
static p3;
|
||||
>p3 : any
|
||||
|
||||
private pv3;
|
||||
>pv3 : any
|
||||
|
||||
private foo(s);
|
||||
>foo : (s: any) => any
|
||||
>s : any
|
||||
}
|
||||
|
||||
class d {
|
||||
>d : d
|
||||
|
||||
private foo(n: number): string;
|
||||
>foo : { (n: number): string; (s: string): string; }
|
||||
>n : number
|
||||
|
||||
private foo(s: string): string;
|
||||
>foo : { (n: number): string; (s: string): string; }
|
||||
>s : string
|
||||
|
||||
private foo(ns: any) {
|
||||
>foo : { (n: number): string; (s: string): string; }
|
||||
>ns : any
|
||||
|
||||
return ns.toString();
|
||||
>ns.toString() : any
|
||||
>ns.toString : any
|
||||
>ns : any
|
||||
>toString : any
|
||||
}
|
||||
}
|
||||
|
||||
class e {
|
||||
>e : e
|
||||
|
||||
private foo(s: string): string;
|
||||
>foo : { (s: string): string; (n: number): string; }
|
||||
>s : string
|
||||
|
||||
private foo(n: number): string;
|
||||
>foo : { (s: string): string; (n: number): string; }
|
||||
>n : number
|
||||
|
||||
private foo(ns: any) {
|
||||
>foo : { (s: string): string; (n: number): string; }
|
||||
>ns : any
|
||||
|
||||
return ns.toString();
|
||||
>ns.toString() : any
|
||||
>ns.toString : any
|
||||
>ns : any
|
||||
>toString : any
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
EmitSkipped: true
|
||||
Diagnostics:
|
||||
Cannot write file 'tests/cases/fourslash/b.js' because it would overwrite input file.
|
||||
|
||||
EmitSkipped: false
|
||||
FileName : tests/cases/fourslash/a.js
|
||||
function foo2() { return 30; } // no error - should emit a.js
|
||||
|
||||
@@ -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,20 +0,0 @@
|
||||
tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/declFileObjectLiteralWithAccessors.ts(6,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts (2 errors) ====
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
return {
|
||||
b: 10,
|
||||
get x() { return x; },
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
set x(a: number) { this.b = a; }
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
};
|
||||
};
|
||||
var /*4*/point = makePoint(2);
|
||||
var /*2*/x = point.x;
|
||||
point./*3*/x = 30;
|
||||
@@ -0,0 +1,36 @@
|
||||
=== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts ===
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithAccessors.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 1, 24))
|
||||
|
||||
return {
|
||||
b: 10,
|
||||
>b : Symbol(b, Decl(declFileObjectLiteralWithAccessors.ts, 2, 12))
|
||||
|
||||
get x() { return x; },
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 1, 24))
|
||||
|
||||
set x(a: number) { this.b = a; }
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithAccessors.ts, 5, 14))
|
||||
|
||||
};
|
||||
};
|
||||
var /*4*/point = makePoint(2);
|
||||
>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3))
|
||||
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithAccessors.ts, 0, 0))
|
||||
|
||||
var /*2*/x = point.x;
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 9, 3))
|
||||
>point.x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30))
|
||||
>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30))
|
||||
|
||||
point./*3*/x = 30;
|
||||
>point./*3*/x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30))
|
||||
>point : Symbol(point, Decl(declFileObjectLiteralWithAccessors.ts, 8, 3))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithAccessors.ts, 3, 14), Decl(declFileObjectLiteralWithAccessors.ts, 4, 30))
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
=== tests/cases/compiler/declFileObjectLiteralWithAccessors.ts ===
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
>makePoint : (x: number) => { b: number; x: number; }
|
||||
>x : number
|
||||
|
||||
return {
|
||||
>{ b: 10, get x() { return x; }, set x(a: number) { this.b = a; } } : { b: number; x: number; }
|
||||
|
||||
b: 10,
|
||||
>b : number
|
||||
>10 : number
|
||||
|
||||
get x() { return x; },
|
||||
>x : number
|
||||
>x : number
|
||||
|
||||
set x(a: number) { this.b = a; }
|
||||
>x : number
|
||||
>a : number
|
||||
>this.b = a : number
|
||||
>this.b : any
|
||||
>this : any
|
||||
>b : any
|
||||
>a : number
|
||||
|
||||
};
|
||||
};
|
||||
var /*4*/point = makePoint(2);
|
||||
>point : { b: number; x: number; }
|
||||
>makePoint(2) : { b: number; x: number; }
|
||||
>makePoint : (x: number) => { b: number; x: number; }
|
||||
>2 : number
|
||||
|
||||
var /*2*/x = point.x;
|
||||
>x : number
|
||||
>point.x : number
|
||||
>point : { b: number; x: number; }
|
||||
>x : number
|
||||
|
||||
point./*3*/x = 30;
|
||||
>point./*3*/x = 30 : number
|
||||
>point./*3*/x : number
|
||||
>point : { b: number; x: number; }
|
||||
>x : number
|
||||
>30 : number
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts (1 errors) ====
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
return {
|
||||
get x() { return x; },
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
};
|
||||
};
|
||||
var /*4*/point = makePoint(2);
|
||||
var /*2*/x = point./*3*/x;
|
||||
|
||||
@@ -12,7 +12,7 @@ var /*2*/x = point./*3*/x;
|
||||
//// [declFileObjectLiteralWithOnlyGetter.js]
|
||||
function makePoint(x) {
|
||||
return {
|
||||
get x() { return x; }
|
||||
get x() { return x; },
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
=== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts ===
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlyGetter.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 1, 24))
|
||||
|
||||
return {
|
||||
get x() { return x; },
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 1, 24))
|
||||
|
||||
};
|
||||
};
|
||||
var /*4*/point = makePoint(2);
|
||||
>point : Symbol(point, Decl(declFileObjectLiteralWithOnlyGetter.ts, 6, 3))
|
||||
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlyGetter.ts, 0, 0))
|
||||
|
||||
var /*2*/x = point./*3*/x;
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 7, 3))
|
||||
>point./*3*/x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12))
|
||||
>point : Symbol(point, Decl(declFileObjectLiteralWithOnlyGetter.ts, 6, 3))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlyGetter.ts, 2, 12))
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
=== tests/cases/compiler/declFileObjectLiteralWithOnlyGetter.ts ===
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
>makePoint : (x: number) => { x: number; }
|
||||
>x : number
|
||||
|
||||
return {
|
||||
>{ get x() { return x; }, } : { x: number; }
|
||||
|
||||
get x() { return x; },
|
||||
>x : number
|
||||
>x : number
|
||||
|
||||
};
|
||||
};
|
||||
var /*4*/point = makePoint(2);
|
||||
>point : { x: number; }
|
||||
>makePoint(2) : { x: number; }
|
||||
>makePoint : (x: number) => { x: number; }
|
||||
>2 : number
|
||||
|
||||
var /*2*/x = point./*3*/x;
|
||||
>x : number
|
||||
>point./*3*/x : number
|
||||
>point : { x: number; }
|
||||
>x : number
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts (1 errors) ====
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
return {
|
||||
b: 10,
|
||||
set x(a: number) { this.b = a; }
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
};
|
||||
};
|
||||
var /*3*/point = makePoint(2);
|
||||
point./*2*/x = 30;
|
||||
@@ -0,0 +1,26 @@
|
||||
=== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts ===
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 1, 24))
|
||||
|
||||
return {
|
||||
b: 10,
|
||||
>b : Symbol(b, Decl(declFileObjectLiteralWithOnlySetter.ts, 2, 12))
|
||||
|
||||
set x(a: number) { this.b = a; }
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14))
|
||||
>a : Symbol(a, Decl(declFileObjectLiteralWithOnlySetter.ts, 4, 14))
|
||||
|
||||
};
|
||||
};
|
||||
var /*3*/point = makePoint(2);
|
||||
>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 7, 3))
|
||||
>makePoint : Symbol(makePoint, Decl(declFileObjectLiteralWithOnlySetter.ts, 0, 0))
|
||||
|
||||
point./*2*/x = 30;
|
||||
>point./*2*/x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14))
|
||||
>point : Symbol(point, Decl(declFileObjectLiteralWithOnlySetter.ts, 7, 3))
|
||||
>x : Symbol(x, Decl(declFileObjectLiteralWithOnlySetter.ts, 3, 14))
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
=== tests/cases/compiler/declFileObjectLiteralWithOnlySetter.ts ===
|
||||
|
||||
function /*1*/makePoint(x: number) {
|
||||
>makePoint : (x: number) => { b: number; x: number; }
|
||||
>x : number
|
||||
|
||||
return {
|
||||
>{ b: 10, set x(a: number) { this.b = a; } } : { b: number; x: number; }
|
||||
|
||||
b: 10,
|
||||
>b : number
|
||||
>10 : number
|
||||
|
||||
set x(a: number) { this.b = a; }
|
||||
>x : number
|
||||
>a : number
|
||||
>this.b = a : number
|
||||
>this.b : any
|
||||
>this : any
|
||||
>b : any
|
||||
>a : number
|
||||
|
||||
};
|
||||
};
|
||||
var /*3*/point = makePoint(2);
|
||||
>point : { b: number; x: number; }
|
||||
>makePoint(2) : { b: number; x: number; }
|
||||
>makePoint : (x: number) => { b: number; x: number; }
|
||||
>2 : number
|
||||
|
||||
point./*2*/x = 30;
|
||||
>point./*2*/x = 30 : number
|
||||
>point./*2*/x : number
|
||||
>point : { b: number; x: number; }
|
||||
>x : number
|
||||
>30 : number
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
tests/cases/compiler/declFilePrivateStatic.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/declFilePrivateStatic.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/declFilePrivateStatic.ts(12,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/declFilePrivateStatic.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/declFilePrivateStatic.ts (4 errors) ====
|
||||
|
||||
class C {
|
||||
private static x = 1;
|
||||
static y = 1;
|
||||
|
||||
private static a() { }
|
||||
static b() { }
|
||||
|
||||
private static get c() { return 1; }
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
static get d() { return 1; }
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
|
||||
private static set e(v) { }
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
static set f(v) { }
|
||||
~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
=== tests/cases/compiler/declFilePrivateStatic.ts ===
|
||||
|
||||
class C {
|
||||
>C : Symbol(C, Decl(declFilePrivateStatic.ts, 0, 0))
|
||||
|
||||
private static x = 1;
|
||||
>x : Symbol(C.x, Decl(declFilePrivateStatic.ts, 1, 9))
|
||||
|
||||
static y = 1;
|
||||
>y : Symbol(C.y, Decl(declFilePrivateStatic.ts, 2, 25))
|
||||
|
||||
private static a() { }
|
||||
>a : Symbol(C.a, Decl(declFilePrivateStatic.ts, 3, 17))
|
||||
|
||||
static b() { }
|
||||
>b : Symbol(C.b, Decl(declFilePrivateStatic.ts, 5, 26))
|
||||
|
||||
private static get c() { return 1; }
|
||||
>c : Symbol(C.c, Decl(declFilePrivateStatic.ts, 6, 18))
|
||||
|
||||
static get d() { return 1; }
|
||||
>d : Symbol(C.d, Decl(declFilePrivateStatic.ts, 8, 40))
|
||||
|
||||
private static set e(v) { }
|
||||
>e : Symbol(C.e, Decl(declFilePrivateStatic.ts, 9, 32))
|
||||
>v : Symbol(v, Decl(declFilePrivateStatic.ts, 11, 25))
|
||||
|
||||
static set f(v) { }
|
||||
>f : Symbol(C.f, Decl(declFilePrivateStatic.ts, 11, 31))
|
||||
>v : Symbol(v, Decl(declFilePrivateStatic.ts, 12, 17))
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
=== tests/cases/compiler/declFilePrivateStatic.ts ===
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
private static x = 1;
|
||||
>x : number
|
||||
>1 : number
|
||||
|
||||
static y = 1;
|
||||
>y : number
|
||||
>1 : number
|
||||
|
||||
private static a() { }
|
||||
>a : () => void
|
||||
|
||||
static b() { }
|
||||
>b : () => void
|
||||
|
||||
private static get c() { return 1; }
|
||||
>c : number
|
||||
>1 : number
|
||||
|
||||
static get d() { return 1; }
|
||||
>d : number
|
||||
>1 : number
|
||||
|
||||
private static set e(v) { }
|
||||
>e : any
|
||||
>v : any
|
||||
|
||||
static set f(v) { }
|
||||
>f : any
|
||||
>v : any
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
tests/cases/compiler/declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
tests/cases/compiler/declFile.d.ts(4,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
tests/cases/compiler/declFile.d.ts(6,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
tests/cases/compiler/declFile.d.ts(8,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
|
||||
|
||||
==== tests/cases/compiler/client.ts (0 errors) ====
|
||||
///<reference path="declFile.d.ts"/>
|
||||
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
|
||||
|
||||
==== tests/cases/compiler/declFile.d.ts (4 errors) ====
|
||||
|
||||
declare module M {
|
||||
declare var x;
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
declare function f();
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
|
||||
declare module N { }
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
|
||||
declare class C { }
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//// [tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts] ////
|
||||
|
||||
//// [declFile.d.ts]
|
||||
|
||||
declare module M {
|
||||
declare var x;
|
||||
declare function f();
|
||||
|
||||
declare module N { }
|
||||
|
||||
declare class C { }
|
||||
}
|
||||
|
||||
//// [client.ts]
|
||||
///<reference path="declFile.d.ts"/>
|
||||
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
|
||||
|
||||
|
||||
//// [client.js]
|
||||
///<reference path="declFile.d.ts"/>
|
||||
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
|
||||
|
||||
|
||||
//// [client.d.ts]
|
||||
/// <reference path="declFile.d.ts" />
|
||||
declare var x: M.C;
|
||||
@@ -0,0 +1,29 @@
|
||||
tests/cases/compiler/declFile.d.ts(3,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
tests/cases/compiler/declFile.d.ts(4,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
tests/cases/compiler/declFile.d.ts(6,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
tests/cases/compiler/declFile.d.ts(8,5): error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
|
||||
|
||||
==== tests/cases/compiler/client.ts (0 errors) ====
|
||||
///<reference path="declFile.d.ts"/>
|
||||
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
|
||||
|
||||
==== tests/cases/compiler/declFile.d.ts (4 errors) ====
|
||||
|
||||
declare module M {
|
||||
declare var x;
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
declare function f();
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
|
||||
declare module N { }
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
|
||||
declare class C { }
|
||||
~~~~~~~
|
||||
!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//// [tests/cases/compiler/declFileWithErrorsInInputDeclarationFileWithOut.ts] ////
|
||||
|
||||
//// [declFile.d.ts]
|
||||
|
||||
declare module M {
|
||||
declare var x;
|
||||
declare function f();
|
||||
|
||||
declare module N { }
|
||||
|
||||
declare class C { }
|
||||
}
|
||||
|
||||
//// [client.ts]
|
||||
///<reference path="declFile.d.ts"/>
|
||||
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
|
||||
|
||||
|
||||
//// [out.js]
|
||||
///<reference path="declFile.d.ts"/>
|
||||
var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
|
||||
|
||||
|
||||
//// [out.d.ts]
|
||||
/// <reference path="tests/cases/compiler/declFile.d.ts" />
|
||||
declare var x: M.C;
|
||||
@@ -0,0 +1,12 @@
|
||||
error TS5055: Cannot write file 'tests/cases/compiler/a.d.ts' because it would overwrite input file.
|
||||
|
||||
|
||||
!!! error TS5055: Cannot write file 'a.d.ts' because it would overwrite input file.
|
||||
==== tests/cases/compiler/a.d.ts (0 errors) ====
|
||||
|
||||
declare class c {
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/a.ts (0 errors) ====
|
||||
class d {
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//// [tests/cases/compiler/declarationFileOverwriteError.ts] ////
|
||||
|
||||
//// [a.d.ts]
|
||||
|
||||
declare class c {
|
||||
}
|
||||
|
||||
//// [a.ts]
|
||||
class d {
|
||||
}
|
||||
|
||||
//// [a.js]
|
||||
var d = (function () {
|
||||
function d() {
|
||||
}
|
||||
return d;
|
||||
})();
|
||||
@@ -0,0 +1,12 @@
|
||||
error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would overwrite input file.
|
||||
|
||||
|
||||
!!! error TS5055: Cannot write file 'out.d.ts' because it would overwrite input file.
|
||||
==== tests/cases/compiler/out.d.ts (0 errors) ====
|
||||
|
||||
declare class c {
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/a.ts (0 errors) ====
|
||||
class d {
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//// [tests/cases/compiler/declarationFileOverwriteErrorWithOut.ts] ////
|
||||
|
||||
//// [out.d.ts]
|
||||
|
||||
declare class c {
|
||||
}
|
||||
|
||||
//// [a.ts]
|
||||
class d {
|
||||
}
|
||||
|
||||
//// [out.js]
|
||||
var d = (function () {
|
||||
function d() {
|
||||
}
|
||||
return d;
|
||||
})();
|
||||
@@ -88,48 +88,3 @@ var C4 = (function () {
|
||||
};
|
||||
return C4;
|
||||
})();
|
||||
|
||||
|
||||
//// [declarationFiles.d.ts]
|
||||
declare class C1 {
|
||||
x: this;
|
||||
f(x: this): this;
|
||||
constructor(x: this);
|
||||
}
|
||||
declare class C2 {
|
||||
[x: string]: this;
|
||||
}
|
||||
interface Foo<T> {
|
||||
x: T;
|
||||
y: this;
|
||||
}
|
||||
declare class C3 {
|
||||
a: this[];
|
||||
b: [this, this];
|
||||
c: this | Date;
|
||||
d: this & Date;
|
||||
e: (((this)));
|
||||
f: (x: this) => this;
|
||||
g: new (x: this) => this;
|
||||
h: Foo<this>;
|
||||
i: Foo<this | (() => this)>;
|
||||
j: (x: any) => x is this;
|
||||
}
|
||||
declare class C4 {
|
||||
x1: {
|
||||
a: this;
|
||||
};
|
||||
x2: this[];
|
||||
x3: {
|
||||
a: this;
|
||||
}[];
|
||||
x4: () => this;
|
||||
f1(): {
|
||||
a: this;
|
||||
};
|
||||
f2(): this[];
|
||||
f3(): {
|
||||
a: this;
|
||||
}[];
|
||||
f4(): () => this;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//// [doNotEmitPinnedCommentOnNotEmittedNode.ts]
|
||||
//// [file1.ts]
|
||||
|
||||
class C {
|
||||
/*! remove pinned comment anywhere else */
|
||||
@@ -11,7 +11,7 @@ var x = 10;
|
||||
/*! remove pinned comment anywhere else */
|
||||
declare var OData: any;
|
||||
|
||||
//// [doNotEmitPinnedCommentOnNotEmittedNode.js]
|
||||
//// [file1.js]
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
=== tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts ===
|
||||
=== tests/cases/compiler/file1.ts ===
|
||||
|
||||
class C {
|
||||
>C : Symbol(C, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 0, 0))
|
||||
>C : Symbol(C, Decl(file1.ts, 0, 0))
|
||||
|
||||
/*! remove pinned comment anywhere else */
|
||||
public foo(x: string, y: any)
|
||||
>foo : Symbol(foo, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 1, 9), Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 33))
|
||||
>x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 15))
|
||||
>y : Symbol(y, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 25))
|
||||
>foo : Symbol(foo, Decl(file1.ts, 1, 9), Decl(file1.ts, 3, 33))
|
||||
>x : Symbol(x, Decl(file1.ts, 3, 15))
|
||||
>y : Symbol(y, Decl(file1.ts, 3, 25))
|
||||
|
||||
public foo(x: string, y: number) { }
|
||||
>foo : Symbol(foo, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 1, 9), Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 3, 33))
|
||||
>x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 4, 15))
|
||||
>y : Symbol(y, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 4, 25))
|
||||
>foo : Symbol(foo, Decl(file1.ts, 1, 9), Decl(file1.ts, 3, 33))
|
||||
>x : Symbol(x, Decl(file1.ts, 4, 15))
|
||||
>y : Symbol(y, Decl(file1.ts, 4, 25))
|
||||
}
|
||||
|
||||
var x = 10;
|
||||
>x : Symbol(x, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 7, 3))
|
||||
>x : Symbol(x, Decl(file1.ts, 7, 3))
|
||||
|
||||
/*! remove pinned comment anywhere else */
|
||||
declare var OData: any;
|
||||
>OData : Symbol(OData, Decl(doNotEmitPinnedCommentOnNotEmittedNode.ts, 10, 11))
|
||||
>OData : Symbol(OData, Decl(file1.ts, 10, 11))
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
=== tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts ===
|
||||
=== tests/cases/compiler/file1.ts ===
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts]
|
||||
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts]
|
||||
|
||||
|
||||
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.js]
|
||||
//// [duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.js]
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts ===
|
||||
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts ===
|
||||
|
||||
No type information for this code.
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding.ts ===
|
||||
=== tests/cases/compiler/duplicateIdentifierShouldNotShortCircuitBaseTypeBinding_0.ts ===
|
||||
|
||||
No type information for this code.
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//// [tests/cases/compiler/fileReferencesWithNoExtensions.ts] ////
|
||||
|
||||
//// [t.ts]
|
||||
/// <reference path="a"/>
|
||||
/// <reference path="b"/>
|
||||
/// <reference path="c"/>
|
||||
var a = aa; // Check that a.ts is referenced
|
||||
var b = bb; // Check that b.d.ts is referenced
|
||||
var c = cc; // Check that c.ts has precedence over c.d.ts
|
||||
|
||||
//// [a.ts]
|
||||
var aa = 1;
|
||||
|
||||
//// [b.d.ts]
|
||||
declare var bb: number;
|
||||
|
||||
//// [c.ts]
|
||||
var cc = 1;
|
||||
|
||||
//// [c.d.ts]
|
||||
declare var xx: number;
|
||||
|
||||
|
||||
//// [a.js]
|
||||
var aa = 1;
|
||||
//// [c.js]
|
||||
var cc = 1;
|
||||
//// [t.js]
|
||||
/// <reference path="a"/>
|
||||
/// <reference path="b"/>
|
||||
/// <reference path="c"/>
|
||||
var a = aa; // Check that a.ts is referenced
|
||||
var b = bb; // Check that b.d.ts is referenced
|
||||
var c = cc; // Check that c.ts has precedence over c.d.ts
|
||||
@@ -0,0 +1,12 @@
|
||||
error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files.
|
||||
|
||||
|
||||
!!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files.
|
||||
==== tests/cases/compiler/a.ts (0 errors) ====
|
||||
class c {
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/a.tsx (0 errors) ====
|
||||
function foo() {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//// [tests/cases/compiler/filesEmittingIntoSameOutputWithOutOption.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export class c {
|
||||
}
|
||||
|
||||
//// [b.ts]
|
||||
function foo() {
|
||||
}
|
||||
|
||||
|
||||
//// [a.js]
|
||||
define("tests/cases/compiler/a", ["require", "exports"], function (require, exports) {
|
||||
var c = (function () {
|
||||
function c() {
|
||||
}
|
||||
return c;
|
||||
})();
|
||||
exports.c = c;
|
||||
});
|
||||
function foo() {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
export class c {
|
||||
>c : Symbol(c, Decl(a.ts, 0, 0))
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
function foo() {
|
||||
>foo : Symbol(foo, Decl(b.ts, 0, 0))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
export class c {
|
||||
>c : c
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
function foo() {
|
||||
>foo : () => void
|
||||
}
|
||||
|
||||
@@ -1,8 +1,30 @@
|
||||
EmitSkipped: false
|
||||
FileName : tests/cases/fourslash/inputFile3.js
|
||||
exports.foo = 10;
|
||||
exports.bar = "hello world";
|
||||
FileName : tests/cases/fourslash/inputFile3.d.ts
|
||||
export declare var foo: number;
|
||||
export declare var bar: string;
|
||||
FileName : declSingleFile.js
|
||||
var x = 5;
|
||||
var Bar = (function () {
|
||||
function Bar() {
|
||||
}
|
||||
return Bar;
|
||||
})();
|
||||
var x1 = "hello world";
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
return Foo;
|
||||
})();
|
||||
FileName : declSingleFile.d.ts
|
||||
declare var x: number;
|
||||
declare class Bar {
|
||||
x: string;
|
||||
y: number;
|
||||
}
|
||||
declare var x1: string;
|
||||
declare class Foo {
|
||||
x: string;
|
||||
y: number;
|
||||
}
|
||||
declare module "tests/cases/fourslash/inputFile3" {
|
||||
export var foo: number;
|
||||
export var bar: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,11 @@ declare class Bar {
|
||||
|
||||
EmitSkipped: false
|
||||
FileName : tests/cases/fourslash/inputFile2.js.map
|
||||
{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,qBAAC,GAAG,IAAC,IAAI,EAAG,CAAE,EAAG,CAAA"}FileName : tests/cases/fourslash/inputFile2.js
|
||||
{"version":3,"file":"inputFile2.js","sourceRoot":"","sources":["inputFile2.tsx"],"names":[],"mappings":"AACA,IAAI,CAAC,GAAG,QAAQ,CAAC;AACjB,IAAI,CAAC,GAAG,qBAAC,GAAG,IAAC,IAAI,EAAG,CAAE,EAAG,CAAA"}FileName : tests/cases/fourslash/inputFile2.js
|
||||
var y = "my div";
|
||||
var x = React.createElement("div", {name: y});
|
||||
//# sourceMappingURL=inputFile2.js.mapFileName : tests/cases/fourslash/inputFile2.d.ts
|
||||
declare var React: any;
|
||||
declare var y: string;
|
||||
declare var x: any;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
EmitSkipped: false
|
||||
EmitSkipped: true
|
||||
Diagnostics:
|
||||
Exported variable 'foo' has or is using private name 'C'.
|
||||
FileName : tests/cases/fourslash/inputFile.js
|
||||
var M;
|
||||
(function (M) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
EmitSkipped: false
|
||||
EmitSkipped: true
|
||||
Diagnostics:
|
||||
Exported variable 'foo' has or is using private name 'C'.
|
||||
FileName : tests/cases/fourslash/inputFile.js
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
var C = (function () {
|
||||
|
||||
@@ -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 TS1183: 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 TS1183: 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,6 +1,6 @@
|
||||
===================================================================
|
||||
JsFile: inlineSourceMap.js
|
||||
mapUrl: inlineSourceMap.js.map
|
||||
mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5saW5lU291cmNlTWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaW5saW5lU291cmNlTWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ==
|
||||
sourceRoot:
|
||||
sources: inlineSourceMap.ts
|
||||
===================================================================
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
===================================================================
|
||||
JsFile: outfile.js
|
||||
mapUrl: file:///folder/outfile.js.map
|
||||
mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0ZmlsZS5qcyIsInNvdXJjZVJvb3QiOiJmaWxlOi8vL2ZvbGRlci8iLCJzb3VyY2VzIjpbImlubGluZVNvdXJjZU1hcDIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsdUJBQXVCO0FBRXZCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMifQ==
|
||||
sourceRoot: file:///folder/
|
||||
sources: inlineSourceMap2.ts
|
||||
===================================================================
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
===================================================================
|
||||
JsFile: out.js
|
||||
mapUrl: out.js.map
|
||||
mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVzdHMvY2FzZXMvY29tcGlsZXIvYS50cyIsInRlc3RzL2Nhc2VzL2NvbXBpbGVyL2IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQ0ZmLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNWLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJcbnZhciBhID0gMDtcbmNvbnNvbGUubG9nKGEpO1xuIiwidmFyIGIgPSAwO1xuY29uc29sZS5sb2coYik7Il19
|
||||
sourceRoot:
|
||||
sources: tests/cases/compiler/a.ts,tests/cases/compiler/b.ts
|
||||
sourcesContent: ["\nvar a = 0;\nconsole.log(a);\n","var b = 0;\nconsole.log(b);"]
|
||||
|
||||
@@ -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 '--mo
|
||||
|
||||
|
||||
!!! error TS5047: Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' 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]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user