mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #7917 from Microsoft/acceptBaselines
Accept baselines
This commit is contained in:
@@ -6,7 +6,7 @@ var v = { * foo() {
|
||||
|
||||
|
||||
//// [YieldExpression10_es6.js]
|
||||
var v = { foo: function () {
|
||||
var v = { foo: function* () {
|
||||
yield (foo);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ class C {
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.foo = function () {
|
||||
C.prototype.foo = function* () {
|
||||
yield (foo);
|
||||
};
|
||||
return C;
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
function* foo() { yield }
|
||||
|
||||
//// [YieldExpression13_es6.js]
|
||||
function foo() { yield; }
|
||||
function* foo() { yield; }
|
||||
|
||||
@@ -6,7 +6,7 @@ function* foo() {
|
||||
}
|
||||
|
||||
//// [YieldExpression16_es6.js]
|
||||
function foo() {
|
||||
function* foo() {
|
||||
function bar() {
|
||||
yield foo;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ function*foo() {
|
||||
}
|
||||
|
||||
//// [YieldExpression19_es6.js]
|
||||
function foo() {
|
||||
function* foo() {
|
||||
function bar() {
|
||||
function quux() {
|
||||
function* quux() {
|
||||
yield (foo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,10 +16,10 @@ module {
|
||||
//// [anonymousModules.js]
|
||||
module;
|
||||
{
|
||||
exports.foo = 1;
|
||||
export var foo = 1;
|
||||
module;
|
||||
{
|
||||
exports.bar = 1;
|
||||
export var bar = 1;
|
||||
}
|
||||
var bar = 2;
|
||||
module;
|
||||
|
||||
@@ -8,7 +8,7 @@ var c = () => ({ name: "foo", message: "bar" });
|
||||
var d = () => ((<Error>({ name: "foo", message: "bar" })));
|
||||
|
||||
//// [arrowFunctionWithObjectLiteralBody5.js]
|
||||
var a = function () { return { name: "foo", message: "bar" }; };
|
||||
var a = function () { return ({ name: "foo", message: "bar" }); };
|
||||
var b = function () { return ({ name: "foo", message: "bar" }); };
|
||||
var c = function () { return ({ name: "foo", message: "bar" }); };
|
||||
var d = function () { return (({ name: "foo", message: "bar" })); };
|
||||
|
||||
@@ -36,8 +36,8 @@ function fn1(x2) {
|
||||
}
|
||||
// property accesses
|
||||
var x3;
|
||||
(_a = x3, _a.a = Math.pow(_a.a, value));
|
||||
(_b = x3, _b['a'] = Math.pow(_b['a'], value));
|
||||
(_a = x3).a = Math.pow(_a.a, value);
|
||||
(_b = x3)[_c = 'a'] = Math.pow(_b[_c], value);
|
||||
// parentheses, the contained expression is reference
|
||||
(x1) = Math.pow((x1), value);
|
||||
function fn2(x4) {
|
||||
@@ -45,4 +45,4 @@ function fn2(x4) {
|
||||
}
|
||||
(x3.a) = Math.pow((x3.a), value);
|
||||
(x3['a']) = Math.pow((x3['a']), value);
|
||||
var _a, _b;
|
||||
var _a, _b, _c;
|
||||
|
||||
@@ -46,8 +46,6 @@ var v = (_a = {},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
}),
|
||||
,
|
||||
,
|
||||
Object.defineProperty(_a, a, {
|
||||
set: function (v) { },
|
||||
enumerable: true,
|
||||
|
||||
@@ -23,15 +23,15 @@ let c1 = Foo["C"].toString();
|
||||
|
||||
|
||||
//// [constEnumToStringWithComments.js]
|
||||
var x0 = 100 /* X */ .toString();
|
||||
var x1 = 100 /* "X" */ .toString();
|
||||
var x0 = 100 /* X */..toString();
|
||||
var x1 = 100 /* "X" */..toString();
|
||||
var y0 = 0.5 /* Y */.toString();
|
||||
var y1 = 0.5 /* "Y" */.toString();
|
||||
var z0 = 2 /* Z */ .toString();
|
||||
var z1 = 2 /* "Z" */ .toString();
|
||||
var a0 = -1 /* A */ .toString();
|
||||
var a1 = -1 /* "A" */ .toString();
|
||||
var z0 = 2 /* Z */..toString();
|
||||
var z1 = 2 /* "Z" */..toString();
|
||||
var a0 = -1 /* A */..toString();
|
||||
var a1 = -1 /* "A" */..toString();
|
||||
var b0 = -1.5 /* B */.toString();
|
||||
var b1 = -1.5 /* "B" */.toString();
|
||||
var c0 = -1 /* C */ .toString();
|
||||
var c1 = -1 /* "C" */ .toString();
|
||||
var c0 = -1 /* C */..toString();
|
||||
var c1 = -1 /* "C" */..toString();
|
||||
|
||||
@@ -23,4 +23,3 @@ var A = (function () {
|
||||
};
|
||||
return A;
|
||||
}());
|
||||
exports.default = A;
|
||||
|
||||
@@ -7,6 +7,7 @@ export = f;
|
||||
|
||||
//// [es6ExportEquals.js]
|
||||
export function f() { }
|
||||
export = f;
|
||||
|
||||
|
||||
//// [es6ExportEquals.d.ts]
|
||||
|
||||
@@ -8,5 +8,4 @@
|
||||
//// [functionsWithModifiersInBlocks1.js]
|
||||
{
|
||||
function f() { }
|
||||
exports.f = f;
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@ var E2;
|
||||
var E3;
|
||||
(function (E3) {
|
||||
E3[E3["a"] = 0] = "a";
|
||||
E3[E3["1"] = 1] = "1";
|
||||
E3[E3[1] = 1] = 1;
|
||||
})(E3 || (E3 = {}));
|
||||
var E1;
|
||||
(function (E1) {
|
||||
E1[E1["a"] = 0] = "a";
|
||||
E1[E1["b"] = 1] = "b";
|
||||
E1[E1["1"] = 2] = "1";
|
||||
E1[E1[1] = 2] = 1;
|
||||
E1[E1["c"] = 3] = "c";
|
||||
E1[E1["d"] = 4] = "d";
|
||||
E1[E1["2"] = 3] = "2";
|
||||
E1[E1[2] = 3] = 2;
|
||||
})(E1 || (E1 = {}));
|
||||
|
||||
@@ -6,7 +6,7 @@ enum E {
|
||||
//// [parserEnum7.js]
|
||||
var E;
|
||||
(function (E) {
|
||||
E[E["1"] = 0] = "1";
|
||||
E[E["2"] = 1] = "2";
|
||||
E[E["3"] = 2] = "3";
|
||||
E[E[1] = 0] = 1;
|
||||
E[E[2] = 1] = 2;
|
||||
E[E[3] = 2] = 3;
|
||||
})(E || (E = {}));
|
||||
|
||||
@@ -7,6 +7,6 @@ class C {
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.F = function (A, B) { };
|
||||
C.prototype.F = function (B) { };
|
||||
return C;
|
||||
}());
|
||||
|
||||
@@ -42,9 +42,9 @@ var Q = (function (_super) {
|
||||
// Super is not allowed in constructor args
|
||||
function Q(z, zz, zzz) {
|
||||
var _this = this;
|
||||
if (z === void 0) { z = _super.prototype.; }
|
||||
if (zz === void 0) { zz = _super.prototype.; }
|
||||
if (zzz === void 0) { zzz = function () { return _super.prototype.; }; }
|
||||
if (z === void 0) { z = _super.; }
|
||||
if (zz === void 0) { zz = _super.; }
|
||||
if (zzz === void 0) { zzz = function () { return _super.; }; }
|
||||
_super.call(this);
|
||||
this.z = z;
|
||||
this.xx = _super.prototype.;
|
||||
|
||||
@@ -42,78 +42,84 @@ export * from 'a';
|
||||
|
||||
//// [file1.js]
|
||||
// set of tests cases that checks generation of local storage for exported names
|
||||
System.register(['bar'], function(exports_1, context_1) {
|
||||
System.register(["bar"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x;
|
||||
function foo() { }
|
||||
var x;
|
||||
exports_1("foo", foo);
|
||||
var exportedNames_1 = {
|
||||
'x': true,
|
||||
'foo': true
|
||||
"x": true,
|
||||
"foo": true
|
||||
};
|
||||
function exportStar_1(m) {
|
||||
var exports = {};
|
||||
for(var n in m) {
|
||||
if (n !== "default"&& !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n];
|
||||
for (var n in m) {
|
||||
if (n !== "default" && !exportedNames_1.hasOwnProperty(n))
|
||||
exports[n] = m[n];
|
||||
}
|
||||
exports_1(exports);
|
||||
}
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (bar_1_1) {
|
||||
exportStar_1(bar_1_1);
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
// set of tests cases that checks generation of local storage for exported names
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file2.js]
|
||||
System.register(['bar'], function(exports_1, context_1) {
|
||||
System.register(["bar"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x, y;
|
||||
var exportedNames_1 = {
|
||||
'x': true,
|
||||
'y1': true
|
||||
"x": true,
|
||||
"y1": true
|
||||
};
|
||||
function exportStar_1(m) {
|
||||
var exports = {};
|
||||
for(var n in m) {
|
||||
if (n !== "default"&& !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n];
|
||||
for (var n in m) {
|
||||
if (n !== "default" && !exportedNames_1.hasOwnProperty(n))
|
||||
exports[n] = m[n];
|
||||
}
|
||||
exports_1(exports);
|
||||
}
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (bar_1_1) {
|
||||
exportStar_1(bar_1_1);
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
exports_1("x", x);
|
||||
exports_1("y1", y);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file3.js]
|
||||
System.register(['a', 'bar'], function(exports_1, context_1) {
|
||||
System.register(["a", "bar"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function foo() { }
|
||||
exports_1("default", foo);
|
||||
var exportedNames_1 = {
|
||||
'x': true,
|
||||
'z': true
|
||||
"x": true,
|
||||
"z": true
|
||||
};
|
||||
function exportStar_1(m) {
|
||||
var exports = {};
|
||||
for(var n in m) {
|
||||
if (n !== "default"&& !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n];
|
||||
for (var n in m) {
|
||||
if (n !== "default" && !exportedNames_1.hasOwnProperty(n))
|
||||
exports[n] = m[n];
|
||||
}
|
||||
exports_1(exports);
|
||||
}
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (a_1_1) {
|
||||
exports_1({
|
||||
"x": a_1_1["x"],
|
||||
@@ -122,52 +128,56 @@ System.register(['a', 'bar'], function(exports_1, context_1) {
|
||||
},
|
||||
function (bar_1_1) {
|
||||
exportStar_1(bar_1_1);
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file4.js]
|
||||
System.register(['a'], function(exports_1, context_1) {
|
||||
System.register(["a"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var x, z, z1;
|
||||
function foo() { }
|
||||
exports_1("foo", foo);
|
||||
function default_1() { }
|
||||
var x, z, z1;
|
||||
exports_1("foo", foo);
|
||||
exports_1("default", default_1);
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (a_1_1) {
|
||||
exports_1({
|
||||
"s": a_1_1["s"],
|
||||
"s2": a_1_1["s1"]
|
||||
});
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
exports_1("z", z);
|
||||
exports_1("z2", z1);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [file5.js]
|
||||
System.register(['a'], function(exports_1, context_1) {
|
||||
System.register(["a"], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
function foo() { }
|
||||
function exportStar_1(m) {
|
||||
var exports = {};
|
||||
for(var n in m) {
|
||||
if (n !== "default") exports[n] = m[n];
|
||||
for (var n in m) {
|
||||
if (n !== "default")
|
||||
exports[n] = m[n];
|
||||
}
|
||||
exports_1(exports);
|
||||
}
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (a_1_1) {
|
||||
exportStar_1(a_1_1);
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ System.register([], function (exports_1, context_1) {
|
||||
function foo() {
|
||||
exports_1("x", x = 100);
|
||||
}
|
||||
var x, x, y, z0, z1, _a;
|
||||
var x, y, z0, z1, _a;
|
||||
return {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
@@ -60,7 +60,7 @@ System.register([], function (exports_1, context_1) {
|
||||
for (exports_1("x", x = 8);; exports_1("x", --x) + 1) { }
|
||||
for (exports_1("x", x = 15);; exports_1("x", ++x)) { }
|
||||
for (exports_1("x", x = 18);; exports_1("x", --x)) { }
|
||||
for (x = 50;;) { }
|
||||
for (var x_1 = 50;;) { }
|
||||
exports_1("y", y = [1][0]);
|
||||
_a = { a: true, b: { c: "123" } }, exports_1("z0", z0 = _a.a), exports_1("z1", z1 = _a.b.c);
|
||||
for (var _i = 0, _a = [[1]]; _i < _a.length; _i++) {
|
||||
|
||||
@@ -10,15 +10,15 @@ export enum E {}
|
||||
export module E { var x; }
|
||||
|
||||
//// [systemModuleDeclarationMerging.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var F, C, E;
|
||||
function F() { }
|
||||
var F, C, C, E;
|
||||
exports_1("F", F);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
(function (F) {
|
||||
var x;
|
||||
})(F = F || (F = {}));
|
||||
@@ -41,5 +41,5 @@ System.register([], function(exports_1, context_1) {
|
||||
})(E = E || (E = {}));
|
||||
exports_1("E", E);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -14,21 +14,21 @@ export function myFunction2() {
|
||||
}
|
||||
|
||||
//// [systemModuleTargetES6.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var MyClass, MyClass2;
|
||||
function myFunction() {
|
||||
return new MyClass();
|
||||
}
|
||||
exports_1("myFunction", myFunction);
|
||||
function myFunction2() {
|
||||
return new MyClass2();
|
||||
}
|
||||
var MyClass, MyClass2;
|
||||
exports_1("myFunction", myFunction);
|
||||
exports_1("myFunction2", myFunction2);
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
MyClass = class MyClass {
|
||||
};
|
||||
exports_1("MyClass", MyClass);
|
||||
@@ -38,5 +38,5 @@ System.register([], function(exports_1, context_1) {
|
||||
MyClass2.value = 42;
|
||||
exports_1("MyClass2", MyClass2);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -13,13 +13,13 @@ export class Bar extends Foo {
|
||||
}
|
||||
|
||||
//// [foo.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
System.register([], function (exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var Foo;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
setters: [],
|
||||
execute: function () {
|
||||
Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
@@ -27,7 +27,7 @@ System.register([], function(exports_1, context_1) {
|
||||
}());
|
||||
exports_1("Foo", Foo);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
//// [bar.js]
|
||||
System.register(['./foo'], function(exports_1, context_1) {
|
||||
@@ -38,14 +38,14 @@ System.register(['./foo'], function(exports_1, context_1) {
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
var foo_1;
|
||||
var Bar;
|
||||
var foo_1, Bar;
|
||||
return {
|
||||
setters:[
|
||||
setters: [
|
||||
function (foo_1_1) {
|
||||
foo_1 = foo_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
}
|
||||
],
|
||||
execute: function () {
|
||||
Bar = (function (_super) {
|
||||
__extends(Bar, _super);
|
||||
function Bar() {
|
||||
@@ -55,5 +55,5 @@ System.register(['./foo'], function(exports_1, context_1) {
|
||||
}(foo_1.Foo));
|
||||
exports_1("Bar", Bar);
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -6,6 +6,7 @@ function f(x: string) {
|
||||
}
|
||||
|
||||
//// [templateStringInFunctionParameterType.js]
|
||||
function f() { }
|
||||
"hello";
|
||||
;
|
||||
function f(x) {
|
||||
|
||||
@@ -6,6 +6,7 @@ function f(x: string) {
|
||||
}
|
||||
|
||||
//// [templateStringInFunctionParameterTypeES6.js]
|
||||
function f() { }
|
||||
`hello`;
|
||||
;
|
||||
function f(x) {
|
||||
|
||||
@@ -9,10 +9,10 @@ class Vector {
|
||||
}
|
||||
|
||||
//// [thisInArrowFunctionInStaticInitializer1.js]
|
||||
var _this = this;
|
||||
function log(a) { }
|
||||
var Vector = (function () {
|
||||
function Vector() {
|
||||
var _this = this;
|
||||
}
|
||||
return Vector;
|
||||
}());
|
||||
|
||||
@@ -4,6 +4,6 @@ function* foo() {
|
||||
}
|
||||
|
||||
//// [yieldExpression1.js]
|
||||
function foo() {
|
||||
function* foo() {
|
||||
yield;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user