From dcb61ebc2094adf0b9713e39eaba6baaf04993b0 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 4 Apr 2016 13:52:48 -0700 Subject: [PATCH] Accepted acceptable baselines. --- tests/baselines/reference/exportEqualsUmd.js | 6 +- tests/baselines/reference/externModule.js | 1 - .../externalModuleWithoutCompilerFlag1.js | 1 - .../functionExpressionInWithBlock.js | 3 +- .../reference/genericArrayExtenstions.js | 1 - ...ericRecursiveImplicitConstructorErrors1.js | 1 - .../invalidLetInForOfAndForIn_ES5.js | 4 +- .../invalidLetInForOfAndForIn_ES6.js | 4 +- .../baselines/reference/isolatedModulesOut.js | 1 + .../isolatedModulesPlainFile-System.js | 8 +- .../reference/isolatedModulesPlainFile-UMD.js | 6 +- .../baselines/reference/localClassesInLoop.js | 2 +- .../reference/modifierOnParameter1.js | 2 +- ...gmentationCollidingNamesInAugmentation1.js | 1 - .../reference/moduleAugmentationNoNewNames.js | 1 - .../reference/modulePrologueSystem.js | 8 +- .../baselines/reference/modulePrologueUmd.js | 6 +- tests/baselines/reference/noEmitHelpers2.js | 6 +- .../noImplicitAnyInCastExpression.js | 6 +- .../reference/noImplicitUseStrict_system.js | 8 +- .../reference/noImplicitUseStrict_umd.js | 6 +- .../reference/numericClassMembers1.js | 10 +- ...ericLiteralsWithTrailingDecimalPoints01.js | 6 +- .../reference/objectLiteralWithSemicolons4.js | 3 +- .../reference/outModuleConcatCommonjs.js | 17 +++ .../reference/outModuleConcatCommonjs.js.map | 2 +- .../outModuleConcatCommonjs.sourcemap.txt | 85 ++++++++++++++- .../baselines/reference/outModuleConcatES6.js | 5 + .../reference/outModuleConcatES6.js.map | 2 +- .../outModuleConcatES6.sourcemap.txt | 80 +++++++++++++- .../baselines/reference/outModuleConcatUmd.js | 35 ++++++ .../reference/outModuleConcatUmd.js.map | 2 +- .../outModuleConcatUmd.sourcemap.txt | 103 +++++++++++++++++- .../reference/overloadConsecutiveness.js | 6 +- tests/baselines/reference/promiseChaining.js | 2 +- .../reference/qualifiedModuleLocals.js | 4 +- tests/baselines/reference/reservedWords2.js | 1 + .../baselines/reference/restParamModifier.js | 2 +- .../reference/restParameterNotLast.js | 2 +- 39 files changed, 385 insertions(+), 64 deletions(-) diff --git a/tests/baselines/reference/exportEqualsUmd.js b/tests/baselines/reference/exportEqualsUmd.js index 615cc2cddbe58..a9b75978d0627 100644 --- a/tests/baselines/reference/exportEqualsUmd.js +++ b/tests/baselines/reference/exportEqualsUmd.js @@ -2,14 +2,14 @@ export = { ["hi"]: "there" }; //// [exportEqualsUmd.js] -(function (factory) { +(function (dependencies, factory) { if (typeof module === 'object' && typeof module.exports === 'object') { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === 'function' && define.amd) { - define(["require", "exports"], factory); + define(dependencies, factory); } -})(function (require, exports) { +})(["require", "exports"], function (require, exports) { "use strict"; return (_a = {}, _a["hi"] = "there", _a); var _a; diff --git a/tests/baselines/reference/externModule.js b/tests/baselines/reference/externModule.js index d5684ea1f46b5..a7f58e4f30ce5 100644 --- a/tests/baselines/reference/externModule.js +++ b/tests/baselines/reference/externModule.js @@ -48,7 +48,6 @@ module; } return XDate; }()); - exports.XDate = XDate; } var d = new XDate(); d.getDay(); diff --git a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js index 0b1f17612b01d..b5c939453e666 100644 --- a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js +++ b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js @@ -5,4 +5,3 @@ } //// [externalModuleWithoutCompilerFlag1.js] -"use strict"; diff --git a/tests/baselines/reference/functionExpressionInWithBlock.js b/tests/baselines/reference/functionExpressionInWithBlock.js index f2353412d5cd7..2fae2384313e6 100644 --- a/tests/baselines/reference/functionExpressionInWithBlock.js +++ b/tests/baselines/reference/functionExpressionInWithBlock.js @@ -11,7 +11,8 @@ function x() { function x() { with ({}) { function f() { - (function () { return this; }); + var _this = this; + (function () { return _this; }); } } } diff --git a/tests/baselines/reference/genericArrayExtenstions.js b/tests/baselines/reference/genericArrayExtenstions.js index 63c67a1376074..774e512d48fe3 100644 --- a/tests/baselines/reference/genericArrayExtenstions.js +++ b/tests/baselines/reference/genericArrayExtenstions.js @@ -6,4 +6,3 @@ concat(...items: T[]): T[]; //// [genericArrayExtenstions.js] -"use strict"; diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js index f9bcc86194c76..d6c0e686ce054 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js @@ -15,5 +15,4 @@ export declare module TypeScript { //// [genericRecursiveImplicitConstructorErrors1.js] define(["require", "exports"], function (require, exports) { - "use strict"; }); diff --git a/tests/baselines/reference/invalidLetInForOfAndForIn_ES5.js b/tests/baselines/reference/invalidLetInForOfAndForIn_ES5.js index 729cb246a85d2..b9f4c126015bb 100644 --- a/tests/baselines/reference/invalidLetInForOfAndForIn_ES5.js +++ b/tests/baselines/reference/invalidLetInForOfAndForIn_ES5.js @@ -14,5 +14,5 @@ for (let in [1,2,3]) {} // This should be an error // More details: http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements var let = 10; -for (let of = [1, 2, 3], { }; ; ) - for ( in [1, 2, 3]) { } +for (let of = [1, 2, 3], {}; ; ) + for (let in [1, 2, 3]) { } diff --git a/tests/baselines/reference/invalidLetInForOfAndForIn_ES6.js b/tests/baselines/reference/invalidLetInForOfAndForIn_ES6.js index 93258d6b225f3..be59a37d1a897 100644 --- a/tests/baselines/reference/invalidLetInForOfAndForIn_ES6.js +++ b/tests/baselines/reference/invalidLetInForOfAndForIn_ES6.js @@ -14,5 +14,5 @@ for (let in [1,2,3]) {} // This should be an error // More details: http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements var let = 10; -for (let of = [1, 2, 3], { }; ; ) - for ( in [1, 2, 3]) { } +for (let of = [1, 2, 3], {}; ; ) + for (let in [1, 2, 3]) { } diff --git a/tests/baselines/reference/isolatedModulesOut.js b/tests/baselines/reference/isolatedModulesOut.js index 44f319e103143..a7f4679b91fe4 100644 --- a/tests/baselines/reference/isolatedModulesOut.js +++ b/tests/baselines/reference/isolatedModulesOut.js @@ -7,4 +7,5 @@ export var x; var y; //// [all.js] +export var x; var y; diff --git a/tests/baselines/reference/isolatedModulesPlainFile-System.js b/tests/baselines/reference/isolatedModulesPlainFile-System.js index 39320759740d1..39b648e071ae5 100644 --- a/tests/baselines/reference/isolatedModulesPlainFile-System.js +++ b/tests/baselines/reference/isolatedModulesPlainFile-System.js @@ -5,13 +5,13 @@ run(1); //// [isolatedModulesPlainFile-System.js] -System.register([], function(exports_1, context_1) { +System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; return { - setters:[], - execute: function() { + setters: [], + execute: function () { run(1); } - } + }; }); diff --git a/tests/baselines/reference/isolatedModulesPlainFile-UMD.js b/tests/baselines/reference/isolatedModulesPlainFile-UMD.js index 08ec75c48f089..ecc8ade69b7cf 100644 --- a/tests/baselines/reference/isolatedModulesPlainFile-UMD.js +++ b/tests/baselines/reference/isolatedModulesPlainFile-UMD.js @@ -5,14 +5,14 @@ run(1); //// [isolatedModulesPlainFile-UMD.js] -(function (factory) { +(function (dependencies, factory) { if (typeof module === 'object' && typeof module.exports === 'object') { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === 'function' && define.amd) { - define(["require", "exports"], factory); + define(dependencies, factory); } -})(function (require, exports) { +})(["require", "exports"], function (require, exports) { "use strict"; run(1); }); diff --git a/tests/baselines/reference/localClassesInLoop.js b/tests/baselines/reference/localClassesInLoop.js index 0090ada863d57..d01d86da8d1f0 100644 --- a/tests/baselines/reference/localClassesInLoop.js +++ b/tests/baselines/reference/localClassesInLoop.js @@ -13,7 +13,7 @@ use(data[0]() === data[1]()); //// [localClassesInLoop.js] "use strict"; var data = []; -var _loop_1 = function(x) { +var _loop_1 = function (x) { var C = (function () { function C() { } diff --git a/tests/baselines/reference/modifierOnParameter1.js b/tests/baselines/reference/modifierOnParameter1.js index 7b76a805c99f2..dd800aeb886bf 100644 --- a/tests/baselines/reference/modifierOnParameter1.js +++ b/tests/baselines/reference/modifierOnParameter1.js @@ -5,7 +5,7 @@ class C { //// [modifierOnParameter1.js] var C = (function () { - function C() { + function C(p) { } return C; }()); diff --git a/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js index 2e84e1492beed..6ab7a34751103 100644 --- a/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js +++ b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js @@ -35,7 +35,6 @@ let x: Observable; //// [observable.js] define(["require", "exports"], function (require, exports) { - "use strict"; }); //// [map1.js] define(["require", "exports", "./observable"], function (require, exports, observable_1) { diff --git a/tests/baselines/reference/moduleAugmentationNoNewNames.js b/tests/baselines/reference/moduleAugmentationNoNewNames.js index ccd4a668497fa..182f2873fb45a 100644 --- a/tests/baselines/reference/moduleAugmentationNoNewNames.js +++ b/tests/baselines/reference/moduleAugmentationNoNewNames.js @@ -29,7 +29,6 @@ let x: Observable; let y = x.map(x => x + 1); //// [observable.js] -"use strict"; //// [map.js] "use strict"; var observable_1 = require("./observable"); diff --git a/tests/baselines/reference/modulePrologueSystem.js b/tests/baselines/reference/modulePrologueSystem.js index 13f7d35b0016d..c3919669a8d18 100644 --- a/tests/baselines/reference/modulePrologueSystem.js +++ b/tests/baselines/reference/modulePrologueSystem.js @@ -4,13 +4,13 @@ export class Foo {} //// [modulePrologueSystem.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() { } @@ -18,5 +18,5 @@ System.register([], function(exports_1, context_1) { }()); exports_1("Foo", Foo); } - } + }; }); diff --git a/tests/baselines/reference/modulePrologueUmd.js b/tests/baselines/reference/modulePrologueUmd.js index a573559b7e919..fb366945d6614 100644 --- a/tests/baselines/reference/modulePrologueUmd.js +++ b/tests/baselines/reference/modulePrologueUmd.js @@ -4,14 +4,14 @@ export class Foo {} //// [modulePrologueUmd.js] -(function (factory) { +(function (dependencies, factory) { if (typeof module === 'object' && typeof module.exports === 'object') { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === 'function' && define.amd) { - define(["require", "exports"], factory); + define(dependencies, factory); } -})(function (require, exports) { +})(["require", "exports"], function (require, exports) { "use strict"; var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/noEmitHelpers2.js b/tests/baselines/reference/noEmitHelpers2.js index fc4baf334c3d7..afb8cb906453c 100644 --- a/tests/baselines/reference/noEmitHelpers2.js +++ b/tests/baselines/reference/noEmitHelpers2.js @@ -16,6 +16,8 @@ var A = (function () { }()); A = __decorate([ decorator, - __param(1, decorator), - __metadata('design:paramtypes', [Number, String]) + __param(1, decorator), + __metadata("design:typeinfo", { + paramTypes: function () { return [Number, String]; } + }) ], A); diff --git a/tests/baselines/reference/noImplicitAnyInCastExpression.js b/tests/baselines/reference/noImplicitAnyInCastExpression.js index 1b7cc59c7c06f..b0a6907a5b485 100644 --- a/tests/baselines/reference/noImplicitAnyInCastExpression.js +++ b/tests/baselines/reference/noImplicitAnyInCastExpression.js @@ -19,8 +19,8 @@ interface IFoo { //// [noImplicitAnyInCastExpression.js] // verify no noImplictAny errors reported with cast expression // Expr type not assignable to target type -{ a: null }; +({ a: null }); // Expr type assignable to target type -{ a: 2, b: undefined }; +({ a: 2, b: undefined }); // Neither types is assignable to each other -{ c: null }; +({ c: null }); diff --git a/tests/baselines/reference/noImplicitUseStrict_system.js b/tests/baselines/reference/noImplicitUseStrict_system.js index cf5a7e1b26173..f1100e20fd7ca 100644 --- a/tests/baselines/reference/noImplicitUseStrict_system.js +++ b/tests/baselines/reference/noImplicitUseStrict_system.js @@ -3,13 +3,13 @@ export var x = 0; //// [noImplicitUseStrict_system.js] -System.register([], function(exports_1, context_1) { +System.register([], function (exports_1, context_1) { var __moduleName = context_1 && context_1.id; var x; return { - setters:[], - execute: function() { + setters: [], + execute: function () { exports_1("x", x = 0); } - } + }; }); diff --git a/tests/baselines/reference/noImplicitUseStrict_umd.js b/tests/baselines/reference/noImplicitUseStrict_umd.js index ca252daeb9d4c..566c3bbe0b650 100644 --- a/tests/baselines/reference/noImplicitUseStrict_umd.js +++ b/tests/baselines/reference/noImplicitUseStrict_umd.js @@ -3,13 +3,13 @@ export var x = 0; //// [noImplicitUseStrict_umd.js] -(function (factory) { +(function (dependencies, factory) { if (typeof module === 'object' && typeof module.exports === 'object') { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === 'function' && define.amd) { - define(["require", "exports"], factory); + define(dependencies, factory); } -})(function (require, exports) { +})(["require", "exports"], function (require, exports) { exports.x = 0; }); diff --git a/tests/baselines/reference/numericClassMembers1.js b/tests/baselines/reference/numericClassMembers1.js index 244343071257d..3d606cce71902 100644 --- a/tests/baselines/reference/numericClassMembers1.js +++ b/tests/baselines/reference/numericClassMembers1.js @@ -19,21 +19,21 @@ class C236 { var C234 = (function () { function C234() { this[0] = 1; - this[0.0] = 2; + this[0] = 2; } return C234; }()); var C235 = (function () { function C235() { - this[0.0] = 1; - this['0'] = 2; + this[0] = 1; + this["0"] = 2; } return C235; }()); var C236 = (function () { function C236() { - this['0.0'] = 1; - this['0'] = 2; + this["0.0"] = 1; + this["0"] = 2; } return C236; }()); diff --git a/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js b/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js index 0b1ce1f07365d..54a0328c27c69 100644 --- a/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js +++ b/tests/baselines/reference/numericLiteralsWithTrailingDecimalPoints01.js @@ -28,9 +28,9 @@ toString(); var i = 1; var test1 = i.toString(); var test2 = 2., toString = (); -var test3 = 3 .toString(); -var test4 = 3 .toString(); -var test5 = 3 .toString(); +var test3 = 3..toString(); +var test4 = 3..toString(); +var test5 = 3..toString(); var test6 = 3.['toString'](); var test7 = 3 .toString(); diff --git a/tests/baselines/reference/objectLiteralWithSemicolons4.js b/tests/baselines/reference/objectLiteralWithSemicolons4.js index a01d52548ee46..9e1e3dea4b98f 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons4.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons4.js @@ -5,4 +5,5 @@ var v = { //// [objectLiteralWithSemicolons4.js] var v = { - a: }; + a: +}; diff --git a/tests/baselines/reference/outModuleConcatCommonjs.js b/tests/baselines/reference/outModuleConcatCommonjs.js index 0dbaee88004fb..5239018001ce0 100644 --- a/tests/baselines/reference/outModuleConcatCommonjs.js +++ b/tests/baselines/reference/outModuleConcatCommonjs.js @@ -17,6 +17,23 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; // This should be an error +"use strict"; +var A = (function () { + function A() { + } + return A; +}()); +exports.A = A; +"use strict"; +var a_1 = require("./ref/a"); +var B = (function (_super) { + __extends(B, _super); + function B() { + _super.apply(this, arguments); + } + return B; +}(a_1.A)); +exports.B = B; //# sourceMappingURL=all.js.map //// [all.d.ts] diff --git a/tests/baselines/reference/outModuleConcatCommonjs.js.map b/tests/baselines/reference/outModuleConcatCommonjs.js.map index 09646467406b9..1617d2867ef57 100644 --- a/tests/baselines/reference/outModuleConcatCommonjs.js.map +++ b/tests/baselines/reference/outModuleConcatCommonjs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AACA,0BAA0B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AACA,0BAA0B;;AAE1B;;;;KAAkB;AAAlB,YAAa,CAAC,CAAI;;ACHlB,6BAA0B;AAC1B;;;;;;EAAuB,KAAC,GAAI;AAA5B,YAAa,CAAC,CAAc"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatCommonjs.sourcemap.txt b/tests/baselines/reference/outModuleConcatCommonjs.sourcemap.txt index 698328649e2d7..fa4be89b48dc7 100644 --- a/tests/baselines/reference/outModuleConcatCommonjs.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatCommonjs.sourcemap.txt @@ -16,11 +16,94 @@ sourceFile:tests/cases/compiler/ref/a.ts >>>// This should be an error 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^-> 1 > > 2 >// This should be an error 1 >Emitted(6, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(6, 27) Source(2, 27) + SourceIndex(0) --- +>>>"use strict"; +>>>var A = (function () { +1 > +2 >^^^^^^^^^^^^^^^^^^^-> +1 > + > + > +1 >Emitted(8, 1) Source(4, 1) + SourceIndex(0) +--- +>>> function A() { +>>> } +>>> return A; +>>>}()); +1->^^^^^ +2 > ^^^^^^^^^^-> +1->export class A { } +1->Emitted(12, 6) Source(4, 19) + SourceIndex(0) +--- +>>>exports.A = A; +1-> +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^ +1-> +2 >export class +3 > A +4 > { } +1->Emitted(13, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(13, 13) Source(4, 14) + SourceIndex(0) +3 >Emitted(13, 14) Source(4, 15) + SourceIndex(0) +4 >Emitted(13, 15) Source(4, 19) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:all.js +sourceFile:tests/cases/compiler/b.ts +------------------------------------------------------------------- +>>>"use strict"; +>>>var a_1 = require("./ref/a"); +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 >import {A} from "./ref/a"; +1 >Emitted(15, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(15, 30) Source(1, 27) + SourceIndex(1) +--- +>>>var B = (function (_super) { +1 > +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(16, 1) Source(2, 1) + SourceIndex(1) +--- +>>> __extends(B, _super); +>>> function B() { +>>> _super.apply(this, arguments); +>>> } +>>> return B; +>>>}(a_1.A)); +1->^^ +2 > ^^^^^ +3 > ^^^ +4 > ^^^^^-> +1->export class B extends +2 > A +3 > { } +1->Emitted(22, 3) Source(2, 24) + SourceIndex(1) +2 >Emitted(22, 8) Source(2, 25) + SourceIndex(1) +3 >Emitted(22, 11) Source(2, 29) + SourceIndex(1) +--- +>>>exports.B = B; +1-> +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^-> +1-> +2 >export class +3 > B +4 > extends A { } +1->Emitted(23, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(23, 13) Source(2, 14) + SourceIndex(1) +3 >Emitted(23, 14) Source(2, 15) + SourceIndex(1) +4 >Emitted(23, 15) Source(2, 29) + SourceIndex(1) +--- >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatES6.js b/tests/baselines/reference/outModuleConcatES6.js index 45e58d2d773d7..0b68aec869fd7 100644 --- a/tests/baselines/reference/outModuleConcatES6.js +++ b/tests/baselines/reference/outModuleConcatES6.js @@ -12,6 +12,11 @@ export class B extends A { } //// [all.js] // This should be an error +export class A { +} +import { A } from "./ref/a"; +export class B extends A { +} //# sourceMappingURL=all.js.map //// [all.d.ts] diff --git a/tests/baselines/reference/outModuleConcatES6.js.map b/tests/baselines/reference/outModuleConcatES6.js.map index bd3e6f5873161..79312ec601c21 100644 --- a/tests/baselines/reference/outModuleConcatES6.js.map +++ b/tests/baselines/reference/outModuleConcatES6.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AACA,0BAA0B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":"AACA,0BAA0B;AAE1B,MAAM,OAAO,CAAC;CAAI;ACHlB,OAAO,EAAC,CAAC,EAAC,MAAM,SAAS,CAAC;AAC1B,MAAM,OAAO,CAAE,SAAQ,CAAC;CAAI"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatES6.sourcemap.txt b/tests/baselines/reference/outModuleConcatES6.sourcemap.txt index 78b6e98ac1548..ba06654259520 100644 --- a/tests/baselines/reference/outModuleConcatES6.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatES6.sourcemap.txt @@ -11,11 +11,89 @@ sourceFile:tests/cases/compiler/ref/a.ts >>>// This should be an error 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^-> 1 > > 2 >// This should be an error 1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(1, 27) Source(2, 27) + SourceIndex(0) --- +>>>export class A { +1 > +2 >^^^^^^ +3 > ^^^^^^^ +4 > ^ +1 > + > + > +2 >export +3 > class +4 > A +1 >Emitted(2, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(2, 7) Source(4, 7) + SourceIndex(0) +3 >Emitted(2, 14) Source(4, 14) + SourceIndex(0) +4 >Emitted(2, 15) Source(4, 15) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > { } +1 >Emitted(3, 2) Source(4, 19) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:all.js +sourceFile:tests/cases/compiler/b.ts +------------------------------------------------------------------- +>>>import { A } from "./ref/a"; +1-> +2 >^^^^^^^ +3 > ^^ +4 > ^ +5 > ^^ +6 > ^^^^^^ +7 > ^^^^^^^^^ +8 > ^ +1-> +2 >import +3 > { +4 > A +5 > } +6 > from +7 > "./ref/a" +8 > ; +1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(4, 10) Source(1, 9) + SourceIndex(1) +4 >Emitted(4, 11) Source(1, 10) + SourceIndex(1) +5 >Emitted(4, 13) Source(1, 11) + SourceIndex(1) +6 >Emitted(4, 19) Source(1, 17) + SourceIndex(1) +7 >Emitted(4, 28) Source(1, 26) + SourceIndex(1) +8 >Emitted(4, 29) Source(1, 27) + SourceIndex(1) +--- +>>>export class B extends A { +1 > +2 >^^^^^^ +3 > ^^^^^^^ +4 > ^ +5 > ^^^^^^^^^ +6 > ^ +1 > + > +2 >export +3 > class +4 > B +5 > extends +6 > A +1 >Emitted(5, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(5, 7) Source(2, 7) + SourceIndex(1) +3 >Emitted(5, 14) Source(2, 14) + SourceIndex(1) +4 >Emitted(5, 15) Source(2, 16) + SourceIndex(1) +5 >Emitted(5, 24) Source(2, 24) + SourceIndex(1) +6 >Emitted(5, 25) Source(2, 25) + SourceIndex(1) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > { } +1 >Emitted(6, 2) Source(2, 29) + SourceIndex(1) +--- >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatUmd.js b/tests/baselines/reference/outModuleConcatUmd.js index 6c60a13c89220..38e73250b8583 100644 --- a/tests/baselines/reference/outModuleConcatUmd.js +++ b/tests/baselines/reference/outModuleConcatUmd.js @@ -17,6 +17,41 @@ var __extends = (this && this.__extends) || function (d, b) { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; // This should error +(function (dependencies, factory) { + if (typeof module === 'object' && typeof module.exports === 'object') { + var v = factory(require, exports); if (v !== undefined) module.exports = v; + } + else if (typeof define === 'function' && define.amd) { + define(dependencies, factory); + } +})(["require", "exports"], function (require, exports) { + "use strict"; + var A = (function () { + function A() { + } + return A; + }()); + exports.A = A; +}); +(function (dependencies, factory) { + if (typeof module === 'object' && typeof module.exports === 'object') { + var v = factory(require, exports); if (v !== undefined) module.exports = v; + } + else if (typeof define === 'function' && define.amd) { + define(dependencies, factory); + } +})(["require", "exports", "./ref/a"], function (require, exports) { + "use strict"; + var a_1 = require("./ref/a"); + var B = (function (_super) { + __extends(B, _super); + function B() { + _super.apply(this, arguments); + } + return B; + }(a_1.A)); + exports.B = B; +}); //# sourceMappingURL=all.js.map //// [all.d.ts] diff --git a/tests/baselines/reference/outModuleConcatUmd.js.map b/tests/baselines/reference/outModuleConcatUmd.js.map index 7a9fcd77bdf1e..c6ad0421c058d 100644 --- a/tests/baselines/reference/outModuleConcatUmd.js.map +++ b/tests/baselines/reference/outModuleConcatUmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AACA,oBAAoB"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AACA,oBAAoB;;;;;;;;;;IAEpB;;;;SAAkB;IAAlB,YAAa,CAAC,CAAI;;;;;;;;;;;ICHlB,6BAA0B;IAC1B;;;;;;MAAuB,KAAC,GAAI;IAA5B,YAAa,CAAC,CAAc"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatUmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatUmd.sourcemap.txt index d2fbe17fe6503..d52fb1e5d1d86 100644 --- a/tests/baselines/reference/outModuleConcatUmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatUmd.sourcemap.txt @@ -16,11 +16,112 @@ sourceFile:tests/cases/compiler/ref/a.ts >>>// This should error 1 > 2 >^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^-> 1 > > 2 >// This should error 1 >Emitted(6, 1) Source(2, 1) + SourceIndex(0) 2 >Emitted(6, 21) Source(2, 21) + SourceIndex(0) --- +>>>(function (dependencies, factory) { +>>> if (typeof module === 'object' && typeof module.exports === 'object') { +>>> var v = factory(require, exports); if (v !== undefined) module.exports = v; +>>> } +>>> else if (typeof define === 'function' && define.amd) { +>>> define(dependencies, factory); +>>> } +>>>})(["require", "exports"], function (require, exports) { +>>> "use strict"; +>>> var A = (function () { +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^-> +1-> + > + > +1->Emitted(16, 5) Source(4, 1) + SourceIndex(0) +--- +>>> function A() { +>>> } +>>> return A; +>>> }()); +1->^^^^^^^^^ +2 > ^^^^^^^^^^-> +1->export class A { } +1->Emitted(20, 10) Source(4, 19) + SourceIndex(0) +--- +>>> exports.A = A; +1->^^^^ +2 > ^^^^^^^^^^^^ +3 > ^ +4 > ^ +1-> +2 > export class +3 > A +4 > { } +1->Emitted(21, 5) Source(4, 1) + SourceIndex(0) +2 >Emitted(21, 17) Source(4, 14) + SourceIndex(0) +3 >Emitted(21, 18) Source(4, 15) + SourceIndex(0) +4 >Emitted(21, 19) Source(4, 19) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:all.js +sourceFile:tests/cases/compiler/b.ts +------------------------------------------------------------------- +>>>}); +>>>(function (dependencies, factory) { +>>> if (typeof module === 'object' && typeof module.exports === 'object') { +>>> var v = factory(require, exports); if (v !== undefined) module.exports = v; +>>> } +>>> else if (typeof define === 'function' && define.amd) { +>>> define(dependencies, factory); +>>> } +>>>})(["require", "exports", "./ref/a"], function (require, exports) { +>>> "use strict"; +>>> var a_1 = require("./ref/a"); +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > +2 > import {A} from "./ref/a"; +1 >Emitted(32, 5) Source(1, 1) + SourceIndex(1) +2 >Emitted(32, 34) Source(1, 27) + SourceIndex(1) +--- +>>> var B = (function (_super) { +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +1 >Emitted(33, 5) Source(2, 1) + SourceIndex(1) +--- +>>> __extends(B, _super); +>>> function B() { +>>> _super.apply(this, arguments); +>>> } +>>> return B; +>>> }(a_1.A)); +1->^^^^^^ +2 > ^^^^^ +3 > ^^^ +4 > ^^^^^-> +1->export class B extends +2 > A +3 > { } +1->Emitted(39, 7) Source(2, 24) + SourceIndex(1) +2 >Emitted(39, 12) Source(2, 25) + SourceIndex(1) +3 >Emitted(39, 15) Source(2, 29) + SourceIndex(1) +--- +>>> exports.B = B; +1->^^^^ +2 > ^^^^^^^^^^^^ +3 > ^ +4 > ^ +1-> +2 > export class +3 > B +4 > extends A { } +1->Emitted(40, 5) Source(2, 1) + SourceIndex(1) +2 >Emitted(40, 17) Source(2, 14) + SourceIndex(1) +3 >Emitted(40, 18) Source(2, 15) + SourceIndex(1) +4 >Emitted(40, 19) Source(2, 29) + SourceIndex(1) +--- +>>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/overloadConsecutiveness.js b/tests/baselines/reference/overloadConsecutiveness.js index 68e478a30b511..6a245ea18fa7f 100644 --- a/tests/baselines/reference/overloadConsecutiveness.js +++ b/tests/baselines/reference/overloadConsecutiveness.js @@ -14,13 +14,15 @@ class C { //// [overloadConsecutiveness.js] // Making sure compiler won't break with declarations that are consecutive in the AST but not consecutive in the source. Syntax errors intentional. +function f1() { } +function f2() { } function f2() { } function f3() { } var C = (function () { function C() { } - C.prototype.m1 = ; - C.prototype.m2 = ; + C.prototype.m1 = function () { }; + C.prototype.m2 = function () { }; C.prototype.m2 = function () { }; C.prototype.m3 = function () { }; return C; diff --git a/tests/baselines/reference/promiseChaining.js b/tests/baselines/reference/promiseChaining.js index 3f0900f7748ea..afa55acb89457 100644 --- a/tests/baselines/reference/promiseChaining.js +++ b/tests/baselines/reference/promiseChaining.js @@ -19,7 +19,7 @@ var Chain = (function () { Chain.prototype.then = function (cb) { var result = cb(this.value); // should get a fresh type parameter which each then call - var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*string*/.then(function (x) { return x.length; }); // No error + var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*string*/.then(function (x) { return x.length; }) /*number*/; // No error return new Chain(result); }; return Chain; diff --git a/tests/baselines/reference/qualifiedModuleLocals.js b/tests/baselines/reference/qualifiedModuleLocals.js index b7ba5b70e81da..7fcbc0700f8d1 100644 --- a/tests/baselines/reference/qualifiedModuleLocals.js +++ b/tests/baselines/reference/qualifiedModuleLocals.js @@ -14,7 +14,7 @@ A.a(); var A; (function (A) { function b() { } - function a() { A.b(); } - A.a = a; // A.b should be an unresolved symbol error + function a() { A.b(); } // A.b should be an unresolved symbol error + A.a = a; })(A || (A = {})); A.a(); diff --git a/tests/baselines/reference/reservedWords2.js b/tests/baselines/reference/reservedWords2.js index 69b071c911584..a5f8a680bccbb 100644 --- a/tests/baselines/reference/reservedWords2.js +++ b/tests/baselines/reference/reservedWords2.js @@ -23,6 +23,7 @@ while (from) var ; typeof ; 10; +function () { } throw function () { }; module; void {}; diff --git a/tests/baselines/reference/restParamModifier.js b/tests/baselines/reference/restParamModifier.js index 3e0f7f7878a35..ed7307fcdef31 100644 --- a/tests/baselines/reference/restParamModifier.js +++ b/tests/baselines/reference/restParamModifier.js @@ -5,7 +5,7 @@ class C { //// [restParamModifier.js] var C = (function () { - function C(public, string) { + function C(string) { if (string === void 0) { string = []; } } return C; diff --git a/tests/baselines/reference/restParameterNotLast.js b/tests/baselines/reference/restParameterNotLast.js index 4ca416a47ecaa..d879bc12cd310 100644 --- a/tests/baselines/reference/restParameterNotLast.js +++ b/tests/baselines/reference/restParameterNotLast.js @@ -2,4 +2,4 @@ function f(...x, y) { } //// [restParameterNotLast.js] -function f(x, y) { } +function f(y) { }