Skip to content

Commit aed3b4c

Browse files
Baseline updates now that we emit in the presence of parse errors.
1 parent d66e70a commit aed3b4c

File tree

420 files changed

+28476
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

420 files changed

+28476
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// [ArrowFunction1.ts]
2+
var v = (a: ) => {
3+
4+
};
5+
6+
//// [ArrowFunction1.js]
7+
var v = function (a) {
8+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// [ArrowFunction3.ts]
2+
var v = (a): => {
3+
4+
};
5+
6+
//// [ArrowFunction3.js]
7+
var v = function (a) {
8+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [ExportAssignment7.ts]
2+
export class C {
3+
}
4+
5+
export = B;
6+
7+
//// [ExportAssignment7.js]
8+
var C = (function () {
9+
function C() {
10+
}
11+
return C;
12+
})();
13+
exports.C = C;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [ExportAssignment8.ts]
2+
export = B;
3+
4+
export class C {
5+
}
6+
7+
//// [ExportAssignment8.js]
8+
var C = (function () {
9+
function C() {
10+
}
11+
return C;
12+
})();
13+
exports.C = C;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//// [ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts]
2+
module A {
3+
4+
class Point {
5+
constructor(public x: number, public y: number) { }
6+
}
7+
8+
export var UnitSquare : {
9+
top: { left: Point, right: Point },
10+
bottom: { left: Point, right: Point }
11+
} = null;
12+
}
13+
14+
//// [ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.js]
15+
var A;
16+
(function (A) {
17+
var Point = (function () {
18+
function Point(x, y) {
19+
this.x = x;
20+
this.y = y;
21+
}
22+
return Point;
23+
})();
24+
A.UnitSquare = null;
25+
})(A || (A = {}));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [FunctionDeclaration12_es6.ts]
2+
var v = function * yield() { }
3+
4+
//// [FunctionDeclaration12_es6.js]
5+
var v = , yield = function () {
6+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// [FunctionDeclaration5_es6.ts]
2+
function*foo(yield) {
3+
}
4+
5+
//// [FunctionDeclaration5_es6.js]
6+
yield;
7+
{
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [FunctionPropertyAssignments2_es6.ts]
2+
var v = { *() { } }
3+
4+
//// [FunctionPropertyAssignments2_es6.js]
5+
var v = { : function () {
6+
} };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [FunctionPropertyAssignments3_es6.ts]
2+
var v = { *{ } }
3+
4+
//// [FunctionPropertyAssignments3_es6.js]
5+
var v = { : function () {
6+
} };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [FunctionPropertyAssignments4_es6.ts]
2+
var v = { * }
3+
4+
//// [FunctionPropertyAssignments4_es6.js]
5+
var v = { : function () {
6+
} };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//// [FunctionPropertyAssignments6_es6.ts]
2+
var v = { *<T>() { } }
3+
4+
//// [FunctionPropertyAssignments6_es6.js]
5+
var v = { : function () {
6+
} };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [MemberFunctionDeclaration4_es6.ts]
2+
class C {
3+
*() { }
4+
}
5+
6+
//// [MemberFunctionDeclaration4_es6.js]
7+
var C = (function () {
8+
function C() {
9+
}
10+
C.prototype. = function () {
11+
};
12+
return C;
13+
})();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [MemberFunctionDeclaration5_es6.ts]
2+
class C {
3+
*
4+
}
5+
6+
//// [MemberFunctionDeclaration5_es6.js]
7+
var C = (function () {
8+
function C() {
9+
}
10+
return C;
11+
})();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [MemberFunctionDeclaration6_es6.ts]
2+
class C {
3+
*foo
4+
}
5+
6+
//// [MemberFunctionDeclaration6_es6.js]
7+
var C = (function () {
8+
function C() {
9+
}
10+
return C;
11+
})();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//// [MemberFunctionDeclaration8_es6.ts]
2+
class C {
3+
foo() {
4+
// Make sure we don't think of *bar as the start of a generator method.
5+
if (a) # * bar;
6+
return bar;
7+
}
8+
}
9+
10+
//// [MemberFunctionDeclaration8_es6.js]
11+
var C = (function () {
12+
function C() {
13+
}
14+
C.prototype.foo = function () {
15+
// Make sure we don't think of *bar as the start of a generator method.
16+
if (a)
17+
;
18+
* bar;
19+
return bar;
20+
};
21+
return C;
22+
})();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//// [TemplateExpression1.ts]
2+
var v = `foo ${ a
3+
4+
//// [TemplateExpression1.js]
5+
var v = "foo " + a;
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//// [TupleType4.ts]
2+
var v: [
3+
4+
//// [TupleType4.js]
5+
var v;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//// [tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.ts] ////
2+
3+
//// [part1.ts]
4+
export module A {
5+
export interface Point {
6+
x: number;
7+
y: number;
8+
}
9+
10+
export module Utils {
11+
export function mirror<T extends Point>(p: T) {
12+
return { x: p.y, y: p.x };
13+
}
14+
}
15+
16+
export var Origin: Point = { x: 0, y: 0 };
17+
}
18+
19+
//// [part2.ts]
20+
export module A {
21+
// collision with 'Origin' var in other part of merged module
22+
export var Origin: Point = { x: 0, y: 0 };
23+
24+
export module Utils {
25+
export class Plane {
26+
constructor(public tl: Point, public br: Point) { }
27+
}
28+
}
29+
}
30+
31+
32+
//// [part1.js]
33+
var A;
34+
(function (A) {
35+
var Utils;
36+
(function (Utils) {
37+
function mirror(p) {
38+
return { x: p.y, y: p.x };
39+
}
40+
Utils.mirror = mirror;
41+
})(Utils = A.Utils || (A.Utils = {}));
42+
A.Origin = { x: 0, y: 0 };
43+
})(A = exports.A || (exports.A = {}));
44+
//// [part2.js]
45+
var A;
46+
(function (A) {
47+
// collision with 'Origin' var in other part of merged module
48+
A.Origin = { x: 0, y: 0 };
49+
var Utils;
50+
(function (Utils) {
51+
var Plane = (function () {
52+
function Plane(tl, br) {
53+
this.tl = tl;
54+
this.br = br;
55+
}
56+
return Plane;
57+
})();
58+
Utils.Plane = Plane;
59+
})(Utils = A.Utils || (A.Utils = {}));
60+
})(A = exports.A || (exports.A = {}));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//// [TypeArgumentList1.ts]
2+
Foo<A,B,\ C>(4, 5, 6);
3+
4+
//// [TypeArgumentList1.js]
5+
Foo(4, 5, 6);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//// [YieldExpression5_es6.ts]
2+
function* foo() {
3+
yield*
4+
}
5+
6+
//// [YieldExpression5_es6.js]
7+
function foo() {
8+
;
9+
}
+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
//// [aliasErrors.ts]
2+
module foo {
3+
export class Provide {
4+
}
5+
export module bar { export module baz {export class boo {}}}
6+
}
7+
8+
import provide = foo;
9+
import booz = foo.bar.baz;
10+
import beez = foo.bar;
11+
12+
import m = no;
13+
import m2 = no.mod;
14+
import n = 5;
15+
import o = "s";
16+
import q = null;
17+
import r = undefined;
18+
19+
20+
var p = new provide.Provide();
21+
22+
function use() {
23+
24+
beez.baz.boo;
25+
var p1: provide.Provide;
26+
var p2: foo.Provide;
27+
var p3:booz.bar;
28+
var p22 = new provide.Provide();
29+
}
30+
31+
32+
33+
//// [aliasErrors.js]
34+
var foo;
35+
(function (foo) {
36+
var Provide = (function () {
37+
function Provide() {
38+
}
39+
return Provide;
40+
})();
41+
foo.Provide = Provide;
42+
var bar;
43+
(function (bar) {
44+
var baz;
45+
(function (baz) {
46+
var boo = (function () {
47+
function boo() {
48+
}
49+
return boo;
50+
})();
51+
baz.boo = boo;
52+
})(baz = bar.baz || (bar.baz = {}));
53+
})(bar = foo.bar || (foo.bar = {}));
54+
})(foo || (foo = {}));
55+
var provide = foo;
56+
var booz = foo.bar.baz;
57+
var beez = foo.bar;
58+
5;
59+
"s";
60+
null;
61+
var p = new provide.Provide();
62+
function use() {
63+
beez.baz.boo;
64+
var p1;
65+
var p2;
66+
var p3;
67+
var p22 = new provide.Provide();
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//// [tests/cases/conformance/ambient/ambientDeclarationsExternal.ts] ////
2+
3+
//// [decls.ts]
4+
5+
// Ambient external module with export assignment
6+
declare module 'equ' {
7+
var x;
8+
export = x;
9+
}
10+
11+
declare module 'equ2' {
12+
var x: number;
13+
}
14+
15+
// Ambient external import declaration referencing ambient external module using top level module name
16+
//// [consumer.ts]
17+
/// <reference path="decls.ts" />
18+
import imp1 = require('equ');
19+
20+
21+
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
22+
import imp3 = require('equ2');
23+
var n = imp3.x;
24+
var n: number;
25+
26+
27+
//// [decls.js]
28+
// Ambient external import declaration referencing ambient external module using top level module name
29+
//// [consumer.js]
30+
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
31+
var imp3 = require('equ2');
32+
var n = imp3.x;
33+
var n;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//// [ambiguousGenericAssertion1.ts]
2+
function f<T>(x: T): T { return null; }
3+
var r = <T>(x: T) => x;
4+
var r2 = < <T>(x: T) => T>f; // valid
5+
var r3 = <<T>(x: T) => T>f; // ambiguous, appears to the parser as a << operation
6+
7+
8+
//// [ambiguousGenericAssertion1.js]
9+
function f(x) {
10+
return null;
11+
}
12+
var r = function (x) { return x; };
13+
var r2 = f; // valid
14+
var r3 = << T > (x), T;
15+
T > f; // ambiguous, appears to the parser as a << operation

0 commit comments

Comments
 (0)