mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-16 05:41:21 -06:00
update baselines in unittests, fix linter issues
This commit is contained in:
parent
4d8c00f43d
commit
86a51cbe24
@ -243,7 +243,7 @@ namespace ts {
|
||||
const savedUseCapturedThis = useCapturedThis;
|
||||
|
||||
if (nodeStartsNewLexicalEnvironment(node)) {
|
||||
useCapturedThis = false
|
||||
useCapturedThis = false;
|
||||
}
|
||||
|
||||
let result: VisitResult<Node>;
|
||||
@ -511,10 +511,10 @@ namespace ts {
|
||||
if (convertedLoopState.loopOutParameters.length) {
|
||||
const outParams = convertedLoopState.loopOutParameters;
|
||||
let expr: Expression;
|
||||
for (let i = 0; i < outParams.length; ++i) {
|
||||
for (let i = 0; i < outParams.length; i++) {
|
||||
const copyExpr = copyOutParameter(outParams[i], CopyDirection.ToOutParameter);
|
||||
if (i === 0) {
|
||||
expr = copyExpr
|
||||
expr = copyExpr;
|
||||
}
|
||||
else {
|
||||
expr = createBinary(expr, SyntaxKind.CommaToken, copyExpr);
|
||||
@ -1324,7 +1324,7 @@ namespace ts {
|
||||
if (decl.initializer) {
|
||||
let assignment: Expression;
|
||||
if (isBindingPattern(decl.name)) {
|
||||
assignment = flattenVariableDestructuringToExpression(context, decl, hoistVariableDeclaration,/*nameSubstitution*/ undefined, visitor);
|
||||
assignment = flattenVariableDestructuringToExpression(context, decl, hoistVariableDeclaration, /*nameSubstitution*/ undefined, visitor);
|
||||
}
|
||||
else {
|
||||
assignment = createBinary(<Identifier>decl.name, SyntaxKind.EqualsToken, decl.initializer);
|
||||
|
||||
@ -2215,7 +2215,7 @@ namespace ts {
|
||||
)],
|
||||
/*location*/ node
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -129,16 +129,16 @@ var x = 0;`,
|
||||
|
||||
it("Sets module name", () => {
|
||||
let output =
|
||||
`System.register("NamedModule", [], function(exports_1, context_1) {\n` +
|
||||
`System.register("NamedModule", [], function (exports_1, context_1) {\n` +
|
||||
` "use strict";\n` +
|
||||
` var __moduleName = context_1 && context_1.id;\n` +
|
||||
` var x;\n` +
|
||||
` return {\n` +
|
||||
` setters:[],\n` +
|
||||
` execute: function() {\n` +
|
||||
` var x = 1;\n` +
|
||||
` setters: [],\n` +
|
||||
` execute: function () {\n` +
|
||||
` x = 1;\n` +
|
||||
` }\n` +
|
||||
` }\n` +
|
||||
` };\n` +
|
||||
`});\n`;
|
||||
test("var x = 1;",
|
||||
{
|
||||
@ -157,19 +157,20 @@ var x = 0;`,
|
||||
`declare function use(a: any);\n` +
|
||||
`use(foo);`
|
||||
let output =
|
||||
`System.register(["SomeOtherName"], function(exports_1, context_1) {\n` +
|
||||
`System.register(["SomeOtherName"], function (exports_1, context_1) {\n` +
|
||||
` "use strict";\n` +
|
||||
` var __moduleName = context_1 && context_1.id;\n` +
|
||||
` var SomeName_1;\n` +
|
||||
` return {\n` +
|
||||
` setters:[\n` +
|
||||
` setters: [\n` +
|
||||
` function (SomeName_1_1) {\n` +
|
||||
` SomeName_1 = SomeName_1_1;\n` +
|
||||
` }],\n` +
|
||||
` execute: function() {\n` +
|
||||
` }\n` +
|
||||
` ],\n` +
|
||||
` execute: function () {\n` +
|
||||
` use(SomeName_1.foo);\n` +
|
||||
` }\n` +
|
||||
` }\n` +
|
||||
` };\n` +
|
||||
`});\n`
|
||||
|
||||
test(input,
|
||||
@ -203,18 +204,18 @@ var x = 0;`,
|
||||
`declare function use(a: any);\n` +
|
||||
`use(foo);`
|
||||
let output =
|
||||
`(function (factory) {\n` +
|
||||
`(function (dependencies, factory) {\n` +
|
||||
` if (typeof module === 'object' && typeof module.exports === 'object') {\n` +
|
||||
` var v = factory(require, exports); if (v !== undefined) module.exports = v;\n` +
|
||||
` }\n` +
|
||||
` else if (typeof define === 'function' && define.amd) {\n` +
|
||||
` define(["require", "exports", "SomeOtherName"], factory);\n` +
|
||||
` define(dependencies, factory);\n` +
|
||||
` }\n` +
|
||||
`})(function (require, exports) {\n` +
|
||||
`})(["require", "exports", "SomeOtherName"], function (require, exports) {\n` +
|
||||
` "use strict";\n` +
|
||||
` var SomeName_1 = require("SomeOtherName");\n` +
|
||||
` use(SomeName_1.foo);\n` +
|
||||
`});\n`;
|
||||
`});\n`
|
||||
|
||||
test(input,
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user