From 449f4a4f37d58ce0c48dbc4904f0f8e521f78c33 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 6 Feb 2015 17:30:29 -0800 Subject: [PATCH 1/9] Have better error recovery for whne a user uses semicolons instead of commas to delimit an object literal. --- src/compiler/parser.ts | 17 +++++++++++++++-- .../fatarrowfunctionsErrors.errors.txt | 8 +------- .../reference/fatarrowfunctionsErrors.js | 1 - .../incompleteObjectLiteral1.errors.txt | 5 +---- .../objectLiteralWithSemicolons1.errors.txt | 13 +++++++++++++ .../reference/objectLiteralWithSemicolons1.js | 5 +++++ .../objectLiteralWithSemicolons2.errors.txt | 17 +++++++++++++++++ .../reference/objectLiteralWithSemicolons2.js | 13 +++++++++++++ .../objectLiteralWithSemicolons3.errors.txt | 17 +++++++++++++++++ .../reference/objectLiteralWithSemicolons3.js | 13 +++++++++++++ .../objectLiteralWithSemicolons4.errors.txt | 9 +++++++++ .../reference/objectLiteralWithSemicolons4.js | 9 +++++++++ .../objectLiteralWithSemicolons5.errors.txt | 19 +++++++++++++++++++ .../reference/objectLiteralWithSemicolons5.js | 7 +++++++ .../reference/parser512097.errors.txt | 5 +---- tests/baselines/reference/parser512097.js | 2 +- ...serErrorRecovery_ObjectLiteral2.errors.txt | 7 +++++-- ...serErrorRecovery_ObjectLiteral3.errors.txt | 7 +++++-- ...serErrorRecovery_ObjectLiteral4.errors.txt | 7 +++++-- ...serErrorRecovery_ObjectLiteral5.errors.txt | 7 +++++-- .../reference/privateIndexer2.errors.txt | 5 +---- .../compiler/objectLiteralWithSemicolons1.ts | 1 + .../compiler/objectLiteralWithSemicolons2.ts | 5 +++++ .../compiler/objectLiteralWithSemicolons3.ts | 5 +++++ .../compiler/objectLiteralWithSemicolons4.ts | 3 +++ .../compiler/objectLiteralWithSemicolons5.ts | 1 + 26 files changed, 177 insertions(+), 31 deletions(-) create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons1.errors.txt create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons1.js create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons2.errors.txt create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons2.js create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons3.errors.txt create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons3.js create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons4.js create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons5.errors.txt create mode 100644 tests/baselines/reference/objectLiteralWithSemicolons5.js create mode 100644 tests/cases/compiler/objectLiteralWithSemicolons1.ts create mode 100644 tests/cases/compiler/objectLiteralWithSemicolons2.ts create mode 100644 tests/cases/compiler/objectLiteralWithSemicolons3.ts create mode 100644 tests/cases/compiler/objectLiteralWithSemicolons4.ts create mode 100644 tests/cases/compiler/objectLiteralWithSemicolons5.ts diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index cd08e592be8..6942be3cf13 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -1878,7 +1878,7 @@ module ts { } // Parses a comma-delimited list of elements - function parseDelimitedList(kind: ParsingContext, parseElement: () => T): NodeArray { + function parseDelimitedList(kind: ParsingContext, parseElement: () => T, considerSemicolonAsDelimeter?: boolean): NodeArray { var saveParsingContext = parsingContext; parsingContext |= 1 << kind; var result = >[]; @@ -1892,11 +1892,24 @@ module ts { if (parseOptional(SyntaxKind.CommaToken)) { continue; } + commaStart = -1; // Back to the state where the last token was not a comma if (isListTerminator(kind)) { break; } + + // We didn't get a comma, and the list wasn't terminated, explicitly parse + // out a comma so we give a good error message. parseExpected(SyntaxKind.CommaToken); + + // If the token was a semicolon, and the caller allows that, then skip it and + // continue. This ensures we get back on track and don't result in tons of + // parse errors. For example, this can happen when people do things like use + // a semicolon to delimit object literal members. Note: we'll have already + // reported an error when we called parseExpected above. + if (considerSemicolonAsDelimeter && token === SyntaxKind.SemicolonToken && !scanner.hasPrecedingLineBreak()) { + nextToken(); + } continue; } @@ -3598,7 +3611,7 @@ module ts { node.flags |= NodeFlags.MultiLine; } - node.properties = parseDelimitedList(ParsingContext.ObjectLiteralMembers, parseObjectLiteralElement); + node.properties = parseDelimitedList(ParsingContext.ObjectLiteralMembers, parseObjectLiteralElement, /*considerSemicolonAsDelimeter:*/ true); parseExpected(SyntaxKind.CloseBraceToken); return finishNode(node); } diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt b/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt index 35df1a5f397..196041b951a 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt +++ b/tests/baselines/reference/fatarrowfunctionsErrors.errors.txt @@ -3,8 +3,6 @@ tests/cases/compiler/fatarrowfunctionsErrors.ts(2,1): error TS2304: Cannot find tests/cases/compiler/fatarrowfunctionsErrors.ts(2,8): error TS1005: ',' expected. tests/cases/compiler/fatarrowfunctionsErrors.ts(2,18): error TS1005: ':' expected. tests/cases/compiler/fatarrowfunctionsErrors.ts(2,19): error TS1005: ',' expected. -tests/cases/compiler/fatarrowfunctionsErrors.ts(2,20): error TS1128: Declaration or statement expected. -tests/cases/compiler/fatarrowfunctionsErrors.ts(2,21): error TS1128: Declaration or statement expected. tests/cases/compiler/fatarrowfunctionsErrors.ts(3,1): error TS2304: Cannot find name 'foo'. tests/cases/compiler/fatarrowfunctionsErrors.ts(4,1): error TS2304: Cannot find name 'foo'. tests/cases/compiler/fatarrowfunctionsErrors.ts(5,9): error TS2304: Cannot find name 'x'. @@ -18,7 +16,7 @@ tests/cases/compiler/fatarrowfunctionsErrors.ts(11,21): error TS1005: '=>' expec tests/cases/compiler/fatarrowfunctionsErrors.ts(12,23): error TS1005: '=>' expected. -==== tests/cases/compiler/fatarrowfunctionsErrors.ts (18 errors) ==== +==== tests/cases/compiler/fatarrowfunctionsErrors.ts (16 errors) ==== foo((...Far:any[])=>{return 0;}) ~~~ !!! error TS2304: Cannot find name 'foo'. @@ -31,10 +29,6 @@ tests/cases/compiler/fatarrowfunctionsErrors.ts(12,23): error TS1005: '=>' expec !!! error TS1005: ':' expected. ~ !!! error TS1005: ',' expected. - ~ -!!! error TS1128: Declaration or statement expected. - ~ -!!! error TS1128: Declaration or statement expected. foo((x?)=>{return x;}) ~~~ !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index fd47f60b6a0..649a66a9e85 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -21,7 +21,6 @@ foo(function () { return 0; }); foo((1), { return: 0 }); -; foo(function (x) { return x; }); diff --git a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt index 2e363de591e..903f83b3229 100644 --- a/tests/baselines/reference/incompleteObjectLiteral1.errors.txt +++ b/tests/baselines/reference/incompleteObjectLiteral1.errors.txt @@ -1,11 +1,8 @@ tests/cases/compiler/incompleteObjectLiteral1.ts(1,14): error TS1005: ':' expected. -tests/cases/compiler/incompleteObjectLiteral1.ts(1,16): error TS1128: Declaration or statement expected. -==== tests/cases/compiler/incompleteObjectLiteral1.ts (2 errors) ==== +==== tests/cases/compiler/incompleteObjectLiteral1.ts (1 errors) ==== var tt = { aa; } ~ !!! error TS1005: ':' expected. - ~ -!!! error TS1128: Declaration or statement expected. var x = tt; \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithSemicolons1.errors.txt b/tests/baselines/reference/objectLiteralWithSemicolons1.errors.txt new file mode 100644 index 00000000000..077d807af2c --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons1.errors.txt @@ -0,0 +1,13 @@ +tests/cases/compiler/objectLiteralWithSemicolons1.ts(1,12): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralWithSemicolons1.ts(1,15): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralWithSemicolons1.ts(1,17): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/objectLiteralWithSemicolons1.ts (3 errors) ==== + var v = { a; b; c } + ~ +!!! error TS1005: ':' expected. + ~ +!!! error TS1005: ':' expected. + ~ +!!! error TS2304: Cannot find name 'c'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithSemicolons1.js b/tests/baselines/reference/objectLiteralWithSemicolons1.js new file mode 100644 index 00000000000..b820b14428c --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons1.js @@ -0,0 +1,5 @@ +//// [objectLiteralWithSemicolons1.ts] +var v = { a; b; c } + +//// [objectLiteralWithSemicolons1.js] +var v = { a: , b: , c: c }; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons2.errors.txt b/tests/baselines/reference/objectLiteralWithSemicolons2.errors.txt new file mode 100644 index 00000000000..d5594f66fb3 --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons2.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/objectLiteralWithSemicolons2.ts(2,4): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralWithSemicolons2.ts(3,4): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralWithSemicolons2.ts(4,3): error TS2304: Cannot find name 'c'. + + +==== tests/cases/compiler/objectLiteralWithSemicolons2.ts (3 errors) ==== + var v = { + a; + ~ +!!! error TS1005: ':' expected. + b; + ~ +!!! error TS1005: ':' expected. + c + ~ +!!! error TS2304: Cannot find name 'c'. + } \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithSemicolons2.js b/tests/baselines/reference/objectLiteralWithSemicolons2.js new file mode 100644 index 00000000000..2b46267465d --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons2.js @@ -0,0 +1,13 @@ +//// [objectLiteralWithSemicolons2.ts] +var v = { + a; + b; + c +} + +//// [objectLiteralWithSemicolons2.js] +var v = { + a: , + b: , + c: c +}; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons3.errors.txt b/tests/baselines/reference/objectLiteralWithSemicolons3.errors.txt new file mode 100644 index 00000000000..dc638922e7b --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons3.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/objectLiteralWithSemicolons3.ts(2,4): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralWithSemicolons3.ts(3,4): error TS1005: ':' expected. +tests/cases/compiler/objectLiteralWithSemicolons3.ts(4,4): error TS1005: ':' expected. + + +==== tests/cases/compiler/objectLiteralWithSemicolons3.ts (3 errors) ==== + var v = { + a; + ~ +!!! error TS1005: ':' expected. + b; + ~ +!!! error TS1005: ':' expected. + c; + ~ +!!! error TS1005: ':' expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithSemicolons3.js b/tests/baselines/reference/objectLiteralWithSemicolons3.js new file mode 100644 index 00000000000..d9d6d9bc842 --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons3.js @@ -0,0 +1,13 @@ +//// [objectLiteralWithSemicolons3.ts] +var v = { + a; + b; + c; +} + +//// [objectLiteralWithSemicolons3.js] +var v = { + a: , + b: , + c: +}; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt b/tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt new file mode 100644 index 00000000000..9938f1629b8 --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons4.errors.txt @@ -0,0 +1,9 @@ +tests/cases/compiler/objectLiteralWithSemicolons4.ts(3,1): error TS1005: ':' expected. + + +==== tests/cases/compiler/objectLiteralWithSemicolons4.ts (1 errors) ==== + var v = { + a + ; + ~ +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithSemicolons4.js b/tests/baselines/reference/objectLiteralWithSemicolons4.js new file mode 100644 index 00000000000..9e1e3dea4b9 --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons4.js @@ -0,0 +1,9 @@ +//// [objectLiteralWithSemicolons4.ts] +var v = { + a +; + +//// [objectLiteralWithSemicolons4.js] +var v = { + a: +}; diff --git a/tests/baselines/reference/objectLiteralWithSemicolons5.errors.txt b/tests/baselines/reference/objectLiteralWithSemicolons5.errors.txt new file mode 100644 index 00000000000..7373c3d535d --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons5.errors.txt @@ -0,0 +1,19 @@ +tests/cases/compiler/objectLiteralWithSemicolons5.ts(1,20): error TS1005: ',' expected. +tests/cases/compiler/objectLiteralWithSemicolons5.ts(1,25): error TS2304: Cannot find name 'b'. +tests/cases/compiler/objectLiteralWithSemicolons5.ts(1,26): error TS1005: ',' expected. +tests/cases/compiler/objectLiteralWithSemicolons5.ts(1,32): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/compiler/objectLiteralWithSemicolons5.ts(1,41): error TS1005: ',' expected. + + +==== tests/cases/compiler/objectLiteralWithSemicolons5.ts (5 errors) ==== + var v = { foo() { }; a: b; get baz() { }; } + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS2304: Cannot find name 'b'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + ~ +!!! error TS1005: ',' expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithSemicolons5.js b/tests/baselines/reference/objectLiteralWithSemicolons5.js new file mode 100644 index 00000000000..082ca6829a0 --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithSemicolons5.js @@ -0,0 +1,7 @@ +//// [objectLiteralWithSemicolons5.ts] +var v = { foo() { }; a: b; get baz() { }; } + +//// [objectLiteralWithSemicolons5.js] +var v = { foo: function () { +}, a: b, get baz() { +} }; diff --git a/tests/baselines/reference/parser512097.errors.txt b/tests/baselines/reference/parser512097.errors.txt index 3963d969c34..87f8a5af151 100644 --- a/tests/baselines/reference/parser512097.errors.txt +++ b/tests/baselines/reference/parser512097.errors.txt @@ -1,13 +1,10 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts(1,14): error TS1005: ':' expected. -tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts(1,16): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser512097.ts (1 errors) ==== var tt = { aa; } // After this point, no useful parsing occurs in the entire file ~ !!! error TS1005: ':' expected. - ~ -!!! error TS1128: Declaration or statement expected. if (true) { } \ No newline at end of file diff --git a/tests/baselines/reference/parser512097.js b/tests/baselines/reference/parser512097.js index f507b86ccd7..ce73dadf3bc 100644 --- a/tests/baselines/reference/parser512097.js +++ b/tests/baselines/reference/parser512097.js @@ -5,6 +5,6 @@ if (true) { } //// [parser512097.js] -var tt = { aa: }; +var tt = { aa: }; // After this point, no useful parsing occurs in the entire file if (true) { } diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt index 55667d42de5..770fee897d3 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts(2,1): error TS1005: ':' expected. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts(2,7): error TS1005: ':' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts(2,8): error TS1005: '}' expected. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral2.ts (3 errors) ==== var v = { a return; ~~~~~~ !!! error TS1005: ':' expected. ~ -!!! error TS1005: ':' expected. \ No newline at end of file +!!! error TS1005: ':' expected. + +!!! error TS1005: '}' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.errors.txt b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.errors.txt index 30bd3048d21..8f319f6dcd7 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral3.ts(2,1): error TS1109: Expression expected. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral3.ts(2,7): error TS1005: ':' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral3.ts(2,8): error TS1005: '}' expected. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral3.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral3.ts (3 errors) ==== var v = { a: return; ~~~~~~ !!! error TS1109: Expression expected. ~ -!!! error TS1005: ':' expected. \ No newline at end of file +!!! error TS1005: ':' expected. + +!!! error TS1005: '}' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.errors.txt b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.errors.txt index bc8ec098f49..0f8415e9015 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.errors.txt @@ -1,11 +1,14 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral4.ts(2,1): error TS1005: ',' expected. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral4.ts(2,7): error TS1005: ':' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral4.ts(2,8): error TS1005: '}' expected. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral4.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral4.ts (3 errors) ==== var v = { a: 1 return; ~~~~~~ !!! error TS1005: ',' expected. ~ -!!! error TS1005: ':' expected. \ No newline at end of file +!!! error TS1005: ':' expected. + +!!! error TS1005: '}' expected. \ No newline at end of file diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.errors.txt b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.errors.txt index fad6af4cfa9..7f1f15d7c6d 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.errors.txt +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.errors.txt @@ -1,8 +1,11 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral5.ts(2,7): error TS1005: ':' expected. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral5.ts(2,8): error TS1005: '}' expected. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ObjectLiterals/parserErrorRecovery_ObjectLiteral5.ts (2 errors) ==== var v = { a: 1, return; ~ -!!! error TS1005: ':' expected. \ No newline at end of file +!!! error TS1005: ':' expected. + +!!! error TS1005: '}' expected. \ No newline at end of file diff --git a/tests/baselines/reference/privateIndexer2.errors.txt b/tests/baselines/reference/privateIndexer2.errors.txt index 405167d68f8..9f087b22379 100644 --- a/tests/baselines/reference/privateIndexer2.errors.txt +++ b/tests/baselines/reference/privateIndexer2.errors.txt @@ -3,10 +3,9 @@ tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,17) tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,23): error TS1005: ',' expected. tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,24): error TS1136: Property assignment expected. tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,32): error TS1005: ':' expected. -tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(5,1): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts (6 errors) ==== +==== tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts (5 errors) ==== // private indexers not allowed var x = { @@ -22,8 +21,6 @@ tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(5,1): ~ !!! error TS1005: ':' expected. } - ~ -!!! error TS1128: Declaration or statement expected. var y: { private[x: string]: string; diff --git a/tests/cases/compiler/objectLiteralWithSemicolons1.ts b/tests/cases/compiler/objectLiteralWithSemicolons1.ts new file mode 100644 index 00000000000..d9b83bd84c1 --- /dev/null +++ b/tests/cases/compiler/objectLiteralWithSemicolons1.ts @@ -0,0 +1 @@ +var v = { a; b; c } \ No newline at end of file diff --git a/tests/cases/compiler/objectLiteralWithSemicolons2.ts b/tests/cases/compiler/objectLiteralWithSemicolons2.ts new file mode 100644 index 00000000000..83fe8fbe00a --- /dev/null +++ b/tests/cases/compiler/objectLiteralWithSemicolons2.ts @@ -0,0 +1,5 @@ +var v = { + a; + b; + c +} \ No newline at end of file diff --git a/tests/cases/compiler/objectLiteralWithSemicolons3.ts b/tests/cases/compiler/objectLiteralWithSemicolons3.ts new file mode 100644 index 00000000000..96b4c10b5e0 --- /dev/null +++ b/tests/cases/compiler/objectLiteralWithSemicolons3.ts @@ -0,0 +1,5 @@ +var v = { + a; + b; + c; +} \ No newline at end of file diff --git a/tests/cases/compiler/objectLiteralWithSemicolons4.ts b/tests/cases/compiler/objectLiteralWithSemicolons4.ts new file mode 100644 index 00000000000..a216bb84912 --- /dev/null +++ b/tests/cases/compiler/objectLiteralWithSemicolons4.ts @@ -0,0 +1,3 @@ +var v = { + a +; \ No newline at end of file diff --git a/tests/cases/compiler/objectLiteralWithSemicolons5.ts b/tests/cases/compiler/objectLiteralWithSemicolons5.ts new file mode 100644 index 00000000000..894c26d69c9 --- /dev/null +++ b/tests/cases/compiler/objectLiteralWithSemicolons5.ts @@ -0,0 +1 @@ +var v = { foo() { }; a: b; get baz() { }; } \ No newline at end of file From 36b6f4e1b724765ed8e7ec6364f216456189c7ad Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 6 Feb 2015 18:45:09 -0800 Subject: [PATCH 2/9] Preserve single line blocks when emitting. --- src/compiler/emitter.ts | 125 ++- .../reference/ArrowFunctionExpression1.js | 3 +- ...hModuleMemberThatUsesClassTypeParameter.js | 3 +- ...GenericClassStaticFunctionOfTheSameName.js | 3 +- ...GenericClassStaticFunctionOfTheSameName.js | 3 +- .../baselines/reference/ClassDeclaration11.js | 3 +- .../baselines/reference/ClassDeclaration13.js | 3 +- .../baselines/reference/ClassDeclaration21.js | 3 +- .../baselines/reference/ClassDeclaration22.js | 3 +- .../reference/FunctionDeclaration12_es6.js | 3 +- .../reference/FunctionDeclaration4.js | 3 +- .../reference/FunctionDeclaration6.js | 3 +- .../reference/FunctionExpression1_es6.js | 3 +- .../reference/FunctionExpression2_es6.js | 3 +- .../FunctionPropertyAssignments1_es6.js | 3 +- .../FunctionPropertyAssignments2_es6.js | 3 +- .../FunctionPropertyAssignments3_es6.js | 3 +- .../FunctionPropertyAssignments5_es6.js | 3 +- .../FunctionPropertyAssignments6_es6.js | 3 +- .../reference/MemberAccessorDeclaration15.js | 3 +- .../MemberFunctionDeclaration1_es6.js | 3 +- .../MemberFunctionDeclaration2_es6.js | 3 +- .../MemberFunctionDeclaration3_es6.js | 3 +- .../MemberFunctionDeclaration4_es6.js | 3 +- .../MemberFunctionDeclaration7_es6.js | 3 +- tests/baselines/reference/Protected4.js | 3 +- tests/baselines/reference/Protected5.js | 3 +- tests/baselines/reference/Protected6.js | 3 +- tests/baselines/reference/Protected7.js | 3 +- .../reference/accessibilityModifiers.js | 42 +- .../accessorParameterAccessibilityModifier.js | 6 +- tests/baselines/reference/accessorWithES3.js | 3 +- tests/baselines/reference/accessorWithES5.js | 3 +- .../reference/accessorWithInitializer.js | 8 +- .../reference/accessorWithRestParam.js | 14 +- .../accessors_spec_section-4.5_error-cases.js | 6 +- .../accessors_spec_section-4.5_inference.js | 18 +- .../additionOperatorWithAnyAndEveryType.js | 6 +- .../additionOperatorWithInvalidOperands.js | 6 +- ...OperatorWithNullValueAndInvalidOperator.js | 3 +- .../additionOperatorWithTypeParameter.js | 3 +- ...torWithUndefinedValueAndInvalidOperands.js | 3 +- .../anyAssignabilityInInheritance.js | 3 +- .../reference/anyAssignableToEveryType2.js | 3 +- tests/baselines/reference/anyDeclare.js | 3 +- .../reference/anyIdenticalToItself.js | 3 +- .../reference/arrayLiteralContextualType.js | 6 +- .../arrayLiteralInNonVarArgParameter.js | 7 +- .../reference/arrayOfFunctionTypes3.js | 3 +- .../arrayReferenceWithoutTypeArgs.js | 3 +- .../reference/arrowFunctionExpressions.js | 3 +- .../reference/arrowFunctionsMissingTokens.js | 30 +- .../assignLambdaToNominalSubtypeOfFunction.js | 3 +- .../reference/assignmentCompatBug3.js | 3 +- .../reference/assignmentCompatBug5.js | 12 +- ...CompatInterfaceWithStringIndexSignature.js | 6 +- .../reference/assignmentCompatOnNew.js | 3 +- ...-apply-member-off-of-function-interface.js | 9 +- ...g-call-member-off-of-function-interface.js | 9 +- .../reference/assignmentLHSIsValue.js | 9 +- .../assignmentStricterConstraints.js | 3 +- .../reference/assignmentToFunction.js | 3 +- .../assignmentToObjectAndFunction.js | 12 +- .../assignmentToParenthesizedIdentifiers.js | 3 +- .../reference/assignmentToReferenceTypes.js | 3 +- tests/baselines/reference/assignments.js | 3 +- ...entedTypeAssignmentCompatIndexSignature.js | 3 +- ...ugmentedTypeBracketAccessIndexSignature.js | 3 +- ...augmentedTypeBracketNamedPropertyAccess.js | 3 +- .../reference/augmentedTypesClass.js | 6 +- .../reference/augmentedTypesClass2a.js | 9 +- .../reference/augmentedTypesClass3.js | 12 +- .../reference/augmentedTypesClass4.js | 6 +- .../baselines/reference/augmentedTypesEnum.js | 9 +- .../augmentedTypesExternalModule1.js | 3 +- .../reference/augmentedTypesFunction.js | 39 +- .../reference/augmentedTypesModules.js | 39 +- .../reference/augmentedTypesModules2.js | 24 +- .../reference/augmentedTypesModules3.js | 3 +- .../reference/augmentedTypesModules3b.js | 9 +- .../reference/augmentedTypesModules4.js | 3 +- .../baselines/reference/augmentedTypesVar.js | 9 +- tests/baselines/reference/autolift3.js | 3 +- .../reference/baseTypeAfterDerivedType.js | 7 +- .../bestCommonTypeOfConditionalExpressions.js | 12 +- .../bitwiseNotOperatorWithAnyOtherType.js | 3 +- tests/baselines/reference/callOverloads1.js | 3 +- tests/baselines/reference/callOverloads2.js | 3 +- tests/baselines/reference/callOverloads3.js | 3 +- tests/baselines/reference/callOverloads4.js | 3 +- tests/baselines/reference/callOverloads5.js | 3 +- ...tureWithOptionalParameterAndInitializer.js | 28 +- .../callSignatureWithoutAnnotationsOrBody.js | 3 +- ...sWithAccessibilityModifiersOnParameters.js | 48 +- .../callSignaturesWithDuplicateParameters.js | 48 +- .../callSignaturesWithOptionalParameters.js | 21 +- .../callSignaturesWithOptionalParameters2.js | 12 +- ...callSignaturesWithParameterInitializers.js | 28 +- ...allSignaturesWithParameterInitializers2.js | 16 +- .../callWithWrongNumberOfTypeArguments.js | 3 +- .../reference/captureThisInSuperCall.js | 3 +- .../reference/castExpressionParentheses.js | 6 +- tests/baselines/reference/catch.js | 12 +- .../baselines/reference/chainedImportAlias.js | 3 +- .../reference/classBodyWithStatements.js | 3 +- .../reference/classExtendingClass.js | 12 +- .../reference/classExtendingPrimitive.js | 3 +- .../reference/classExtendingPrimitive2.js | 3 +- .../reference/classExtendsEveryObjectType.js | 9 +- .../reference/classExtendsEveryObjectType2.js | 6 +- .../classExtendsValidConstructorFunction.js | 3 +- .../classImplementsImportedInterface.js | 3 +- .../reference/classMethodWithKeywordName1.js | 3 +- tests/baselines/reference/classOrder2.js | 3 +- .../reference/classOverloadForFunction.js | 3 +- .../reference/classPropertyAsPrivate.js | 12 +- .../reference/classPropertyAsProtected.js | 12 +- .../classPropertyIsPublicByDefault.js | 12 +- .../baselines/reference/classWithEmptyBody.js | 6 +- .../reference/classWithMultipleBaseClasses.js | 12 +- ...hOnlyPublicMembersEquivalentToInterface.js | 3 +- ...OnlyPublicMembersEquivalentToInterface2.js | 3 +- .../reference/classWithOptionalParameter.js | 6 +- ...ssWithOverloadImplementationOfWrongName.js | 3 +- ...sWithOverloadImplementationOfWrongName2.js | 3 +- .../reference/classWithStaticMembers.js | 3 +- tests/baselines/reference/classdecl.js | 3 +- .../cloduleAcrossModuleDefinitions.js | 6 +- tests/baselines/reference/cloduleTest1.js | 3 +- .../reference/cloduleWithDuplicateMember1.js | 9 +- .../reference/cloduleWithDuplicateMember2.js | 9 +- ...lisionCodeGenModuleWithFunctionChildren.js | 4 +- ...ollisionCodeGenModuleWithMethodChildren.js | 4 +- .../reference/commentEmitAtEndOfFile1.js | 3 +- .../reference/commentInMethodCall.js | 3 +- .../reference/commentOnClassAccessor2.js | 3 +- .../reference/commentsOnObjectLiteral3.js | 3 +- .../reference/compoundAssignmentLHSIsValue.js | 18 +- .../reference/computedPropertyNames1.js | 3 +- .../reference/computedPropertyNames10.js | 33 +- .../reference/computedPropertyNames11.js | 15 +- .../reference/computedPropertyNames13.js | 33 +- .../reference/computedPropertyNames14.js | 18 +- .../reference/computedPropertyNames15.js | 9 +- .../reference/computedPropertyNames16.js | 15 +- .../reference/computedPropertyNames17.js | 9 +- .../reference/computedPropertyNames2.js | 18 +- .../reference/computedPropertyNames21.js | 3 +- .../reference/computedPropertyNames22.js | 3 +- .../reference/computedPropertyNames23.js | 3 +- .../reference/computedPropertyNames24.js | 3 +- .../reference/computedPropertyNames25.js | 3 +- .../reference/computedPropertyNames26.js | 3 +- .../reference/computedPropertyNames27.js | 3 +- .../reference/computedPropertyNames28.js | 3 +- .../reference/computedPropertyNames29.js | 3 +- .../reference/computedPropertyNames3.js | 19 +- .../reference/computedPropertyNames30.js | 3 +- .../reference/computedPropertyNames31.js | 3 +- .../reference/computedPropertyNames32.js | 3 +- .../reference/computedPropertyNames33.js | 3 +- .../reference/computedPropertyNames34.js | 3 +- .../reference/computedPropertyNames36.js | 3 +- .../reference/computedPropertyNames37.js | 3 +- .../reference/computedPropertyNames38.js | 3 +- .../reference/computedPropertyNames39.js | 3 +- .../reference/computedPropertyNames43.js | 3 +- .../reference/computedPropertyNames44.js | 3 +- .../reference/computedPropertyNames45.js | 3 +- .../reference/computedPropertyNames9.js | 3 +- .../computedPropertyNamesContextualType6.js | 3 +- .../computedPropertyNamesContextualType7.js | 3 +- .../computedPropertyNamesDeclarationEmit1.js | 6 +- .../computedPropertyNamesDeclarationEmit2.js | 6 +- .../computedPropertyNamesDeclarationEmit5.js | 6 +- .../computedPropertyNamesOnOverloads.js | 3 +- ...onditionalOperatorConditionIsObjectType.js | 3 +- ...cateOverloadsCausedByOverloadResolution.js | 3 +- .../reference/conflictMarkerTrivia2.js | 3 +- .../reference/conflictingTypeAnnotatedVar.js | 6 +- .../reference/constDeclarations-access2.js | 6 +- .../reference/constDeclarations-access3.js | 6 +- .../reference/constDeclarations-access4.js | 6 +- .../reference/constDeclarations-access5.js | 6 +- .../reference/constDeclarations-errors.js | 12 +- .../reference/constantOverloadFunction.js | 12 +- .../constantOverloadFunctionNoSubtypeError.js | 12 +- ...nstraintCheckInGenericBaseTypeReference.js | 3 +- .../baselines/reference/constraintErrors1.js | 3 +- .../constraintSatisfactionWithEmptyObject.js | 6 +- .../constructorArgWithGenericCallSignature.js | 3 +- .../reference/constructorOverloads1.js | 6 +- .../reference/constructorOverloads2.js | 6 +- .../reference/constructorOverloads3.js | 3 +- .../constructorReturnsInvalidType.js | 3 +- ...constructorWithIncompleteTypeAnnotation.js | 18 +- .../contextualTypeAppliedToVarArgs.js | 3 +- tests/baselines/reference/contextualTyping.js | 3 +- .../reference/contextualTyping.js.map | 2 +- .../reference/contextualTyping.sourcemap.txt | 882 +++++++++--------- .../baselines/reference/contextualTyping25.js | 3 +- .../baselines/reference/contextualTyping26.js | 3 +- .../baselines/reference/contextualTyping27.js | 3 +- .../baselines/reference/contextualTyping28.js | 3 +- .../baselines/reference/contextualTyping29.js | 3 +- .../baselines/reference/contextualTyping30.js | 3 +- .../baselines/reference/contextualTyping31.js | 3 +- .../baselines/reference/contextualTyping32.js | 3 +- .../baselines/reference/contextualTyping33.js | 3 +- .../contextualTypingArrayOfLambdas.js | 5 +- .../reference/contextualTypingOfAccessors.js | 3 +- ...ontextualTypingOfConditionalExpression2.js | 3 +- ...ontextualTypingOfLambdaReturnExpression.js | 3 +- ...ualTypingOfLambdaWithMultipleSignatures.js | 3 +- .../contextualTypingOfObjectLiterals.js | 3 +- .../contextualTypingOfObjectLiterals2.js | 3 +- .../baselines/reference/convertKeywordsYes.js | 3 +- tests/baselines/reference/covariance1.js | 3 +- .../declFileAliasUseBeforeDeclaration.js | 3 +- ...declFileForClassWithMultipleBaseClasses.js | 18 +- ...leForClassWithPrivateOverloadedFunction.js | 3 +- .../reference/declFileGenericType.js | 3 +- .../reference/declFilePrivateStatic.js | 12 +- .../reference/declFileRegressionTests.js | 3 +- ...RestParametersOfFunctionAndFunctionType.js | 19 +- tests/baselines/reference/declInput-2.js | 6 +- tests/baselines/reference/declInput4.js | 3 +- .../declarationEmit_nameConflicts.js | 18 +- .../declarationEmit_nameConflicts2.js | 3 +- .../declarationEmit_nameConflicts3.js | 12 +- .../declarationEmit_protectedMembers.js | 6 +- ...eratorWithAnyOtherTypeInvalidOperations.js | 3 +- .../defaultArgsInFunctionExpressions.js | 16 +- .../reference/defaultArgsInOverloads.js | 12 +- .../defaultValueInFunctionOverload1.js | 4 +- .../deleteOperatorWithAnyOtherType.js | 3 +- .../derivedClassIncludesInheritedMembers.js | 12 +- .../derivedClassOverridesProtectedMembers.js | 24 +- .../derivedClassOverridesProtectedMembers2.js | 24 +- .../derivedClassOverridesProtectedMembers3.js | 24 +- .../derivedClassOverridesPublicMembers.js | 24 +- .../reference/derivedClassTransitivity.js | 9 +- .../reference/derivedClassTransitivity2.js | 9 +- .../reference/derivedClassTransitivity3.js | 9 +- .../reference/derivedClassTransitivity4.js | 9 +- ...ivateInstanceShadowingProtectedInstance.js | 6 +- ...hPrivateInstanceShadowingPublicInstance.js | 6 +- ...thPrivateStaticShadowingProtectedStatic.js | 6 +- ...sWithPrivateStaticShadowingPublicStatic.js | 6 +- .../reference/doWhileBreakStatements.js | 3 +- .../reference/doWhileContinueStatements.js | 3 +- tests/baselines/reference/doWhileLoop.js | 3 +- .../reference/dottedSymbolResolution1.js | 3 +- .../duplicateIdentifierInCatchBlock.js | 21 +- ...ateIdentifiersAcrossContainerBoundaries.js | 9 +- .../duplicateObjectLiteralProperty.js | 3 +- .../reference/duplicatePropertyNames.js | 18 +- .../duplicateSymbolsExportMatching.js | 3 +- .../reference/duplicateTypeParameters1.js | 3 +- .../reference/duplicateTypeParameters2.js | 6 +- tests/baselines/reference/elaboratedErrors.js | 3 +- .../baselines/reference/emitArrowFunction.js | 20 +- .../reference/emitArrowFunctionAsIs.js | 9 +- .../reference/emitArrowFunctionAsIsES6.js | 9 +- .../reference/emitArrowFunctionES6.js | 15 +- .../emitArrowFunctionThisCapturing.js | 3 +- .../emitArrowFunctionThisCapturingES6.js | 3 +- .../emitArrowFunctionWhenUsingArguments.js | 3 +- .../emitArrowFunctionWhenUsingArgumentsES6.js | 3 +- .../reference/emitArrowFunctionsAsIs.js | 9 +- .../reference/emitArrowFunctionsAsIsES6.js | 9 +- .../emitDefaultParametersFunction.js | 24 +- .../emitDefaultParametersFunctionES6.js | 12 +- ...emitDefaultParametersFunctionExpression.js | 49 +- ...tDefaultParametersFunctionExpressionES6.js | 21 +- .../emitDefaultParametersFunctionProperty.js | 24 +- ...mitDefaultParametersFunctionPropertyES6.js | 12 +- .../reference/emitDefaultParametersMethod.js | 24 +- .../emitDefaultParametersMethodES6.js | 12 +- .../reference/emitRestParametersFunction.js | 14 +- .../emitRestParametersFunctionES6.js | 6 +- .../emitRestParametersFunctionExpression.js | 28 +- ...emitRestParametersFunctionExpressionES6.js | 12 +- .../emitRestParametersFunctionProperty.js | 7 +- .../emitRestParametersFunctionPropertyES6.js | 3 +- .../reference/emitRestParametersMethod.js | 28 +- .../reference/emitRestParametersMethodES6.js | 12 +- .../reference/emptyTypeArgumentList.js | 3 +- .../enumAssignabilityInInheritance.js | 3 +- .../enumIsNotASubtypeOfAnythingButNumber.js | 3 +- .../errorOnContextuallyTypedReturnType.js | 6 +- .../reference/errorSuperPropertyAccess.js | 12 +- .../reference/errorsInGenericTypeReference.js | 12 +- tests/baselines/reference/es6ClassTest2.js | 13 +- tests/baselines/reference/es6ClassTest3.js | 6 +- tests/baselines/reference/es6ClassTest9.js | 3 +- .../baselines/reference/exportAlreadySeen.js | 3 +- .../exportAssignmentMergedInterface.js | 3 +- tests/baselines/reference/exportCodeGen.js | 6 +- .../extendAndImplementTheSameBaseType.js | 6 +- .../extendAndImplementTheSameBaseType2.js | 3 +- tests/baselines/reference/extendArray.js | 3 +- .../reference/extendNonClassSymbol1.js | 3 +- .../reference/extendsClauseAlreadySeen.js | 3 +- .../reference/extendsClauseAlreadySeen2.js | 3 +- tests/baselines/reference/externModule.js | 3 +- ...ceOfImportDeclarationWithExportModifier.js | 3 +- ...ernceResolutionOrderInImportDeclaration.js | 3 +- .../reference/fatarrowfunctionsErrors.js | 16 +- .../fatarrowfunctionsOptionalArgs.js | 7 +- ...eParameterInSignatureWithRestParameters.js | 3 +- tests/baselines/reference/for-inStatements.js | 99 +- .../reference/for-inStatementsInvalid.js | 78 +- .../baselines/reference/forBreakStatements.js | 3 +- .../reference/forContinueStatements.js | 3 +- .../reference/forInBreakStatements.js | 3 +- .../reference/forInContinueStatements.js | 3 +- tests/baselines/reference/forStatements.js | 54 +- .../forStatementsMultipleInvalidDecl.js | 54 +- .../forStatementsMultipleValidDecl.js | 69 +- tests/baselines/reference/funClodule.js | 6 +- tests/baselines/reference/funcdecl.js | 3 +- .../functionAndInterfaceWithSeparateErrors.js | 3 +- .../functionAndPropertyNameConflict.js | 3 +- .../reference/functionArgShadowing.js | 6 +- .../baselines/reference/functionAssignment.js | 18 +- tests/baselines/reference/functionCall10.js | 7 +- tests/baselines/reference/functionCall11.js | 3 +- tests/baselines/reference/functionCall12.js | 3 +- tests/baselines/reference/functionCall13.js | 7 +- tests/baselines/reference/functionCall14.js | 7 +- tests/baselines/reference/functionCall15.js | 7 +- tests/baselines/reference/functionCall16.js | 7 +- tests/baselines/reference/functionCall17.js | 7 +- tests/baselines/reference/functionCall6.js | 3 +- tests/baselines/reference/functionCall8.js | 3 +- tests/baselines/reference/functionCall9.js | 3 +- .../functionConstraintSatisfaction2.js | 6 +- ...ctionExpressionAndLambdaMatchesFunction.js | 3 +- .../reference/functionImplementations.js | 3 +- .../reference/functionNameConflicts.js | 15 +- .../reference/functionOverloadAmbiguity1.js | 6 +- .../reference/functionOverloadErrors.js | 48 +- .../reference/functionOverloadErrorsSyntax.js | 9 +- ...nctionOverloadImplementationOfWrongName.js | 3 +- ...ctionOverloadImplementationOfWrongName2.js | 3 +- .../reference/functionOverloads10.js | 3 +- .../reference/functionOverloads24.js | 3 +- .../baselines/reference/functionOverloads5.js | 3 +- .../baselines/reference/functionOverloads6.js | 3 +- tests/baselines/reference/functionReturn.js | 6 +- tests/baselines/reference/functionType.js | 3 +- ...nWithAnyReturnTypeAndNoReturnExpression.js | 9 +- .../functionWithMultipleReturnStatements2.js | 12 +- .../functionsWithModifiersInBlocks1.js | 3 +- .../reference/funduleSplitAcrossFiles.js | 3 +- .../reference/generatedContextualTyping.js | 133 +-- .../generativeRecursionWithTypeOf.js | 3 +- ...icAssignmentCompatOfFunctionSignatures1.js | 6 +- .../genericCallWithFixedArguments.js | 9 +- .../genericCallWithNonGenericArgs1.js | 3 +- ...icCallWithObjectTypeArgsAndConstraints4.js | 7 +- ...icCallWithObjectTypeArgsAndConstraints5.js | 3 +- ...icCallWithObjectTypeArgsAndInitializers.js | 20 +- .../genericCallbacksAndClassHierarchy.js | 6 +- .../reference/genericCallsWithoutParens.js | 3 +- ...cClassPropertyInheritanceSpecialization.js | 3 +- ...nericClassWithStaticsUsingTypeArguments.js | 3 +- .../reference/genericCloduleInModule.js | 6 +- .../reference/genericCloduleInModule2.js | 6 +- .../genericFunctionHasFreshTypeArgs.js | 3 +- .../genericFunctionSpecializations1.js | 6 +- ...genericFunctionsWithOptionalParameters3.js | 3 +- .../reference/genericOfACloduleType1.js | 3 +- .../reference/genericOfACloduleType2.js | 3 +- .../reference/genericOverloadSignatures.js | 3 +- .../reference/genericTypeAssertions1.js | 3 +- .../reference/genericTypeAssertions2.js | 3 +- ...genericTypeReferenceWithoutTypeArgument.js | 6 +- ...enericTypeReferenceWithoutTypeArgument2.js | 6 +- .../genericTypeWithNonGenericBaseMisMatch.js | 3 +- .../genericWithIndexerOfTypeParameterType2.js | 3 +- .../genericsWithDuplicateTypeParameters1.js | 9 +- .../genericsWithoutTypeParameters1.js | 6 +- .../reference/getAndSetAsMemberNames.js | 3 +- .../reference/getAndSetNotIdenticalType.js | 3 +- .../reference/getterSetterNonAccessor.js | 3 +- .../baselines/reference/gettersAndSetters.js | 6 +- .../gettersAndSettersAccessibility.js | 3 +- .../reference/gettersAndSettersErrors.js | 9 +- .../reference/gettersAndSettersTypesAgree.js | 12 +- tests/baselines/reference/giant.js | 204 ++-- .../reference/grammarAmbiguities1.js | 6 +- .../heterogeneousArrayAndOverloads.js | 3 +- .../reference/ifDoWhileStatements.js | 243 ++--- .../reference/implementsClauseAlreadySeen.js | 3 +- ...AnyDeclareFunctionExprWithoutFormalType.js | 9 +- ...icitAnyDeclareFunctionWithoutFormalType.js | 29 +- .../implicitAnyDeclareMemberWithoutType2.js | 3 +- ...itAnyDeclareVariablesWithoutTypeAndInit.js | 3 +- ...tAnyFunctionInvocationWithAnyArguements.js | 18 +- .../baselines/reference/implicitAnyInCatch.js | 9 +- .../reference/implicitAnyWidenToAny.js | 3 +- ...sAnExternalModuleInsideAnInternalModule.js | 3 +- tests/baselines/reference/inOperator.js | 9 +- .../baselines/reference/incompatibleTypes.js | 3 +- ...eratorWithAnyOtherTypeInvalidOperations.js | 3 +- .../reference/inferSecondaryParameter.js | 3 +- ...eArgumentsInSignatureWithRestParameters.js | 24 +- .../inferenceFromParameterlessLambda.js | 3 +- tests/baselines/reference/inheritance1.js | 12 +- ...itanceGrandParentPrivateMemberCollision.js | 6 +- ...tPrivateMemberCollisionWithPublicMember.js | 6 +- ...tPublicMemberCollisionWithPrivateMember.js | 6 +- ...nheritedFunctionAssignmentCompatibility.js | 3 +- .../reference/innerBoundLambdaEmit.js | 3 +- .../instanceMemberAssignsToClassPrototype.js | 6 +- ...nstancePropertiesInheritedIntoClassType.js | 6 +- .../reference/instancePropertyInClassType.js | 6 +- .../instanceofOperatorWithInvalidOperands.js | 3 +- ...tantiateNonGenericTypeWithTypeArguments.js | 3 +- tests/baselines/reference/intTypeCheck.js | 24 +- .../reference/interfaceDeclaration2.js | 3 +- .../reference/interfaceDeclaration4.js | 3 +- .../reference/interfaceExtendingClass.js | 3 +- .../reference/interfaceExtendingClass2.js | 3 +- .../reference/interfaceExtendsClass1.js | 9 +- .../interfaceExtendsClassWithPrivate1.js | 3 +- .../interfaceExtendsClassWithPrivate2.js | 6 +- .../reference/interfaceImplementation1.js | 3 +- .../reference/interfaceImplementation3.js | 3 +- .../reference/interfaceImplementation4.js | 3 +- .../reference/interfaceImplementation5.js | 12 +- tests/baselines/reference/interfaceNaming1.js | 3 +- .../interfaceWithPropertyOfEveryType.js | 3 +- ...aceWithPropertyThatIsPrivateInBaseType2.js | 6 +- .../invalidDoWhileBreakStatements.js | 3 +- .../invalidDoWhileContinueStatements.js | 3 +- .../reference/invalidForBreakStatements.js | 3 +- .../reference/invalidForContinueStatements.js | 3 +- .../reference/invalidForInBreakStatements.js | 3 +- .../invalidForInContinueStatements.js | 3 +- .../invalidModuleWithVarStatements.js | 9 +- .../reference/invalidReturnStatements.js | 18 +- .../reference/invalidTryStatements.js | 18 +- .../reference/invalidTryStatements2.js | 12 +- .../reference/invalidTypeOfTarget.js | 3 +- .../reference/invalidUndefinedAssignments.js | 3 +- .../reference/invalidUndefinedValues.js | 3 +- .../reference/invalidVoidAssignments.js | 3 +- .../baselines/reference/invalidVoidValues.js | 3 +- .../reference/invalidWhileBreakStatements.js | 3 +- .../invalidWhileContinueStatements.js | 3 +- tests/baselines/reference/ipromise4.js | 3 +- .../reference/lastPropertyInLiteralWins.js | 12 +- .../reference/letDeclarations-access.js | 6 +- .../reference/letDeclarations-es5.js | 6 +- tests/baselines/reference/letDeclarations.js | 6 +- .../baselines/reference/literals-negative.js | 6 +- .../reference/localImportNameVsGlobalName.js | 3 +- .../logicalNotOperatorWithAnyOtherType.js | 3 +- .../matchingOfObjectLiteralConstraints.js | 3 +- .../memberFunctionsWithPrivateOverloads.js | 24 +- .../memberFunctionsWithPublicOverloads.js | 24 +- ...mberFunctionsWithPublicPrivateOverloads.js | 36 +- .../reference/mergedDeclarations4.js | 3 +- .../mergedModuleDeclarationCodeGen2.js | 3 +- .../mergedModuleDeclarationCodeGen3.js | 3 +- .../mergedModuleDeclarationCodeGen4.js | 3 +- .../mergedModuleDeclarationCodeGen5.js | 12 +- .../methodContainingLocalFunction.js | 18 +- tests/baselines/reference/missingSelf.js | 6 +- .../reference/missingTypeArguments2.js | 3 +- .../mixingFunctionAndAmbientModule1.js | 6 +- .../mixingStaticAndInstanceOverloads.js | 18 +- .../baselines/reference/moduleCodeGenTest5.js | 12 +- .../reference/moduleInTypePosition1.js | 3 +- .../reference/moduleKeywordRepeatError.js | 3 +- .../moduleMemberWithoutTypeAnnotation1.js | 3 +- .../baselines/reference/moduleNewExportBug.js | 3 +- .../baselines/reference/multiCallOverloads.js | 15 +- .../reference/multiModuleClodule1.js | 12 +- .../reference/multiModuleFundule1.js | 6 +- tests/baselines/reference/nameCollisions.js | 15 +- .../negateOperatorWithAnyOtherType.js | 3 +- .../reference/nestedClassDeclaration.js | 3 +- .../reference/newExpressionWithCast.js | 9 +- .../reference/newFunctionImplicitAny.js | 3 +- .../reference/newOperatorConformance.js | 3 +- .../noImplicitAnyForMethodParameters.js | 6 +- .../noImplicitAnyParametersInBareFunctions.js | 32 +- .../noImplicitAnyParametersInClass.js | 64 +- .../noImplicitAnyParametersInModule.js | 32 +- .../reference/noImplicitAnyWithOverloads.js | 3 +- tests/baselines/reference/noSelfOnVars.js | 3 +- .../nullIsSubtypeOfEverythingButUndefined.js | 9 +- ...icIndexerConstrainsPropertyDeclarations.js | 12 +- .../reference/numericIndexerConstraint1.js | 3 +- .../reference/numericIndexerConstraint2.js | 3 +- .../reference/objectLiteralErrors.js | 9 +- .../reference/objectLiteralErrorsES3.js | 6 +- ...bjectLiteralFunctionArgContextualTyping.js | 3 +- ...jectLiteralFunctionArgContextualTyping2.js | 3 +- .../objectLiteralGettersAndSetters.js | 24 +- .../objectLiteralMemberWithModifiers1.js | 3 +- .../objectLiteralMemberWithModifiers2.js | 3 +- .../objectLiteralMemberWithQuestionMark1.js | 3 +- .../objectLiteralShorthandProperties.js | 3 +- ...ectLiteralShorthandPropertiesAssignment.js | 3 +- ...LiteralShorthandPropertiesAssignmentES6.js | 3 +- ...teralShorthandPropertiesAssignmentError.js | 3 +- .../objectLiteralShorthandPropertiesES6.js | 3 +- ...ndPropertiesErrorFromNotUsingIdentifier.js | 6 +- ...eralShorthandPropertiesFunctionArgument.js | 3 +- ...ralShorthandPropertiesFunctionArgument2.js | 3 +- ...objectTypeHidingMembersOfExtendedObject.js | 6 +- .../objectTypeHidingMembersOfObject.js | 6 +- ...peHidingMembersOfObjectAssignmentCompat.js | 6 +- ...eHidingMembersOfObjectAssignmentCompat2.js | 3 +- .../reference/objectTypesIdentity.js | 51 +- .../reference/objectTypesIdentity2.js | 33 +- .../objectTypesIdentityWithCallSignatures.js | 57 +- .../objectTypesIdentityWithCallSignatures2.js | 57 +- .../objectTypesIdentityWithCallSignatures3.js | 21 +- ...yWithCallSignaturesDifferingParamCounts.js | 57 +- ...WithCallSignaturesDifferingParamCounts2.js | 24 +- ...IdentityWithCallSignaturesWithOverloads.js | 57 +- ...jectTypesIdentityWithComplexConstraints.js | 3 +- ...ectTypesIdentityWithConstructSignatures.js | 48 +- ...ctTypesIdentityWithConstructSignatures2.js | 42 +- ...ConstructSignaturesDifferingParamCounts.js | 42 +- ...tTypesIdentityWithGenericCallSignatures.js | 57 +- ...TypesIdentityWithGenericCallSignatures2.js | 57 +- ...ricCallSignaturesDifferingByConstraints.js | 57 +- ...icCallSignaturesDifferingByConstraints2.js | 63 +- ...icCallSignaturesDifferingByConstraints3.js | 63 +- ...ericCallSignaturesDifferingByReturnType.js | 57 +- ...ricCallSignaturesDifferingByReturnType2.js | 57 +- ...lSignaturesDifferingTypeParameterCounts.js | 57 +- ...SignaturesDifferingTypeParameterCounts2.js | 21 +- ...llSignaturesDifferingTypeParameterNames.js | 57 +- ...WithGenericCallSignaturesOptionalParams.js | 57 +- ...ithGenericCallSignaturesOptionalParams2.js | 57 +- ...ithGenericCallSignaturesOptionalParams3.js | 57 +- ...nstructSignaturesDifferingByConstraints.js | 39 +- ...structSignaturesDifferingByConstraints2.js | 45 +- ...structSignaturesDifferingByConstraints3.js | 45 +- ...onstructSignaturesDifferingByReturnType.js | 45 +- ...nstructSignaturesDifferingByReturnType2.js | 42 +- ...tSignaturesDifferingTypeParameterCounts.js | 39 +- ...ctSignaturesDifferingTypeParameterNames.js | 39 +- ...enericConstructSignaturesOptionalParams.js | 39 +- ...nericConstructSignaturesOptionalParams2.js | 39 +- ...nericConstructSignaturesOptionalParams3.js | 39 +- ...objectTypesIdentityWithNumericIndexers1.js | 69 +- ...objectTypesIdentityWithNumericIndexers2.js | 69 +- ...objectTypesIdentityWithNumericIndexers3.js | 69 +- .../objectTypesIdentityWithOptionality.js | 27 +- .../objectTypesIdentityWithPrivates.js | 69 +- .../objectTypesIdentityWithPrivates2.js | 18 +- .../objectTypesIdentityWithPublics.js | 51 +- .../objectTypesIdentityWithStringIndexers.js | 69 +- .../objectTypesIdentityWithStringIndexers2.js | 69 +- .../objectTypesWithOptionalProperties2.js | 3 +- .../optionalArgsWithDefaultValues.js | 15 +- .../optionalConstructorArgInSuper.js | 3 +- .../reference/optionalParamArgsTest.js | 8 +- .../reference/optionalParamInOverride.js | 6 +- .../reference/optionalPropertiesTest.js | 9 +- .../reference/optionalSetterParam.js | 3 +- .../reference/overloadModifiersMustAgree.js | 6 +- .../overloadOnConstConstraintChecks1.js | 12 +- .../overloadOnConstConstraintChecks2.js | 3 +- .../overloadOnConstConstraintChecks3.js | 3 +- .../overloadOnConstConstraintChecks4.js | 3 +- ...tInObjectLiteralImplementingAnInterface.js | 3 +- ...verloadOnConstNoNonSpecializedSignature.js | 3 +- .../overloadOnConstantsInvalidOverload1.js | 12 +- .../baselines/reference/overloadResolution.js | 3 +- .../overloadResolutionOverCTLambda.js | 3 +- ...CallbacksWithDifferingOptionalityOnArgs.js | 3 +- .../reference/overloadingOnConstants1.js | 12 +- .../overloadingStaticFunctionsInFunctions.js | 3 +- ...sInDifferentContainersDisagreeOnAmbient.js | 3 +- .../reference/overloadsWithinClasses.js | 9 +- ...parameterInitializersForwardReferencing.js | 17 +- tests/baselines/reference/parser509669.js | 3 +- tests/baselines/reference/parser521128.js | 3 +- tests/baselines/reference/parser553699.js | 3 +- .../parserAccessibilityAfterStatic10.js | 3 +- .../parserAccessibilityAfterStatic11.js | 3 +- .../parserAccessibilityAfterStatic14.js | 3 +- .../parserAccessibilityAfterStatic7.js | 3 +- tests/baselines/reference/parserAccessors1.js | 3 +- .../baselines/reference/parserAccessors10.js | 3 +- tests/baselines/reference/parserAccessors2.js | 3 +- tests/baselines/reference/parserAccessors3.js | 3 +- tests/baselines/reference/parserAccessors4.js | 3 +- tests/baselines/reference/parserAccessors7.js | 3 +- tests/baselines/reference/parserAccessors8.js | 3 +- tests/baselines/reference/parserAccessors9.js | 3 +- .../parserAmbiguityWithBinaryOperator1.js | 3 +- .../parserAmbiguityWithBinaryOperator2.js | 3 +- .../parserAmbiguityWithBinaryOperator3.js | 3 +- .../parserAmbiguityWithBinaryOperator4.js | 3 +- .../parserArrowFunctionExpression1.js | 3 +- .../parserArrowFunctionExpression2.js | 3 +- .../parserArrowFunctionExpression3.js | 3 +- .../parserArrowFunctionExpression4.js | 3 +- .../reference/parserClassDeclaration11.js | 3 +- .../reference/parserClassDeclaration13.js | 3 +- .../reference/parserClassDeclaration16.js | 3 +- .../reference/parserClassDeclaration19.js | 3 +- .../reference/parserClassDeclaration20.js | 3 +- .../reference/parserClassDeclaration21.js | 3 +- .../reference/parserClassDeclaration22.js | 3 +- .../reference/parserComputedPropertyName12.js | 3 +- .../reference/parserComputedPropertyName17.js | 3 +- .../reference/parserComputedPropertyName24.js | 3 +- .../reference/parserComputedPropertyName3.js | 3 +- .../reference/parserComputedPropertyName33.js | 3 +- .../reference/parserComputedPropertyName38.js | 3 +- .../reference/parserComputedPropertyName39.js | 3 +- .../reference/parserComputedPropertyName4.js | 3 +- .../reference/parserComputedPropertyName40.js | 3 +- .../reference/parserComputedPropertyName5.js | 3 +- .../reference/parserES3Accessors1.js | 3 +- .../reference/parserES3Accessors2.js | 3 +- .../reference/parserES3Accessors3.js | 3 +- .../reference/parserES3Accessors4.js | 3 +- .../parserES5ComputedPropertyName3.js | 3 +- .../parserES5ComputedPropertyName4.js | 3 +- .../parserErrantSemicolonInClass1.js | 3 +- .../reference/parserErrorRecovery_Block3.js | 3 +- .../parserErrorRecovery_ParameterList6.js | 3 +- .../reference/parserFunctionDeclaration4.js | 3 +- .../reference/parserFunctionDeclaration5.js | 3 +- .../reference/parserFunctionDeclaration6.js | 3 +- .../parserFunctionPropertyAssignment1.js | 3 +- .../parserFunctionPropertyAssignment2.js | 3 +- .../parserFunctionPropertyAssignment3.js | 3 +- .../parserFunctionPropertyAssignment4.js | 3 +- tests/baselines/reference/parserFuzz1.js | 6 +- .../parserGetAccessorWithTypeParameters1.js | 3 +- .../reference/parserMemberAccessor1.js | 6 +- .../parserMemberAccessorDeclaration1.js | 3 +- .../parserMemberAccessorDeclaration10.js | 3 +- .../parserMemberAccessorDeclaration11.js | 3 +- .../parserMemberAccessorDeclaration12.js | 3 +- .../parserMemberAccessorDeclaration13.js | 3 +- .../parserMemberAccessorDeclaration14.js | 3 +- .../parserMemberAccessorDeclaration15.js | 3 +- .../parserMemberAccessorDeclaration16.js | 4 +- .../parserMemberAccessorDeclaration17.js | 3 +- .../parserMemberAccessorDeclaration18.js | 7 +- .../parserMemberAccessorDeclaration2.js | 3 +- .../parserMemberAccessorDeclaration3.js | 3 +- .../parserMemberAccessorDeclaration4.js | 3 +- .../parserMemberAccessorDeclaration5.js | 3 +- .../parserMemberAccessorDeclaration6.js | 3 +- .../parserMemberAccessorDeclaration7.js | 3 +- .../parserMemberAccessorDeclaration8.js | 3 +- .../parserMemberAccessorDeclaration9.js | 3 +- .../parserMemberFunctionDeclaration1.js | 3 +- .../parserMemberFunctionDeclaration2.js | 3 +- .../parserMemberFunctionDeclaration3.js | 3 +- .../parserMemberFunctionDeclaration4.js | 3 +- .../parserMemberFunctionDeclaration5.js | 3 +- ...erMemberFunctionDeclarationAmbiguities1.js | 24 +- .../reference/parserMissingToken1.js | 6 +- ...rserNoASIOnCallAfterFunctionExpression1.js | 3 +- .../reference/parserParameterList1.js | 3 +- .../reference/parserParameterList10.js | 8 +- .../reference/parserParameterList15.js | 3 +- .../reference/parserParameterList16.js | 3 +- .../reference/parserParameterList2.js | 4 +- .../reference/parserParameterList3.js | 3 +- .../reference/parserParameterList9.js | 7 +- .../parserSetAccessorWithTypeParameters1.js | 3 +- .../parserShorthandPropertyAssignment1.js | 3 +- .../reference/parserSkippedTokens16.js | 9 +- .../baselines/reference/parserStrictMode12.js | 3 +- .../reference/parserUnaryExpression2.js | 3 +- .../parserUnicodeWhitespaceCharacter1.js | 3 +- .../parserUsingConstructorAsIdentifier.js | 9 +- tests/baselines/reference/parserharness.js | 54 +- ...sRecoversWhenHittingUnexpectedSemicolon.js | 3 +- .../reference/partiallyAmbientFundule.js | 3 +- .../reference/plusOperatorWithAnyOtherType.js | 4 +- .../reference/primitiveConstraints1.js | 6 +- tests/baselines/reference/primitiveMembers.js | 3 +- .../reference/primtiveTypesAreIdentical.js | 21 +- .../baselines/reference/privateVisibility.js | 3 +- .../project/nonRelative/amd/lib/bar/a.js | 3 +- .../project/nonRelative/amd/lib/foo/a.js | 3 +- .../project/nonRelative/amd/lib/foo/b.js | 3 +- .../project/nonRelative/node/lib/bar/a.js | 3 +- .../project/nonRelative/node/lib/foo/a.js | 3 +- .../project/nonRelative/node/lib/foo/b.js | 3 +- .../amd/li'b/class'A.js | 3 +- .../node/li'b/class'A.js | 3 +- tests/baselines/reference/propertyAccess.js | 3 +- .../propertyAndAccessorWithSameName.js | 6 +- .../propertyAndFunctionWithSameName.js | 3 +- .../reference/propertyWrappedInTry.js | 3 +- tests/baselines/reference/prototypes.js | 3 +- .../reference/qualifiedModuleLocals.js | 3 +- .../reference/quotedFunctionName1.js | 3 +- .../reference/quotedFunctionName2.js | 3 +- tests/baselines/reference/recur1.js | 6 +- .../recursiveBaseConstructorCreation1.js | 3 +- .../reference/recursiveFunctionTypes.js | 12 +- .../reference/recursiveFunctionTypes1.js | 3 +- .../reference/recursiveInferenceBug.js | 3 +- .../recursiveTypesUsedAsFunctionParameters.js | 6 +- .../reference/restArgAssignmentCompat.js | 3 +- .../baselines/reference/restArgMissingName.js | 7 +- .../reference/restParamAsOptional.js | 15 +- .../reference/restParameterNotLast.js | 3 +- ...estParameterWithoutAnnotationIsAnyArray.js | 49 +- tests/baselines/reference/restParameters.js | 28 +- .../restParametersOfNonArrayTypes.js | 49 +- .../restParametersOfNonArrayTypes2.js | 98 +- .../restParametersWithArrayTypeAnnotations.js | 98 +- .../reference/restParamsWithNonRestParams.js | 21 +- .../reference/returnInConstructor1.js | 18 +- tests/baselines/reference/returnStatements.js | 3 +- .../reference/returnTypeParameter.js | 3 +- .../reference/scopingInCatchBlocks.js | 15 +- tests/baselines/reference/separate1-2.js | 3 +- .../reference/shadowPrivateMembers.js | 6 +- ...MapValidationFunctionPropertyAssignment.js | 3 +- ...alidationFunctionPropertyAssignment.js.map | 2 +- ...onFunctionPropertyAssignment.sourcemap.txt | 27 +- .../specializedOverloadWithRestParameters.js | 6 +- ...reIsNotSubtypeOfNonSpecializedSignature.js | 12 +- ...atureIsSubtypeOfNonSpecializedSignature.js | 12 +- .../reference/staticAndMemberFunctions.js | 6 +- .../staticAndNonStaticPropertiesSameName.js | 6 +- tests/baselines/reference/staticClassProps.js | 3 +- .../reference/staticGetterAndSetter.js | 3 +- .../baselines/reference/staticInheritance.js | 3 +- .../reference/staticInstanceResolution4.js | 3 +- .../reference/staticInstanceResolution5.js | 9 +- ...mberAssignsToConstructorFunctionMembers.js | 6 +- ...AndPublicMemberOfAnotherClassAssignment.js | 6 +- .../staticMembersUsingClassTypeParameter.js | 9 +- .../reference/staticModifierAlreadySeen.js | 3 +- .../reference/staticOffOfInstance1.js | 3 +- .../reference/staticOffOfInstance2.js | 3 +- .../staticPropertyAndFunctionWithSameName.js | 3 +- .../reference/staticPropertyNotInClassType.js | 6 +- .../reference/staticPrototypeProperty.js | 3 +- .../baselines/reference/staticsInAFunction.js | 3 +- .../reference/staticsInConstructorBodies.js | 3 +- tests/baselines/reference/strictMode5.js | 3 +- .../reference/stringIndexerAndConstructor.js | 3 +- ...ngIndexerConstrainsPropertyDeclarations.js | 12 +- .../stringLiteralTypeIsSubtypeOfString.js | 48 +- ...gLiteralTypesInImplementationSignatures.js | 21 +- ...LiteralTypesInImplementationSignatures2.js | 12 +- .../baselines/reference/stringPropCodeGen.js | 3 +- tests/baselines/reference/stripInternal1.js | 6 +- tests/baselines/reference/subtypesOfAny.js | 3 +- .../reference/subtypesOfTypeParameter.js | 9 +- ...subtypesOfTypeParameterWithConstraints2.js | 9 +- tests/baselines/reference/subtypesOfUnion.js | 3 +- .../reference/subtypingWithCallSignatures2.js | 3 +- .../reference/subtypingWithCallSignatures4.js | 3 +- tests/baselines/reference/superAccess2.js | 6 +- .../reference/superCallOutsideConstructor.js | 3 +- tests/baselines/reference/superCalls.js | 3 +- .../reference/superCallsInConstructor.js | 9 +- .../baselines/reference/superInCatchBlock1.js | 3 +- .../reference/superPropertyAccess.js | 9 +- .../reference/superPropertyAccess1.js | 6 +- .../reference/superPropertyAccess2.js | 6 +- .../reference/superWithTypeArgument3.js | 3 +- .../reference/switchBreakStatements.js | 3 +- ...gedTemplateStringsTypeArgumentInference.js | 33 +- ...TemplateStringsTypeArgumentInferenceES6.js | 33 +- ...dTemplateStringsWithOverloadResolution3.js | 3 +- ...plateStringsWithOverloadResolution3_ES6.js | 3 +- .../reference/targetTypeBaseCalls.js | 3 +- ...thisInArrowFunctionInStaticInitializer1.js | 3 +- .../reference/thisInInvalidContexts.js | 3 +- .../thisInInvalidContextsExternalModule.js | 3 +- tests/baselines/reference/thisInLambda.js | 3 +- ...eferencedInFunctionInsideArrowFunction1.js | 3 +- .../reference/tooManyTypeParameters1.js | 6 +- tests/baselines/reference/topLevelLambda2.js | 3 +- ...railingCommaInHeterogenousArrayLiteral1.js | 3 +- tests/baselines/reference/tryCatchFinally.js | 21 +- tests/baselines/reference/tryStatements.js | 15 +- .../reference/twoAccessorsWithSameName.js | 9 +- .../reference/twoAccessorsWithSameName2.js | 6 +- .../reference/typeArgInferenceWithNull.js | 12 +- .../typeArgumentConstraintResolution1.js | 3 +- .../reference/typeArgumentInference.js | 30 +- .../reference/typeArgumentInferenceErrors.js | 12 +- .../typeArgumentInferenceWithConstraints.js | 30 +- .../typeArgumentInferenceWithObjectLiteral.js | 3 +- tests/baselines/reference/typeAssertions.js | 6 +- .../reference/typeCheckTypeArgument.js | 9 +- .../reference/typeIdentityConsidersBrands.js | 6 +- tests/baselines/reference/typeInfer1.js | 6 +- ...erAsTypeParameterConstraintTransitively.js | 5 +- ...rAsTypeParameterConstraintTransitively2.js | 5 +- .../reference/typeParameterConstraints1.js | 39 +- ...ypeParameterDirectlyConstrainedToItself.js | 12 +- ...eParameterIndirectlyConstrainedToItself.js | 12 +- .../reference/typeParameterOrderReversal.js | 6 +- .../typeParameterUsedAsConstraint.js | 36 +- .../typeParametersAreIdenticalToThemselves.js | 33 +- .../typeParametersInStaticAccessors.js | 3 +- tests/baselines/reference/typeQueryOnClass.js | 9 +- tests/baselines/reference/typeResolution.js | 15 +- .../baselines/reference/typeResolution.js.map | 2 +- .../reference/typeResolution.sourcemap.txt | 484 +++++----- .../reference/typedGenericPrototypeMember.js | 3 +- .../reference/typeofANonExportedType.js | 3 +- .../reference/typeofAnExportedType.js | 3 +- tests/baselines/reference/typeofClass2.js | 12 +- .../typeofOperatorWithAnyOtherType.js | 3 +- .../typesWithDuplicateTypeParameters.js | 6 +- tests/baselines/reference/undeclaredMethod.js | 3 +- .../reference/undeclaredModuleError.js | 10 +- .../undefinedIsSubtypeOfEverything.js | 3 +- tests/baselines/reference/underscoreTest1.js | 7 +- ...nSubtypeIfEveryConstituentTypeIsSubtype.js | 3 +- .../reference/unionTypeEquivalence.js | 3 +- .../reference/unionTypeFromArrayLiteral.js | 12 +- .../reference/unionTypesAssignability.js | 6 +- tests/baselines/reference/unknownSymbols1.js | 3 +- ...untypedFunctionCallsWithTypeParameters1.js | 3 +- .../validMultipleVariableDeclarations.js | 3 +- .../reference/varAndFunctionShareName.js | 3 +- .../reference/varArgWithNoParamName.js | 7 +- tests/baselines/reference/voidArrayLit.js | 12 +- .../reference/voidAsNonAmbiguousReturnType.js | 3 +- .../reference/voidFunctionAssignmentCompat.js | 12 +- .../reference/whileBreakStatements.js | 3 +- .../reference/whileContinueStatements.js | 3 +- tests/baselines/reference/widenedTypes.js | 6 +- tests/baselines/reference/withStatement.js | 3 +- .../reference/withStatementErrors.js | 3 +- 846 files changed, 3495 insertions(+), 6797 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 95e46112d57..5acaf560273 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2713,7 +2713,21 @@ module ts { emit(node.whenFalse); } + function isSingleLineBlock(node: Node) { + if (node && node.kind === SyntaxKind.Block) { + var block = node; + return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); + } + } + function emitBlock(node: Block) { + if (isSingleLineBlock(node)) { + emitToken(SyntaxKind.OpenBraceToken, node.pos); + write(" "); + emitToken(SyntaxKind.CloseBraceToken, node.statements.end); + return; + } + emitToken(SyntaxKind.OpenBraceToken, node.pos); increaseIndent(); scopeEmitStart(node.parent); @@ -2886,6 +2900,11 @@ module ts { getLineOfLocalPosition(currentSourceFile, skipTrivia(currentSourceFile.text, node2.pos)); } + function nodeEndIsOnSameLineAsNodeStart(node1: Node, node2: Node) { + return getLineOfLocalPosition(currentSourceFile, node1.end) === + getLineOfLocalPosition(currentSourceFile, skipTrivia(currentSourceFile.text, node2.pos)); + } + function emitCaseOrDefaultClause(node: CaseOrDefaultClause) { if (node.kind === SyntaxKind.CaseClause) { write("case "); @@ -3385,73 +3404,79 @@ module ts { emitSignatureParameters(node); } - write(" {"); - scopeEmitStart(node); - - if (!node.body) { - writeLine(); - write("}"); + if (isSingleLineBlock(node.body)) { + write(" { }"); } else { - increaseIndent(); + write(" {"); + scopeEmitStart(node); - emitDetachedComments(node.body.kind === SyntaxKind.Block ? (node.body).statements : node.body); - - var startIndex = 0; - if (node.body.kind === SyntaxKind.Block) { - startIndex = emitDirectivePrologues((node.body).statements, /*startWithNewLine*/ true); - } - var outPos = writer.getTextPos(); - - emitCaptureThisForNodeIfNecessary(node); - emitDefaultValueAssignments(node); - emitRestParameter(node); - if (node.body.kind !== SyntaxKind.Block && outPos === writer.getTextPos()) { - decreaseIndent(); - write(" "); - emitStart(node.body); - write("return "); - - // Don't emit comments on this body. We'll have already taken care of it above - // when we called emitDetachedComments. - emitNode(node.body, /*disableComments:*/ true); - emitEnd(node.body); - write(";"); - emitTempDeclarations(/*newLine*/ false); - write(" "); - emitStart(node.body); + if (!node.body) { + writeLine(); write("}"); - emitEnd(node.body); } else { + increaseIndent(); + + emitDetachedComments(node.body.kind === SyntaxKind.Block ? (node.body).statements : node.body); + + var startIndex = 0; if (node.body.kind === SyntaxKind.Block) { - emitLinesStartingAt((node.body).statements, startIndex); + startIndex = emitDirectivePrologues((node.body).statements, /*startWithNewLine*/ true); } - else { - writeLine(); - emitLeadingComments(node.body); + var outPos = writer.getTextPos(); + + emitCaptureThisForNodeIfNecessary(node); + emitDefaultValueAssignments(node); + emitRestParameter(node); + if (node.body.kind !== SyntaxKind.Block && outPos === writer.getTextPos()) { + decreaseIndent(); + write(" "); + emitStart(node.body); write("return "); - emit(node.body, /*disableComments:*/ true); + + // Don't emit comments on this body. We'll have already taken care of it above + // when we called emitDetachedComments. + emitNode(node.body, /*disableComments:*/ true); + emitEnd(node.body); write(";"); - emitTrailingComments(node.body); - } - emitTempDeclarations(/*newLine*/ true); - writeLine(); - if (node.body.kind === SyntaxKind.Block) { - emitLeadingCommentsOfPosition((node.body).statements.end); - decreaseIndent(); - emitToken(SyntaxKind.CloseBraceToken, (node.body).statements.end); - } - else { - decreaseIndent(); + emitTempDeclarations(/*newLine*/ false); + write(" "); emitStart(node.body); write("}"); emitEnd(node.body); } + else { + if (node.body.kind === SyntaxKind.Block) { + emitLinesStartingAt((node.body).statements, startIndex); + } + else { + writeLine(); + emitLeadingComments(node.body); + write("return "); + emit(node.body, /*disableComments:*/ true); + write(";"); + emitTrailingComments(node.body); + } + emitTempDeclarations(/*newLine*/ true); + writeLine(); + if (node.body.kind === SyntaxKind.Block) { + emitLeadingCommentsOfPosition((node.body).statements.end); + decreaseIndent(); + emitToken(SyntaxKind.CloseBraceToken, (node.body).statements.end); + } + else { + decreaseIndent(); + emitStart(node.body); + write("}"); + emitEnd(node.body); + } + } } + + scopeEmitEnd(); } - scopeEmitEnd(); if (node.flags & NodeFlags.Export) { writeLine(); emitStart(node); diff --git a/tests/baselines/reference/ArrowFunctionExpression1.js b/tests/baselines/reference/ArrowFunctionExpression1.js index baa75809f65..21c71af243c 100644 --- a/tests/baselines/reference/ArrowFunctionExpression1.js +++ b/tests/baselines/reference/ArrowFunctionExpression1.js @@ -2,5 +2,4 @@ var v = (public x: string) => { }; //// [ArrowFunctionExpression1.js] -var v = function (x) { -}; +var v = function (x) { }; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js index f9f2c571fd4..b27c2ce5a30 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.js @@ -58,8 +58,7 @@ var clodule1 = (function () { })(); var clodule1; (function (clodule1) { - function f(x) { - } + function f(x) { } })(clodule1 || (clodule1 = {})); var clodule2 = (function () { function clodule2() { diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js index cf39aa6c11b..255e74631a3 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.js @@ -19,8 +19,7 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.fn = function (id) { - }; + clodule.fn = function (id) { }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js index 69f72e3b4a7..76ba858306c 100644 --- a/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js +++ b/tests/baselines/reference/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.js @@ -19,8 +19,7 @@ module clodule { var clodule = (function () { function clodule() { } - clodule.fn = function (id) { - }; + clodule.fn = function (id) { }; return clodule; })(); var clodule; diff --git a/tests/baselines/reference/ClassDeclaration11.js b/tests/baselines/reference/ClassDeclaration11.js index 6c4ba4ac6ec..6284af07676 100644 --- a/tests/baselines/reference/ClassDeclaration11.js +++ b/tests/baselines/reference/ClassDeclaration11.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration13.js b/tests/baselines/reference/ClassDeclaration13.js index 4c4324eb1e1..7791b77eae6 100644 --- a/tests/baselines/reference/ClassDeclaration13.js +++ b/tests/baselines/reference/ClassDeclaration13.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function () { - }; + C.prototype.bar = function () { }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration21.js b/tests/baselines/reference/ClassDeclaration21.js index 94cf3587c8d..b5144b607d1 100644 --- a/tests/baselines/reference/ClassDeclaration21.js +++ b/tests/baselines/reference/ClassDeclaration21.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype[1] = function () { - }; + C.prototype[1] = function () { }; return C; })(); diff --git a/tests/baselines/reference/ClassDeclaration22.js b/tests/baselines/reference/ClassDeclaration22.js index c44ba4ba43b..0074813e77e 100644 --- a/tests/baselines/reference/ClassDeclaration22.js +++ b/tests/baselines/reference/ClassDeclaration22.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype["bar"] = function () { - }; + C.prototype["bar"] = function () { }; return C; })(); diff --git a/tests/baselines/reference/FunctionDeclaration12_es6.js b/tests/baselines/reference/FunctionDeclaration12_es6.js index da9cea3f9c6..d9c1739cb49 100644 --- a/tests/baselines/reference/FunctionDeclaration12_es6.js +++ b/tests/baselines/reference/FunctionDeclaration12_es6.js @@ -2,5 +2,4 @@ var v = function * yield() { } //// [FunctionDeclaration12_es6.js] -var v = , yield = function () { -}; +var v = , yield = function () { }; diff --git a/tests/baselines/reference/FunctionDeclaration4.js b/tests/baselines/reference/FunctionDeclaration4.js index 53e040b28fc..b50970965f0 100644 --- a/tests/baselines/reference/FunctionDeclaration4.js +++ b/tests/baselines/reference/FunctionDeclaration4.js @@ -3,5 +3,4 @@ function foo(); function bar() { } //// [FunctionDeclaration4.js] -function bar() { -} +function bar() { } diff --git a/tests/baselines/reference/FunctionDeclaration6.js b/tests/baselines/reference/FunctionDeclaration6.js index 093fac7ed7c..721d4d80b6d 100644 --- a/tests/baselines/reference/FunctionDeclaration6.js +++ b/tests/baselines/reference/FunctionDeclaration6.js @@ -6,6 +6,5 @@ //// [FunctionDeclaration6.js] { - function bar() { - } + function bar() { } } diff --git a/tests/baselines/reference/FunctionExpression1_es6.js b/tests/baselines/reference/FunctionExpression1_es6.js index 7c8d82f4ca8..97e5d28887d 100644 --- a/tests/baselines/reference/FunctionExpression1_es6.js +++ b/tests/baselines/reference/FunctionExpression1_es6.js @@ -2,5 +2,4 @@ var v = function * () { } //// [FunctionExpression1_es6.js] -var v = function () { -}; +var v = function () { }; diff --git a/tests/baselines/reference/FunctionExpression2_es6.js b/tests/baselines/reference/FunctionExpression2_es6.js index 0a2468bcb8c..87960e37128 100644 --- a/tests/baselines/reference/FunctionExpression2_es6.js +++ b/tests/baselines/reference/FunctionExpression2_es6.js @@ -2,5 +2,4 @@ var v = function * foo() { } //// [FunctionExpression2_es6.js] -var v = function foo() { -}; +var v = function foo() { }; diff --git a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js index a451dcfb363..0176b412713 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments1_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments1_es6.js @@ -2,5 +2,4 @@ var v = { *foo() { } } //// [FunctionPropertyAssignments1_es6.js] -var v = { foo: function () { -} }; +var v = { foo: function () { } }; diff --git a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js index 5338afeef39..fc86a6a48d6 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments2_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments2_es6.js @@ -2,5 +2,4 @@ var v = { *() { } } //// [FunctionPropertyAssignments2_es6.js] -var v = { : function () { -} }; +var v = { : function () { } }; diff --git a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js index 7b3adb771f3..89963edbc6e 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments3_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments3_es6.js @@ -2,5 +2,4 @@ var v = { *{ } } //// [FunctionPropertyAssignments3_es6.js] -var v = { : function () { -} }; +var v = { : function () { } }; diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js index 2bfc675acff..fbde587036d 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js @@ -2,5 +2,4 @@ var v = { *[foo()]() { } } //// [FunctionPropertyAssignments5_es6.js] -var v = { [foo()]: function () { -} }; +var v = { [foo()]: function () { } }; diff --git a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js index 6bd636be73a..60f3677f108 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments6_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments6_es6.js @@ -2,5 +2,4 @@ var v = { *() { } } //// [FunctionPropertyAssignments6_es6.js] -var v = { : function () { -} }; +var v = { : function () { } }; diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.js b/tests/baselines/reference/MemberAccessorDeclaration15.js index 41ed265a878..85bbfa62238 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.js +++ b/tests/baselines/reference/MemberAccessorDeclaration15.js @@ -8,8 +8,7 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js index 86e7c9d418a..121376d5265 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration1_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration1_es6.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js index efd60844dc7..dcb494b3d13 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration2_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration2_es6.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js index 357f9175b42..e858ab15582 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype[foo] = function () { - }; + C.prototype[foo] = function () { }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js index 9c6d76bfca5..26b08681441 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration4_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration4_es6.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype. = function () { - }; + C.prototype. = function () { }; return C; })(); diff --git a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js index 211713c6e14..8f942d87f9f 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration7_es6.js +++ b/tests/baselines/reference/MemberFunctionDeclaration7_es6.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); diff --git a/tests/baselines/reference/Protected4.js b/tests/baselines/reference/Protected4.js index 665a182ef33..9c23a1be884 100644 --- a/tests/baselines/reference/Protected4.js +++ b/tests/baselines/reference/Protected4.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype.m = function () { - }; + C.prototype.m = function () { }; return C; })(); diff --git a/tests/baselines/reference/Protected5.js b/tests/baselines/reference/Protected5.js index 8834cc488cb..8426a8765d7 100644 --- a/tests/baselines/reference/Protected5.js +++ b/tests/baselines/reference/Protected5.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.m = function () { - }; + C.m = function () { }; return C; })(); diff --git a/tests/baselines/reference/Protected6.js b/tests/baselines/reference/Protected6.js index 004f30b27f8..10b59551737 100644 --- a/tests/baselines/reference/Protected6.js +++ b/tests/baselines/reference/Protected6.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.m = function () { - }; + C.m = function () { }; return C; })(); diff --git a/tests/baselines/reference/Protected7.js b/tests/baselines/reference/Protected7.js index 466f6909d67..16c24edb8cb 100644 --- a/tests/baselines/reference/Protected7.js +++ b/tests/baselines/reference/Protected7.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype.m = function () { - }; + C.prototype.m = function () { }; return C; })(); diff --git a/tests/baselines/reference/accessibilityModifiers.js b/tests/baselines/reference/accessibilityModifiers.js index 901b3a29c2e..af1832d9340 100644 --- a/tests/baselines/reference/accessibilityModifiers.js +++ b/tests/baselines/reference/accessibilityModifiers.js @@ -50,8 +50,7 @@ class E { var C = (function () { function C() { } - C.privateMethod = function () { - }; + C.privateMethod = function () { }; Object.defineProperty(C, "privateGetter", { get: function () { return 0; @@ -60,13 +59,11 @@ var C = (function () { configurable: true }); Object.defineProperty(C, "privateSetter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); - C.protectedMethod = function () { - }; + C.protectedMethod = function () { }; Object.defineProperty(C, "protectedGetter", { get: function () { return 0; @@ -75,13 +72,11 @@ var C = (function () { configurable: true }); Object.defineProperty(C, "protectedSetter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); - C.publicMethod = function () { - }; + C.publicMethod = function () { }; Object.defineProperty(C, "publicGetter", { get: function () { return 0; @@ -90,8 +85,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C, "publicSetter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -101,8 +95,7 @@ var C = (function () { var D = (function () { function D() { } - D.privateMethod = function () { - }; + D.privateMethod = function () { }; Object.defineProperty(D, "privateGetter", { get: function () { return 0; @@ -111,13 +104,11 @@ var D = (function () { configurable: true }); Object.defineProperty(D, "privateSetter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); - D.protectedMethod = function () { - }; + D.protectedMethod = function () { }; Object.defineProperty(D, "protectedGetter", { get: function () { return 0; @@ -126,13 +117,11 @@ var D = (function () { configurable: true }); Object.defineProperty(D, "protectedSetter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); - D.publicMethod = function () { - }; + D.publicMethod = function () { }; Object.defineProperty(D, "publicGetter", { get: function () { return 0; @@ -141,8 +130,7 @@ var D = (function () { configurable: true }); Object.defineProperty(D, "publicSetter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -152,8 +140,7 @@ var D = (function () { var E = (function () { function E() { } - E.prototype.method = function () { - }; + E.prototype.method = function () { }; Object.defineProperty(E.prototype, "getter", { get: function () { return 0; @@ -162,8 +149,7 @@ var E = (function () { configurable: true }); Object.defineProperty(E.prototype, "setter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessorParameterAccessibilityModifier.js b/tests/baselines/reference/accessorParameterAccessibilityModifier.js index 89a511e6c5c..8b5ee6196e0 100644 --- a/tests/baselines/reference/accessorParameterAccessibilityModifier.js +++ b/tests/baselines/reference/accessorParameterAccessibilityModifier.js @@ -10,14 +10,12 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); Object.defineProperty(C, "X", { - set: function (v2) { - }, + set: function (v2) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessorWithES3.js b/tests/baselines/reference/accessorWithES3.js index 6eba5238a91..8c0d353b310 100644 --- a/tests/baselines/reference/accessorWithES3.js +++ b/tests/baselines/reference/accessorWithES3.js @@ -52,6 +52,5 @@ var x = { } }; var y = { - set b(v) { - } + set b(v) { } }; diff --git a/tests/baselines/reference/accessorWithES5.js b/tests/baselines/reference/accessorWithES5.js index 1a3690556e0..d51f5e7713b 100644 --- a/tests/baselines/reference/accessorWithES5.js +++ b/tests/baselines/reference/accessorWithES5.js @@ -49,6 +49,5 @@ var x = { } }; var y = { - set b(v) { - } + set b(v) { } }; diff --git a/tests/baselines/reference/accessorWithInitializer.js b/tests/baselines/reference/accessorWithInitializer.js index 26e72fe7d7d..2b07ccc080f 100644 --- a/tests/baselines/reference/accessorWithInitializer.js +++ b/tests/baselines/reference/accessorWithInitializer.js @@ -10,16 +10,12 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - set: function (v) { - if (v === void 0) { v = 0; } - }, + set: function (v) { }, enumerable: true, configurable: true }); Object.defineProperty(C, "X", { - set: function (v2) { - if (v2 === void 0) { v2 = 0; } - }, + set: function (v2) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessorWithRestParam.js b/tests/baselines/reference/accessorWithRestParam.js index 9feafe1904d..a0b7e849e51 100644 --- a/tests/baselines/reference/accessorWithRestParam.js +++ b/tests/baselines/reference/accessorWithRestParam.js @@ -10,22 +10,12 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "X", { - set: function () { - var v = []; - for (var _i = 0; _i < arguments.length; _i++) { - v[_i - 0] = arguments[_i]; - } - }, + set: function () { }, enumerable: true, configurable: true }); Object.defineProperty(C, "X", { - set: function () { - var v2 = []; - for (var _i = 0; _i < arguments.length; _i++) { - v2[_i - 0] = arguments[_i]; - } - }, + set: function () { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js index 6a3b3773aa6..11590f6d068 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.js @@ -21,8 +21,7 @@ var LanguageSpec_section_4_5_error_cases = (function () { get: function () { return ""; }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -30,8 +29,7 @@ var LanguageSpec_section_4_5_error_cases = (function () { get: function () { return ""; }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.js b/tests/baselines/reference/accessors_spec_section-4.5_inference.js index b140e565b29..6ad452f2a5a 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.js +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.js @@ -50,8 +50,7 @@ var LanguageSpec_section_4_5_inference = (function () { get: function () { return new B(); }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -59,8 +58,7 @@ var LanguageSpec_section_4_5_inference = (function () { get: function () { return new B(); }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -68,8 +66,7 @@ var LanguageSpec_section_4_5_inference = (function () { get: function () { return new B(); }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -77,8 +74,7 @@ var LanguageSpec_section_4_5_inference = (function () { get: function () { return new B(); }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -86,8 +82,7 @@ var LanguageSpec_section_4_5_inference = (function () { get: function () { return new B(); }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -95,8 +90,7 @@ var LanguageSpec_section_4_5_inference = (function () { get: function () { return new B(); }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js index c4e30f95db2..49d4ea66ba8 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.js @@ -40,13 +40,11 @@ var r19 = a + { a: '' }; var r20 = a + ((a: string) => { return a }); //// [additionOperatorWithAnyAndEveryType.js] -function foo() { -} +function foo() { } var C = (function () { function C() { } - C.foo = function () { - }; + C.foo = function () { }; return C; })(); var E; diff --git a/tests/baselines/reference/additionOperatorWithInvalidOperands.js b/tests/baselines/reference/additionOperatorWithInvalidOperands.js index baf4fadedb3..7bd31c7ae53 100644 --- a/tests/baselines/reference/additionOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithInvalidOperands.js @@ -41,13 +41,11 @@ var r19 = E.a + C.foo(); var r20 = E.a + M; //// [additionOperatorWithInvalidOperands.js] -function foo() { -} +function foo() { } var C = (function () { function C() { } - C.foo = function () { - }; + C.foo = function () { }; return C; })(); var E; diff --git a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js index 979d9a6cdb9..20ac1350ef3 100644 --- a/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js +++ b/tests/baselines/reference/additionOperatorWithNullValueAndInvalidOperator.js @@ -44,5 +44,4 @@ var r7 = null + d; var r8 = null + true; var r9 = null + { a: '' }; var r10 = null + foo(); -var r11 = null + (function () { -}); +var r11 = null + (function () { }); diff --git a/tests/baselines/reference/additionOperatorWithTypeParameter.js b/tests/baselines/reference/additionOperatorWithTypeParameter.js index 23a6b95b147..a568f420a32 100644 --- a/tests/baselines/reference/additionOperatorWithTypeParameter.js +++ b/tests/baselines/reference/additionOperatorWithTypeParameter.js @@ -74,7 +74,6 @@ function foo(t, u) { var r16 = t + undefined; var r17 = t + t; var r18 = t + u; - var r19 = t + (function () { - }); + var r19 = t + (function () { }); var r20 = t + []; } diff --git a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js index 2b7fd9a6c8c..2cf0ce22259 100644 --- a/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js +++ b/tests/baselines/reference/additionOperatorWithUndefinedValueAndInvalidOperands.js @@ -44,5 +44,4 @@ var r7 = undefined + d; var r8 = undefined + true; var r9 = undefined + { a: '' }; var r10 = undefined + foo(); -var r11 = undefined + (function () { -}); +var r11 = undefined + (function () { }); diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.js b/tests/baselines/reference/anyAssignabilityInInheritance.js index bc9ebb02f42..04e3e91761d 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.js +++ b/tests/baselines/reference/anyAssignabilityInInheritance.js @@ -118,8 +118,7 @@ var E; E[E["A"] = 0] = "A"; })(E || (E = {})); var r3 = foo3(a); // any -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/anyAssignableToEveryType2.js b/tests/baselines/reference/anyAssignableToEveryType2.js index 41cedb73215..530d8eb0439 100644 --- a/tests/baselines/reference/anyAssignableToEveryType2.js +++ b/tests/baselines/reference/anyAssignableToEveryType2.js @@ -146,8 +146,7 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/anyDeclare.js b/tests/baselines/reference/anyDeclare.js index a46a2529491..8bb2f55eb84 100644 --- a/tests/baselines/reference/anyDeclare.js +++ b/tests/baselines/reference/anyDeclare.js @@ -10,6 +10,5 @@ module myMod { var myMod; (function (myMod) { var myFn; - function myFn() { - } + function myFn() { } })(myMod || (myMod = {})); diff --git a/tests/baselines/reference/anyIdenticalToItself.js b/tests/baselines/reference/anyIdenticalToItself.js index dc221b69aa7..b7b9b25e418 100644 --- a/tests/baselines/reference/anyIdenticalToItself.js +++ b/tests/baselines/reference/anyIdenticalToItself.js @@ -13,8 +13,7 @@ class C { } //// [anyIdenticalToItself.js] -function foo(x, y) { -} +function foo(x, y) { } var C = (function () { function C() { } diff --git a/tests/baselines/reference/arrayLiteralContextualType.js b/tests/baselines/reference/arrayLiteralContextualType.js index 65e4c135cba..0edf5c45164 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.js +++ b/tests/baselines/reference/arrayLiteralContextualType.js @@ -44,10 +44,8 @@ var Elephant = (function () { } return Elephant; })(); -function foo(animals) { -} -function bar(animals) { -} +function foo(animals) { } +function bar(animals) { } foo([ new Giraffe(), new Elephant() diff --git a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js index 57cba07d6bf..9edf545f8b4 100644 --- a/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js +++ b/tests/baselines/reference/arrayLiteralInNonVarArgParameter.js @@ -5,10 +5,5 @@ panic([], 'one', 'two'); //// [arrayLiteralInNonVarArgParameter.js] -function panic(val) { - var opt = []; - for (var _i = 1; _i < arguments.length; _i++) { - opt[_i - 1] = arguments[_i]; - } -} +function panic(val) { } panic([], 'one', 'two'); diff --git a/tests/baselines/reference/arrayOfFunctionTypes3.js b/tests/baselines/reference/arrayOfFunctionTypes3.js index ab7c6778a71..c0829418dd7 100644 --- a/tests/baselines/reference/arrayOfFunctionTypes3.js +++ b/tests/baselines/reference/arrayOfFunctionTypes3.js @@ -28,8 +28,7 @@ var r7 = r6(''); // any not string //// [arrayOfFunctionTypes3.js] // valid uses of arrays of function types -var x = [function () { return 1; }, function () { -}]; +var x = [function () { return 1; }, function () { }]; var r2 = x[0](); var C = (function () { function C() { diff --git a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js index 3b0f2c11aa7..6fcdae657e9 100644 --- a/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js +++ b/tests/baselines/reference/arrayReferenceWithoutTypeArgs.js @@ -7,7 +7,6 @@ class X { var X = (function () { function X() { } - X.prototype.f = function (a) { - }; + X.prototype.f = function (a) { }; return X; })(); diff --git a/tests/baselines/reference/arrowFunctionExpressions.js b/tests/baselines/reference/arrowFunctionExpressions.js index 9aa049b9f6f..a828da6cffc 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.js +++ b/tests/baselines/reference/arrowFunctionExpressions.js @@ -138,8 +138,7 @@ function someOtherFn() { // Arrow function used in nested function in function function outerFn() { function innerFn() { - var arrowFn = function () { - }; + var arrowFn = function () { }; var p = arrowFn(); var p; } diff --git a/tests/baselines/reference/arrowFunctionsMissingTokens.js b/tests/baselines/reference/arrowFunctionsMissingTokens.js index 7bd24f07577..3ea21232ac4 100644 --- a/tests/baselines/reference/arrowFunctionsMissingTokens.js +++ b/tests/baselines/reference/arrowFunctionsMissingTokens.js @@ -69,16 +69,11 @@ module okay { //// [arrowFunctionsMissingTokens.js] var missingArrowsWithCurly; (function (missingArrowsWithCurly) { - var a = function () { - }; - var b = function () { - }; - var c = function (x) { - }; - var d = function (x, y) { - }; - var e = function (x, y) { - }; + var a = function () { }; + var b = function () { }; + var c = function (x) { }; + var d = function (x, y) { }; + var e = function (x, y) { }; })(missingArrowsWithCurly || (missingArrowsWithCurly = {})); var missingCurliesWithArrow; (function (missingCurliesWithArrow) { @@ -127,14 +122,9 @@ var ce_nEst_pas_une_arrow_function; })(ce_nEst_pas_une_arrow_function || (ce_nEst_pas_une_arrow_function = {})); var okay; (function (okay) { - var a = function () { - }; - var b = function () { - }; - var c = function (x) { - }; - var d = function (x, y) { - }; - var e = function (x, y) { - }; + var a = function () { }; + var b = function () { }; + var c = function (x) { }; + var d = function (x, y) { }; + var e = function (x, y) { }; })(okay || (okay = {})); diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js index dbfd4487ac1..513a2080dd4 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.js @@ -10,8 +10,7 @@ fn(function (a, b) { return true; }) //// [assignLambdaToNominalSubtypeOfFunction.js] -function fn(cb) { -} +function fn(cb) { } fn(function (a, b) { return true; }); fn(function (a, b) { return true; diff --git a/tests/baselines/reference/assignmentCompatBug3.js b/tests/baselines/reference/assignmentCompatBug3.js index 6d3deedc5b8..da21ac17c9d 100644 --- a/tests/baselines/reference/assignmentCompatBug3.js +++ b/tests/baselines/reference/assignmentCompatBug3.js @@ -53,8 +53,7 @@ var C = (function () { }); return C; })(); -function foo(test) { -} +function foo(test) { } var x; var y; foo(x); diff --git a/tests/baselines/reference/assignmentCompatBug5.js b/tests/baselines/reference/assignmentCompatBug5.js index f4ec40dafae..d4f82584bec 100644 --- a/tests/baselines/reference/assignmentCompatBug5.js +++ b/tests/baselines/reference/assignmentCompatBug5.js @@ -12,17 +12,13 @@ foo3((n) => { return; }); //// [assignmentCompatBug5.js] -function foo1(x) { -} +function foo1(x) { } foo1({ b: 5 }); -function foo2(x) { -} +function foo2(x) { } foo2(["s", "t"]); -function foo3(x) { -} +function foo3(x) { } ; -foo3(function (s) { -}); +foo3(function (s) { }); foo3(function (n) { return; }); diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js index 2eac9cdb476..bb6817bb60e 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.js @@ -20,10 +20,8 @@ Biz(new Foo()); var Foo = (function () { function Foo() { } - Foo.prototype.Boz = function () { - }; + Foo.prototype.Boz = function () { }; return Foo; })(); -function Biz(map) { -} +function Biz(map) { } Biz(new Foo()); diff --git a/tests/baselines/reference/assignmentCompatOnNew.js b/tests/baselines/reference/assignmentCompatOnNew.js index bc3b7e6ba96..1b8cfdcc3bf 100644 --- a/tests/baselines/reference/assignmentCompatOnNew.js +++ b/tests/baselines/reference/assignmentCompatOnNew.js @@ -13,6 +13,5 @@ var Foo = (function () { return Foo; })(); ; -function bar(x) { -} +function bar(x) { } bar(Foo); // Error, but should be allowed diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js index 637e26a82ce..760631ffbb5 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.js @@ -39,17 +39,14 @@ x = ['']; x = 4; x = {}; // Should work -function f() { -} +function f() { } ; x = f; -function fn(c) { -} +function fn(c) { } // Should Fail fn(''); fn(['']); fn(4); fn({}); // Should work -fn(function (a) { -}); +fn(function (a) { }); diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js index 07bb9862c80..2e61521eefb 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.js @@ -39,17 +39,14 @@ x = ['']; x = 4; x = {}; // Should work -function f() { -} +function f() { } ; x = f; -function fn(c) { -} +function fn(c) { } // Should Fail fn(''); fn(['']); fn(4); fn({}); // Should work -fn(function (a) { -}); +fn(function (a) { }); diff --git a/tests/baselines/reference/assignmentLHSIsValue.js b/tests/baselines/reference/assignmentLHSIsValue.js index e6975e70146..15bc7b9acfd 100644 --- a/tests/baselines/reference/assignmentLHSIsValue.js +++ b/tests/baselines/reference/assignmentLHSIsValue.js @@ -138,11 +138,9 @@ var Derived = (function (_super) { return Derived; })(C); // function expression -function bar() { -} +function bar() { } value; -(function () { -}); +(function () { }); value; // function calls foo() = value; @@ -159,6 +157,5 @@ foo() = value; (/d+/) = value; ({}) = value; ([]) = value; -(function baz() { -}) = value; +(function baz() { }) = value; (foo()) = value; diff --git a/tests/baselines/reference/assignmentStricterConstraints.js b/tests/baselines/reference/assignmentStricterConstraints.js index f8f4ce6d1b6..a7f554ade7d 100644 --- a/tests/baselines/reference/assignmentStricterConstraints.js +++ b/tests/baselines/reference/assignmentStricterConstraints.js @@ -13,7 +13,6 @@ g(1, "") var f = function (x, y) { x = y; }; -var g = function (x, y) { -}; +var g = function (x, y) { }; g = f; g(1, ""); diff --git a/tests/baselines/reference/assignmentToFunction.js b/tests/baselines/reference/assignmentToFunction.js index a4e2d540a8d..7462fdfcf3f 100644 --- a/tests/baselines/reference/assignmentToFunction.js +++ b/tests/baselines/reference/assignmentToFunction.js @@ -11,8 +11,7 @@ module foo { } //// [assignmentToFunction.js] -function fn() { -} +function fn() { } fn = function () { return 3; }; var foo; (function (foo) { diff --git a/tests/baselines/reference/assignmentToObjectAndFunction.js b/tests/baselines/reference/assignmentToObjectAndFunction.js index b058765d5f8..a3c4785b18b 100644 --- a/tests/baselines/reference/assignmentToObjectAndFunction.js +++ b/tests/baselines/reference/assignmentToObjectAndFunction.js @@ -37,24 +37,20 @@ var goodObj = { } }; // Ok, because toString is a subtype of Object's toString var errFun = {}; // Error for no call signature -function foo() { -} +function foo() { } var foo; (function (foo) { foo.boom = 0; })(foo || (foo = {})); var goodFundule = foo; // ok -function bar() { -} +function bar() { } var bar; (function (bar) { - function apply(thisArg, argArray) { - } + function apply(thisArg, argArray) { } bar.apply = apply; })(bar || (bar = {})); var goodFundule2 = bar; // ok -function bad() { -} +function bad() { } var bad; (function (bad) { bad.apply = 0; diff --git a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js index b0dbe782d08..9526cb08bef 100644 --- a/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js +++ b/tests/baselines/reference/assignmentToParenthesizedIdentifiers.js @@ -103,8 +103,7 @@ M2.M3 = { x: 3 }; // OK M2.M3 = { x: '' }; // Error (M2).M3 = { x: '' }; // Error (M2.M3) = { x: '' }; // Error -function fn() { -} +function fn() { } fn = function () { return 3; }; // Bug 823548: Should be error (fn is not a reference) (fn) = function () { return 3; }; // Should be error function fn2(x, y) { diff --git a/tests/baselines/reference/assignmentToReferenceTypes.js b/tests/baselines/reference/assignmentToReferenceTypes.js index 214e10b9c6c..1aec3c2051d 100644 --- a/tests/baselines/reference/assignmentToReferenceTypes.js +++ b/tests/baselines/reference/assignmentToReferenceTypes.js @@ -36,8 +36,7 @@ var E; (function (E) { })(E || (E = {})); E = null; -function f() { -} +function f() { } f = null; var x = 1; x = null; diff --git a/tests/baselines/reference/assignments.js b/tests/baselines/reference/assignments.js index f9bb008ccac..363d2f2a017 100644 --- a/tests/baselines/reference/assignments.js +++ b/tests/baselines/reference/assignments.js @@ -53,8 +53,7 @@ var E; })(E || (E = {})); E = null; // Error 0 /* A */ = null; // OK per spec, Error per implementation (509581) -function fn() { -} +function fn() { } fn = null; // Should be error var v; v = null; // OK diff --git a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js index 88996de1553..32fed237a2e 100644 --- a/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeAssignmentCompatIndexSignature.js @@ -23,7 +23,6 @@ var v2: { //// [augmentedTypeAssignmentCompatIndexSignature.js] var o = {}; -var f = function () { -}; +var f = function () { }; var v1 = o; // Should be allowed var v2 = f; // Should be allowed diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js index a1b6bf6805c..8d2c94899dc 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.js @@ -15,5 +15,4 @@ var b = (() => { })[0]; // Should be Bar //// [augmentedTypeBracketAccessIndexSignature.js] var a = {}[0]; // Should be Foo -var b = (function () { -})[0]; // Should be Bar +var b = (function () { })[0]; // Should be Bar diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js index 5bc184df667..6ec653c69b5 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.js @@ -15,8 +15,7 @@ var r4 = f['data']; // Should be number //// [augmentedTypeBracketNamedPropertyAccess.js] var o = {}; -var f = function () { -}; +var f = function () { }; var r1 = o['data']; // Should be number var r2 = o['functionData']; // Should be any (no property found) var r3 = f['functionData']; // Should be string diff --git a/tests/baselines/reference/augmentedTypesClass.js b/tests/baselines/reference/augmentedTypesClass.js index 5d0d8ab75d6..30b75483d80 100644 --- a/tests/baselines/reference/augmentedTypesClass.js +++ b/tests/baselines/reference/augmentedTypesClass.js @@ -12,8 +12,7 @@ enum c4 { One } // error var c1 = (function () { function c1() { } - c1.prototype.foo = function () { - }; + c1.prototype.foo = function () { }; return c1; })(); var c1 = 1; // error @@ -21,8 +20,7 @@ var c1 = 1; // error var c4 = (function () { function c4() { } - c4.prototype.foo = function () { - }; + c4.prototype.foo = function () { }; return c4; })(); var c4; diff --git a/tests/baselines/reference/augmentedTypesClass2a.js b/tests/baselines/reference/augmentedTypesClass2a.js index fe31f0964c2..b2c6fa1e373 100644 --- a/tests/baselines/reference/augmentedTypesClass2a.js +++ b/tests/baselines/reference/augmentedTypesClass2a.js @@ -9,11 +9,8 @@ var c2 = () => { } var c2 = (function () { function c2() { } - c2.prototype.foo = function () { - }; + c2.prototype.foo = function () { }; return c2; })(); // error -function c2() { -} // error -var c2 = function () { -}; +function c2() { } // error +var c2 = function () { }; diff --git a/tests/baselines/reference/augmentedTypesClass3.js b/tests/baselines/reference/augmentedTypesClass3.js index b42d9dda356..11d3f0a0d9f 100644 --- a/tests/baselines/reference/augmentedTypesClass3.js +++ b/tests/baselines/reference/augmentedTypesClass3.js @@ -18,15 +18,13 @@ class c5c { public foo() { } } var c5 = (function () { function c5() { } - c5.prototype.foo = function () { - }; + c5.prototype.foo = function () { }; return c5; })(); var c5a = (function () { function c5a() { } - c5a.prototype.foo = function () { - }; + c5a.prototype.foo = function () { }; return c5a; })(); var c5a; @@ -36,8 +34,7 @@ var c5a; var c5b = (function () { function c5b() { } - c5b.prototype.foo = function () { - }; + c5b.prototype.foo = function () { }; return c5b; })(); var c5b; @@ -48,8 +45,7 @@ var c5b; var c5c = (function () { function c5c() { } - c5c.prototype.foo = function () { - }; + c5c.prototype.foo = function () { }; return c5c; })(); //import c5c = require(''); diff --git a/tests/baselines/reference/augmentedTypesClass4.js b/tests/baselines/reference/augmentedTypesClass4.js index 71fc61d6659..f178567d843 100644 --- a/tests/baselines/reference/augmentedTypesClass4.js +++ b/tests/baselines/reference/augmentedTypesClass4.js @@ -9,14 +9,12 @@ class c3 { public bar() { } } // error var c3 = (function () { function c3() { } - c3.prototype.foo = function () { - }; + c3.prototype.foo = function () { }; return c3; })(); // error var c3 = (function () { function c3() { } - c3.prototype.bar = function () { - }; + c3.prototype.bar = function () { }; return c3; })(); // error diff --git a/tests/baselines/reference/augmentedTypesEnum.js b/tests/baselines/reference/augmentedTypesEnum.js index 484b0addd58..cb1ec3e844f 100644 --- a/tests/baselines/reference/augmentedTypesEnum.js +++ b/tests/baselines/reference/augmentedTypesEnum.js @@ -47,14 +47,12 @@ var e2; (function (e2) { e2[e2["One"] = 0] = "One"; })(e2 || (e2 = {})); // error -function e2() { -} // error +function e2() { } // error var e3; (function (e3) { e3[e3["One"] = 0] = "One"; })(e3 || (e3 = {})); // error -var e3 = function () { -}; // error +var e3 = function () { }; // error // enum then class var e4; (function (e4) { @@ -63,8 +61,7 @@ var e4; var e4 = (function () { function e4() { } - e4.prototype.foo = function () { - }; + e4.prototype.foo = function () { }; return e4; })(); // error // enum then enum diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.js b/tests/baselines/reference/augmentedTypesExternalModule1.js index 69cc810668c..104559396cc 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.js +++ b/tests/baselines/reference/augmentedTypesExternalModule1.js @@ -9,8 +9,7 @@ define(["require", "exports"], function (require, exports) { var c5 = (function () { function c5() { } - c5.prototype.foo = function () { - }; + c5.prototype.foo = function () { }; return c5; })(); }); diff --git a/tests/baselines/reference/augmentedTypesFunction.js b/tests/baselines/reference/augmentedTypesFunction.js index 34567c77e8c..1cd1423b7c4 100644 --- a/tests/baselines/reference/augmentedTypesFunction.js +++ b/tests/baselines/reference/augmentedTypesFunction.js @@ -40,59 +40,46 @@ module y5c { export interface I { foo(): void } } // should be an error //// [augmentedTypesFunction.js] // function then var -function y1() { -} // error +function y1() { } // error var y1 = 1; // error // function then function -function y2() { -} // error -function y2() { -} // error -function y2a() { -} // error -var y2a = function () { -}; // error +function y2() { } // error +function y2() { } // error +function y2a() { } // error +var y2a = function () { }; // error // function then class -function y3() { -} // error +function y3() { } // error var y3 = (function () { function y3() { } return y3; })(); // error -function y3a() { -} // error +function y3a() { } // error var y3a = (function () { function y3a() { } - y3a.prototype.foo = function () { - }; + y3a.prototype.foo = function () { }; return y3a; })(); // error // function then enum -function y4() { -} // error +function y4() { } // error var y4; (function (y4) { y4[y4["One"] = 0] = "One"; })(y4 || (y4 = {})); // error // function then internal module -function y5() { -} -function y5a() { -} +function y5() { } +function y5a() { } var y5a; (function (y5a) { var y = 2; })(y5a || (y5a = {})); // should be an error -function y5b() { -} +function y5b() { } var y5b; (function (y5b) { y5b.y = 3; })(y5b || (y5b = {})); // should be an error -function y5c() { -} +function y5c() { } // function then import, messes with other errors //function y6() { } //import y6 = require(''); diff --git a/tests/baselines/reference/augmentedTypesModules.js b/tests/baselines/reference/augmentedTypesModules.js index 3b7544996a1..558ea6609f5 100644 --- a/tests/baselines/reference/augmentedTypesModules.js +++ b/tests/baselines/reference/augmentedTypesModules.js @@ -115,51 +115,43 @@ var m1d; var I = (function () { function I() { } - I.prototype.foo = function () { - }; + I.prototype.foo = function () { }; return I; })(); m1d.I = I; })(m1d || (m1d = {})); var m1d = 1; // error -function m2() { -} +function m2() { } ; // ok since the module is not instantiated var m2a; (function (m2a) { var y = 2; })(m2a || (m2a = {})); -function m2a() { -} +function m2a() { } ; // error since the module is instantiated var m2b; (function (m2b) { m2b.y = 2; })(m2b || (m2b = {})); -function m2b() { -} +function m2b() { } ; // error since the module is instantiated // should be errors to have function first -function m2c() { -} +function m2c() { } ; var m2c; (function (m2c) { m2c.y = 2; })(m2c || (m2c = {})); -function m2f() { -} +function m2f() { } ; -function m2g() { -} +function m2g() { } ; var m2g; (function (m2g) { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); m2g.C = C; @@ -176,15 +168,13 @@ var m3a; var m3a = (function () { function m3a() { } - m3a.prototype.foo = function () { - }; + m3a.prototype.foo = function () { }; return m3a; })(); // error, class isn't ambient or declared before the module var m3b = (function () { function m3b() { } - m3b.prototype.foo = function () { - }; + m3b.prototype.foo = function () { }; return m3b; })(); var m3b; @@ -194,8 +184,7 @@ var m3b; var m3c = (function () { function m3c() { } - m3c.prototype.foo = function () { - }; + m3c.prototype.foo = function () { }; return m3c; })(); var m3c; @@ -215,8 +204,7 @@ var m3g; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); m3g.C = C; @@ -249,8 +237,7 @@ var m4d; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); })(m4d || (m4d = {})); diff --git a/tests/baselines/reference/augmentedTypesModules2.js b/tests/baselines/reference/augmentedTypesModules2.js index 70fd31f03e0..5cc805a848f 100644 --- a/tests/baselines/reference/augmentedTypesModules2.js +++ b/tests/baselines/reference/augmentedTypesModules2.js @@ -29,25 +29,21 @@ module m2g { export class C { foo() { } } } //// [augmentedTypesModules2.js] -function m2() { -} +function m2() { } ; // ok since the module is not instantiated var m2a; (function (m2a) { var y = 2; })(m2a || (m2a = {})); -function m2a() { -} +function m2a() { } ; // error since the module is instantiated var m2b; (function (m2b) { m2b.y = 2; })(m2b || (m2b = {})); -function m2b() { -} +function m2b() { } ; // error since the module is instantiated -function m2c() { -} +function m2c() { } ; var m2c; (function (m2c) { @@ -57,22 +53,18 @@ var m2cc; (function (m2cc) { m2cc.y = 2; })(m2cc || (m2cc = {})); -function m2cc() { -} +function m2cc() { } ; // error to have module first -function m2f() { -} +function m2f() { } ; -function m2g() { -} +function m2g() { } ; var m2g; (function (m2g) { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); m2g.C = C; diff --git a/tests/baselines/reference/augmentedTypesModules3.js b/tests/baselines/reference/augmentedTypesModules3.js index 7f5c390ea3a..fb1c7ef6e70 100644 --- a/tests/baselines/reference/augmentedTypesModules3.js +++ b/tests/baselines/reference/augmentedTypesModules3.js @@ -19,7 +19,6 @@ var m3a; var m3a = (function () { function m3a() { } - m3a.prototype.foo = function () { - }; + m3a.prototype.foo = function () { }; return m3a; })(); // error, class isn't ambient or declared before the module diff --git a/tests/baselines/reference/augmentedTypesModules3b.js b/tests/baselines/reference/augmentedTypesModules3b.js index 2d250ab2822..080a5e72ada 100644 --- a/tests/baselines/reference/augmentedTypesModules3b.js +++ b/tests/baselines/reference/augmentedTypesModules3b.js @@ -22,8 +22,7 @@ module m3g { export class C { foo() { } } } var m3b = (function () { function m3b() { } - m3b.prototype.foo = function () { - }; + m3b.prototype.foo = function () { }; return m3b; })(); var m3b; @@ -33,8 +32,7 @@ var m3b; var m3c = (function () { function m3c() { } - m3c.prototype.foo = function () { - }; + m3c.prototype.foo = function () { }; return m3c; })(); var m3c; @@ -54,8 +52,7 @@ var m3g; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); m3g.C = C; diff --git a/tests/baselines/reference/augmentedTypesModules4.js b/tests/baselines/reference/augmentedTypesModules4.js index f8407e2e36f..82f08851efd 100644 --- a/tests/baselines/reference/augmentedTypesModules4.js +++ b/tests/baselines/reference/augmentedTypesModules4.js @@ -51,8 +51,7 @@ var m4d; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); })(m4d || (m4d = {})); diff --git a/tests/baselines/reference/augmentedTypesVar.js b/tests/baselines/reference/augmentedTypesVar.js index f4404cecb3d..b4e412acc05 100644 --- a/tests/baselines/reference/augmentedTypesVar.js +++ b/tests/baselines/reference/augmentedTypesVar.js @@ -42,11 +42,9 @@ var x1 = 1; var x1 = 2; // var then function var x2 = 1; // error -function x2() { -} // error +function x2() { } // error var x3 = 1; -var x3 = function () { -}; // error +var x3 = function () { }; // error // var then class var x4 = 1; // error var x4 = (function () { @@ -58,8 +56,7 @@ var x4a = 1; // error var x4a = (function () { function x4a() { } - x4a.prototype.foo = function () { - }; + x4a.prototype.foo = function () { }; return x4a; })(); // error // var then enum diff --git a/tests/baselines/reference/autolift3.js b/tests/baselines/reference/autolift3.js index cc3bcaaae97..e04501daf46 100644 --- a/tests/baselines/reference/autolift3.js +++ b/tests/baselines/reference/autolift3.js @@ -33,8 +33,7 @@ b.foo(); //// [autolift3.js] var B = (function () { function B() { - function foo() { - } + function foo() { } foo(); var a = 0; var inner = (function () { diff --git a/tests/baselines/reference/baseTypeAfterDerivedType.js b/tests/baselines/reference/baseTypeAfterDerivedType.js index c64239ac0c8..65b73a17542 100644 --- a/tests/baselines/reference/baseTypeAfterDerivedType.js +++ b/tests/baselines/reference/baseTypeAfterDerivedType.js @@ -20,11 +20,6 @@ interface Base2 { var Derived2 = (function () { function Derived2() { } - Derived2.prototype.method = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i - 0] = arguments[_i]; - } - }; + Derived2.prototype.method = function () { }; return Derived2; })(); diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js index 69fe778c047..49bc535dbfe 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.js @@ -63,15 +63,9 @@ var r = true ? 1 : 2; var r3 = true ? 1 : {}; var r4 = true ? a : b; // typeof a var r5 = true ? b : a; // typeof b -var r6 = true ? function (x) { -} : function (x) { -}; // returns number => void -var r7 = true ? function (x) { -} : function (x) { -}; -var r8 = true ? function (x) { -} : function (x) { -}; // returns Object => void +var r6 = true ? function (x) { } : function (x) { }; // returns number => void +var r7 = true ? function (x) { } : function (x) { }; +var r8 = true ? function (x) { } : function (x) { }; // returns Object => void var r10 = true ? derived : derived2; // no error since we use the contextual type in BCT var r11 = true ? base : derived2; function foo5(t, u) { diff --git a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js index dafacc5cc50..3ee3f28ad9e 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/bitwiseNotOperatorWithAnyOtherType.js @@ -68,8 +68,7 @@ var ANY; var ANY1; var ANY2 = ["", ""]; var obj; -var obj1 = { x: "", y: function () { -} }; +var obj1 = { x: "", y: function () { } }; function foo() { var a; return a; diff --git a/tests/baselines/reference/callOverloads1.js b/tests/baselines/reference/callOverloads1.js index 86cb951f853..94397c4ef8e 100644 --- a/tests/baselines/reference/callOverloads1.js +++ b/tests/baselines/reference/callOverloads1.js @@ -22,8 +22,7 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { - }; + Foo.prototype.bar1 = function () { }; return Foo; })(); function F1(a) { diff --git a/tests/baselines/reference/callOverloads2.js b/tests/baselines/reference/callOverloads2.js index e3cbceb177a..ed1b9cfcac3 100644 --- a/tests/baselines/reference/callOverloads2.js +++ b/tests/baselines/reference/callOverloads2.js @@ -30,8 +30,7 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { - }; + Foo.prototype.bar1 = function () { }; return Foo; })(); function F1(s) { diff --git a/tests/baselines/reference/callOverloads3.js b/tests/baselines/reference/callOverloads3.js index 85c16fe85a6..3b615438ccd 100644 --- a/tests/baselines/reference/callOverloads3.js +++ b/tests/baselines/reference/callOverloads3.js @@ -23,8 +23,7 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { - }; + Foo.prototype.bar1 = function () { }; return Foo; })(); //class Foo(s: String); diff --git a/tests/baselines/reference/callOverloads4.js b/tests/baselines/reference/callOverloads4.js index 6aab555b721..529b63ad3b8 100644 --- a/tests/baselines/reference/callOverloads4.js +++ b/tests/baselines/reference/callOverloads4.js @@ -23,8 +23,7 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function () { - }; + Foo.prototype.bar1 = function () { }; return Foo; })(); var f1 = new Foo("hey"); diff --git a/tests/baselines/reference/callOverloads5.js b/tests/baselines/reference/callOverloads5.js index 2220568e4c2..dc508b3b8ed 100644 --- a/tests/baselines/reference/callOverloads5.js +++ b/tests/baselines/reference/callOverloads5.js @@ -24,8 +24,7 @@ var Foo = (function () { function Foo(x) { // WScript.Echo("Constructor function has executed"); } - Foo.prototype.bar1 = function (a) { - }; + Foo.prototype.bar1 = function (a) { }; return Foo; })(); //class Foo(s: String); diff --git a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js index 0f8a033067d..51afd6869d2 100644 --- a/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js +++ b/tests/baselines/reference/callSignatureWithOptionalParameterAndInitializer.js @@ -57,15 +57,9 @@ b.b(1); //// [callSignatureWithOptionalParameterAndInitializer.js] // Optional parameters cannot also have initializer expressions, these are all errors -function foo(x) { - if (x === void 0) { x = 1; } -} -var f = function foo(x) { - if (x === void 0) { x = 1; } -}; -var f2 = function (x, y) { - if (y === void 0) { y = 1; } -}; +function foo(x) { } +var f = function foo(x) { }; +var f2 = function (x, y) { }; foo(1); foo(); f(1); @@ -75,9 +69,7 @@ f2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { - if (x === void 0) { x = 1; } - }; + C.prototype.foo = function (x) { }; return C; })(); var c; @@ -94,15 +86,9 @@ a(1); a.foo(); a.foo(1); var b = { - foo: function (x) { - if (x === void 0) { x = 1; } - }, - a: function foo(x, y) { - if (y === void 0) { y = ''; } - }, - b: function (x) { - if (x === void 0) { x = ''; } - } + foo: function (x) { }, + a: function foo(x, y) { }, + b: function (x) { } }; b.foo(); b.foo(1); diff --git a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js index 6daa62f83a8..24c71c98505 100644 --- a/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js +++ b/tests/baselines/reference/callSignatureWithoutAnnotationsOrBody.js @@ -21,8 +21,7 @@ var r5 = a.f(); //// [callSignatureWithoutAnnotationsOrBody.js] // Call signatures without a return type annotation and function body return 'any' -function foo(x) { -} +function foo(x) { } var r = foo(1); // void since there's a body var i; var r2 = i(); diff --git a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js index 22b312e2570..5584dd7b216 100644 --- a/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js +++ b/tests/baselines/reference/callSignaturesWithAccessibilityModifiersOnParameters.js @@ -40,43 +40,27 @@ var b = { //// [callSignaturesWithAccessibilityModifiersOnParameters.js] // Call signature parameters do not allow accessibility modifiers -function foo(x, y) { -} -var f = function foo(x, y) { -}; -var f2 = function (x, y) { -}; -var f3 = function (x, y) { -}; -var f4 = function (x, y) { -}; -function foo2(x, y) { -} -var f5 = function foo(x, y) { -}; -var f6 = function (x, y) { -}; -var f7 = function (x, y) { -}; -var f8 = function (x, y) { -}; +function foo(x, y) { } +var f = function foo(x, y) { }; +var f2 = function (x, y) { }; +var f3 = function (x, y) { }; +var f4 = function (x, y) { }; +function foo2(x, y) { } +var f5 = function foo(x, y) { }; +var f6 = function (x, y) { }; +var f7 = function (x, y) { }; +var f8 = function (x, y) { }; var C = (function () { function C() { } - C.prototype.foo = function (x, y) { - }; - C.prototype.foo2 = function (x, y) { - }; - C.prototype.foo3 = function (x, y) { - }; + C.prototype.foo = function (x, y) { }; + C.prototype.foo2 = function (x, y) { }; + C.prototype.foo3 = function (x, y) { }; return C; })(); var a; var b = { - foo: function (x, y) { - }, - a: function foo(x, y) { - }, - b: function (x, y) { - } + foo: function (x, y) { }, + a: function foo(x, y) { }, + b: function (x, y) { } }; diff --git a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js index 49e20266dad..6ed7f6f7fe5 100644 --- a/tests/baselines/reference/callSignaturesWithDuplicateParameters.js +++ b/tests/baselines/reference/callSignaturesWithDuplicateParameters.js @@ -40,43 +40,27 @@ var b = { //// [callSignaturesWithDuplicateParameters.js] // Duplicate parameter names are always an error -function foo(x, x) { -} -var f = function foo(x, x) { -}; -var f2 = function (x, x) { -}; -var f3 = function (x, x) { -}; -var f4 = function (x, x) { -}; -function foo2(x, x) { -} -var f5 = function foo(x, x) { -}; -var f6 = function (x, x) { -}; -var f7 = function (x, x) { -}; -var f8 = function (x, y) { -}; +function foo(x, x) { } +var f = function foo(x, x) { }; +var f2 = function (x, x) { }; +var f3 = function (x, x) { }; +var f4 = function (x, x) { }; +function foo2(x, x) { } +var f5 = function foo(x, x) { }; +var f6 = function (x, x) { }; +var f7 = function (x, x) { }; +var f8 = function (x, y) { }; var C = (function () { function C() { } - C.prototype.foo = function (x, x) { - }; - C.prototype.foo2 = function (x, x) { - }; - C.prototype.foo3 = function (x, x) { - }; + C.prototype.foo = function (x, x) { }; + C.prototype.foo2 = function (x, x) { }; + C.prototype.foo3 = function (x, x) { }; return C; })(); var a; var b = { - foo: function (x, x) { - }, - a: function foo(x, x) { - }, - b: function (x, x) { - } + foo: function (x, x) { }, + a: function foo(x, x) { }, + b: function (x, x) { } }; diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters.js b/tests/baselines/reference/callSignaturesWithOptionalParameters.js index fa2126fb6c5..2f4876fb2de 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters.js @@ -57,12 +57,9 @@ b.b(1); //// [callSignaturesWithOptionalParameters.js] // Optional parameters should be valid in all the below casts -function foo(x) { -} -var f = function foo(x) { -}; -var f2 = function (x, y) { -}; +function foo(x) { } +var f = function foo(x) { }; +var f2 = function (x, y) { }; foo(1); foo(); f(1); @@ -72,8 +69,7 @@ f2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); var c; @@ -90,12 +86,9 @@ a(1); a.foo(); a.foo(1); var b = { - foo: function (x) { - }, - a: function foo(x, y) { - }, - b: function (x) { - } + foo: function (x) { }, + a: function foo(x, y) { }, + b: function (x) { } }; b.foo(); b.foo(1); diff --git a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js index 95ecb3a0e9c..a3fb2fe7a85 100644 --- a/tests/baselines/reference/callSignaturesWithOptionalParameters2.js +++ b/tests/baselines/reference/callSignaturesWithOptionalParameters2.js @@ -61,21 +61,17 @@ a.foo(1, 2, 3); //// [callSignaturesWithOptionalParameters2.js] // Optional parameters should be valid in all the below casts -function foo(x) { -} +function foo(x) { } foo(1); foo(); -function foo2(x, y) { -} +function foo2(x, y) { } foo2(1); foo2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; - C.prototype.foo2 = function (x, y) { - }; + C.prototype.foo = function (x) { }; + C.prototype.foo2 = function (x, y) { }; return C; })(); var c; diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers.js b/tests/baselines/reference/callSignaturesWithParameterInitializers.js index c95a558e4c8..ee51890a7b1 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers.js @@ -59,15 +59,9 @@ b.b(1); //// [callSignaturesWithParameterInitializers.js] // Optional parameters allow initializers only in implementation signatures -function foo(x) { - if (x === void 0) { x = 1; } -} -var f = function foo(x) { - if (x === void 0) { x = 1; } -}; -var f2 = function (x, y) { - if (y === void 0) { y = 1; } -}; +function foo(x) { } +var f = function foo(x) { }; +var f2 = function (x, y) { }; foo(1); foo(); f(1); @@ -77,9 +71,7 @@ f2(1, 2); var C = (function () { function C() { } - C.prototype.foo = function (x) { - if (x === void 0) { x = 1; } - }; + C.prototype.foo = function (x) { }; return C; })(); var c; @@ -97,15 +89,9 @@ a(1); a.foo(); a.foo(1); var b = { - foo: function (x) { - if (x === void 0) { x = 1; } - }, - a: function foo(x, y) { - if (y === void 0) { y = 1; } - }, - b: function (x) { - if (x === void 0) { x = 1; } - } + foo: function (x) { }, + a: function foo(x, y) { }, + b: function (x) { } }; b.foo(); b.foo(1); diff --git a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js index 0524db42f65..5c812d5ecfb 100644 --- a/tests/baselines/reference/callSignaturesWithParameterInitializers2.js +++ b/tests/baselines/reference/callSignaturesWithParameterInitializers2.js @@ -28,29 +28,21 @@ b.foo(1); //// [callSignaturesWithParameterInitializers2.js] // Optional parameters allow initializers only in implementation signatures // All the below declarations are errors -function foo(x) { - if (x === void 0) { x = 1; } -} +function foo(x) { } foo(1); foo(); var C = (function () { function C() { } - C.prototype.foo = function (x) { - if (x === void 0) { x = 1; } - }; + C.prototype.foo = function (x) { }; return C; })(); var c; c.foo(); c.foo(1); var b = { - foo: function (x) { - if (x === void 0) { x = 1; } - }, - foo: function (x) { - if (x === void 0) { x = 1; } - } + foo: function (x) { }, + foo: function (x) { } }; b.foo(); b.foo(1); diff --git a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js index f7bc46a7724..74ea401ae3b 100644 --- a/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js +++ b/tests/baselines/reference/callWithWrongNumberOfTypeArguments.js @@ -6,8 +6,7 @@ f(); f(); //// [callWithWrongNumberOfTypeArguments.js] -function f() { -} +function f() { } f(); f(); f(); diff --git a/tests/baselines/reference/captureThisInSuperCall.js b/tests/baselines/reference/captureThisInSuperCall.js index 3f60fcd3cb1..7200fabd8c4 100644 --- a/tests/baselines/reference/captureThisInSuperCall.js +++ b/tests/baselines/reference/captureThisInSuperCall.js @@ -26,7 +26,6 @@ var B = (function (_super) { var _this = this; _super.call(this, { test: function () { return _this.someMethod(); } }); } - B.prototype.someMethod = function () { - }; + B.prototype.someMethod = function () { }; return B; })(A); diff --git a/tests/baselines/reference/castExpressionParentheses.js b/tests/baselines/reference/castExpressionParentheses.js index 2b518226c60..ec18d6e373e 100644 --- a/tests/baselines/reference/castExpressionParentheses.js +++ b/tests/baselines/reference/castExpressionParentheses.js @@ -63,10 +63,8 @@ a().x; (typeof A).x; (-A).x; new (A()); -(function () { -})(); -(function foo() { -})(); +(function () { })(); +(function foo() { })(); (-A).x; // nested cast, should keep one pair of parenthese (-A).x; diff --git a/tests/baselines/reference/catch.js b/tests/baselines/reference/catch.js index c6b13cf4d68..d3babf1f31d 100644 --- a/tests/baselines/reference/catch.js +++ b/tests/baselines/reference/catch.js @@ -7,12 +7,8 @@ function f() { //// [catch.js] function f() { - try { - } - catch (e) { - } - try { - } - catch (e) { - } + try { } + catch (e) { } + try { } + catch (e) { } } diff --git a/tests/baselines/reference/chainedImportAlias.js b/tests/baselines/reference/chainedImportAlias.js index f2b3c6c6cff..077a92d7450 100644 --- a/tests/baselines/reference/chainedImportAlias.js +++ b/tests/baselines/reference/chainedImportAlias.js @@ -14,8 +14,7 @@ y.m.foo(); //// [chainedImportAlias_file0.js] var m; (function (m) { - function foo() { - } + function foo() { } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [chainedImportAlias_file1.js] diff --git a/tests/baselines/reference/classBodyWithStatements.js b/tests/baselines/reference/classBodyWithStatements.js index bae4860f722..2324fe0d791 100644 --- a/tests/baselines/reference/classBodyWithStatements.js +++ b/tests/baselines/reference/classBodyWithStatements.js @@ -25,8 +25,7 @@ var C2 = (function () { } return C2; })(); -function foo() { -} +function foo() { } var x = 1; var y = 2; var C3 = (function () { diff --git a/tests/baselines/reference/classExtendingClass.js b/tests/baselines/reference/classExtendingClass.js index 6c7d9fe679b..130bf5818ee 100644 --- a/tests/baselines/reference/classExtendingClass.js +++ b/tests/baselines/reference/classExtendingClass.js @@ -41,10 +41,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.thing = function () { - }; - C.other = function () { - }; + C.prototype.thing = function () { }; + C.other = function () { }; return C; })(); var D = (function (_super) { @@ -62,10 +60,8 @@ var r4 = D.other(); var C2 = (function () { function C2() { } - C2.prototype.thing = function (x) { - }; - C2.other = function (x) { - }; + C2.prototype.thing = function (x) { }; + C2.other = function (x) { }; return C2; })(); var D2 = (function (_super) { diff --git a/tests/baselines/reference/classExtendingPrimitive.js b/tests/baselines/reference/classExtendingPrimitive.js index b69bc3403f4..81301818918 100644 --- a/tests/baselines/reference/classExtendingPrimitive.js +++ b/tests/baselines/reference/classExtendingPrimitive.js @@ -69,8 +69,7 @@ var C5a = (function () { return C5a; })(); null; -{ -} +{ } var C6 = (function (_super) { __extends(C6, _super); function C6() { diff --git a/tests/baselines/reference/classExtendingPrimitive2.js b/tests/baselines/reference/classExtendingPrimitive2.js index 9a507934455..06b481dbbf4 100644 --- a/tests/baselines/reference/classExtendingPrimitive2.js +++ b/tests/baselines/reference/classExtendingPrimitive2.js @@ -18,5 +18,4 @@ var C5a = (function () { return C5a; })(); null; -{ -} +{ } diff --git a/tests/baselines/reference/classExtendsEveryObjectType.js b/tests/baselines/reference/classExtendsEveryObjectType.js index 2adb974bb28..2ae7ea71cea 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.js +++ b/tests/baselines/reference/classExtendsEveryObjectType.js @@ -35,8 +35,7 @@ var C2 = (function () { } return C2; })(); -{ -} // error +{ } // error var x; var C3 = (function (_super) { __extends(C3, _super); @@ -56,8 +55,7 @@ var C4 = (function (_super) { } return C4; })(M); // error -function foo() { -} +function foo() { } var C5 = (function (_super) { __extends(C5, _super); function C5() { @@ -71,5 +69,4 @@ var C6 = (function () { return C6; })(); []; -{ -} // error +{ } // error diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.js b/tests/baselines/reference/classExtendsEveryObjectType2.js index f2bcb02fee4..7be13137766 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.js +++ b/tests/baselines/reference/classExtendsEveryObjectType2.js @@ -9,13 +9,11 @@ var C2 = (function () { } return C2; })(); -{ -} // error +{ } // error var C6 = (function () { function C6() { } return C6; })(); []; -{ -} // error +{ } // error diff --git a/tests/baselines/reference/classExtendsValidConstructorFunction.js b/tests/baselines/reference/classExtendsValidConstructorFunction.js index a0876e8f709..c2f0f17e534 100644 --- a/tests/baselines/reference/classExtendsValidConstructorFunction.js +++ b/tests/baselines/reference/classExtendsValidConstructorFunction.js @@ -12,8 +12,7 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function foo() { -} +function foo() { } var x = new foo(); // can be used as a constructor function var C = (function (_super) { __extends(C, _super); diff --git a/tests/baselines/reference/classImplementsImportedInterface.js b/tests/baselines/reference/classImplementsImportedInterface.js index c76a026b58a..a2af2083a2a 100644 --- a/tests/baselines/reference/classImplementsImportedInterface.js +++ b/tests/baselines/reference/classImplementsImportedInterface.js @@ -18,8 +18,7 @@ var M2; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/classMethodWithKeywordName1.js b/tests/baselines/reference/classMethodWithKeywordName1.js index 9b6b7595f04..ba5bb72632a 100644 --- a/tests/baselines/reference/classMethodWithKeywordName1.js +++ b/tests/baselines/reference/classMethodWithKeywordName1.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.try = function () { - }; + C.try = function () { }; return C; })(); diff --git a/tests/baselines/reference/classOrder2.js b/tests/baselines/reference/classOrder2.js index 179be456028..0ba1e016bc8 100644 --- a/tests/baselines/reference/classOrder2.js +++ b/tests/baselines/reference/classOrder2.js @@ -39,8 +39,7 @@ var A = (function (_super) { var B = (function () { function B() { } - B.prototype.bar = function () { - }; + B.prototype.bar = function () { }; return B; })(); var a = new A(); diff --git a/tests/baselines/reference/classOverloadForFunction.js b/tests/baselines/reference/classOverloadForFunction.js index 47c787986da..40f076b0f2c 100644 --- a/tests/baselines/reference/classOverloadForFunction.js +++ b/tests/baselines/reference/classOverloadForFunction.js @@ -10,5 +10,4 @@ var foo = (function () { return foo; })(); ; -function foo() { -} +function foo() { } diff --git a/tests/baselines/reference/classPropertyAsPrivate.js b/tests/baselines/reference/classPropertyAsPrivate.js index 8b59dcde771..fdb16620fac 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.js +++ b/tests/baselines/reference/classPropertyAsPrivate.js @@ -31,24 +31,20 @@ var C = (function () { get: function () { return null; }, - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; Object.defineProperty(C, "b", { get: function () { return null; }, - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); - C.foo = function () { - }; + C.foo = function () { }; return C; })(); var c; diff --git a/tests/baselines/reference/classPropertyAsProtected.js b/tests/baselines/reference/classPropertyAsProtected.js index ddb193f072a..d036319fe8f 100644 --- a/tests/baselines/reference/classPropertyAsProtected.js +++ b/tests/baselines/reference/classPropertyAsProtected.js @@ -31,24 +31,20 @@ var C = (function () { get: function () { return null; }, - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; Object.defineProperty(C, "b", { get: function () { return null; }, - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); - C.foo = function () { - }; + C.foo = function () { }; return C; })(); var c; diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.js b/tests/baselines/reference/classPropertyIsPublicByDefault.js index db1eca56c11..fefa48be10a 100644 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.js +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.js @@ -30,24 +30,20 @@ var C = (function () { get: function () { return null; }, - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; Object.defineProperty(C, "b", { get: function () { return null; }, - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); - C.foo = function () { - }; + C.foo = function () { }; return C; })(); var c; diff --git a/tests/baselines/reference/classWithEmptyBody.js b/tests/baselines/reference/classWithEmptyBody.js index b4129162a0b..16c50ccec77 100644 --- a/tests/baselines/reference/classWithEmptyBody.js +++ b/tests/baselines/reference/classWithEmptyBody.js @@ -30,8 +30,7 @@ var c; var o = c; c = 1; c = { foo: '' }; -c = function () { -}; +c = function () { }; var D = (function () { function D() { return 1; @@ -42,5 +41,4 @@ var d; var o = d; d = 1; d = { foo: '' }; -d = function () { -}; +d = function () { }; diff --git a/tests/baselines/reference/classWithMultipleBaseClasses.js b/tests/baselines/reference/classWithMultipleBaseClasses.js index c6900f526cb..0e101d61dc9 100644 --- a/tests/baselines/reference/classWithMultipleBaseClasses.js +++ b/tests/baselines/reference/classWithMultipleBaseClasses.js @@ -28,23 +28,19 @@ interface I extends A, B { var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { - }; + B.prototype.bar = function () { }; return B; })(); var D = (function () { function D() { } - D.prototype.baz = function () { - }; - D.prototype.bat = function () { - }; + D.prototype.baz = function () { }; + D.prototype.bat = function () { }; return D; })(); diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js index acb802d0f97..e39391be68d 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.js @@ -37,8 +37,7 @@ var C = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js index 1048c2e5124..b7aa9d52332 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.js @@ -39,8 +39,7 @@ var C = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classWithOptionalParameter.js b/tests/baselines/reference/classWithOptionalParameter.js index 082e624916a..2f11f15febe 100644 --- a/tests/baselines/reference/classWithOptionalParameter.js +++ b/tests/baselines/reference/classWithOptionalParameter.js @@ -16,14 +16,12 @@ class C2 { var C = (function () { function C() { } - C.prototype.f = function () { - }; + C.prototype.f = function () { }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.f = function (x) { - }; + C2.prototype.f = function (x) { }; return C2; })(); diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js index f8cb9bf4c5b..4ac6548483e 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName.js @@ -9,7 +9,6 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function (x) { - }; + C.prototype.bar = function (x) { }; return C; })(); diff --git a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js index 5caba8f3fd5..fd28ae3d9eb 100644 --- a/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/classWithOverloadImplementationOfWrongName2.js @@ -9,7 +9,6 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function (x) { - }; + C.prototype.bar = function (x) { }; return C; })(); diff --git a/tests/baselines/reference/classWithStaticMembers.js b/tests/baselines/reference/classWithStaticMembers.js index 2cded4b1f2e..0d3747dc313 100644 --- a/tests/baselines/reference/classWithStaticMembers.js +++ b/tests/baselines/reference/classWithStaticMembers.js @@ -38,8 +38,7 @@ var C = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 859476c0dad..e9253b61cac 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -103,8 +103,7 @@ var __extends = this.__extends || function (d, b) { var a = (function () { function a(ns) { } - a.prototype.pgF = function () { - }; + a.prototype.pgF = function () { }; Object.defineProperty(a.prototype, "d", { get: function () { return 30; diff --git a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js index 9772af20434..c877de38a00 100644 --- a/tests/baselines/reference/cloduleAcrossModuleDefinitions.js +++ b/tests/baselines/reference/cloduleAcrossModuleDefinitions.js @@ -21,10 +21,8 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { - }; - B.bar = function () { - }; + B.prototype.foo = function () { }; + B.bar = function () { }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/cloduleTest1.js b/tests/baselines/reference/cloduleTest1.js index f79f1e5c46f..9e7edc77c71 100644 --- a/tests/baselines/reference/cloduleTest1.js +++ b/tests/baselines/reference/cloduleTest1.js @@ -14,8 +14,7 @@ //// [cloduleTest1.js] var $; (function ($) { - function ajax(options) { - } + function ajax(options) { } $.ajax = ajax; })($ || ($ = {})); var it = $('.foo').addClass('bar'); diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.js b/tests/baselines/reference/cloduleWithDuplicateMember1.js index ed4d69545fc..d64da830598 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.js @@ -33,8 +33,7 @@ var C = (function () { enumerable: true, configurable: true }); - C.foo = function () { - }; + C.foo = function () { }; return C; })(); var C; @@ -43,10 +42,8 @@ var C; })(C || (C = {})); var C; (function (C) { - function foo() { - } + function foo() { } C.foo = foo; - function x() { - } + function x() { } C.x = x; })(C || (C = {})); diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.js b/tests/baselines/reference/cloduleWithDuplicateMember2.js index 461930c02ae..c16c6c9af8a 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.js +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.js @@ -16,14 +16,12 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "x", { - set: function (y) { - }, + set: function (y) { }, enumerable: true, configurable: true }); Object.defineProperty(C, "y", { - set: function (z) { - }, + set: function (z) { }, enumerable: true, configurable: true }); @@ -35,7 +33,6 @@ var C; })(C || (C = {})); var C; (function (C) { - function x() { - } + function x() { } C.x = x; })(C || (C = {})); diff --git a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js index bb1c0e7845b..81e1ce4421b 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithFunctionChildren.js @@ -23,9 +23,7 @@ module M { var M; (function (_M) { _M.x = 3; - function fn(M, p) { - if (p === void 0) { p = _M.x; } - } + function fn(M, p) { } })(M || (M = {})); var M; (function (_M) { diff --git a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js index 56efb2dcc02..5bdd555b0ca 100644 --- a/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js +++ b/tests/baselines/reference/collisionCodeGenModuleWithMethodChildren.js @@ -39,9 +39,7 @@ var M; var c = (function () { function c() { } - c.prototype.fn = function (M, p) { - if (p === void 0) { p = _M.x; } - }; + c.prototype.fn = function (M, p) { }; return c; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/commentEmitAtEndOfFile1.js b/tests/baselines/reference/commentEmitAtEndOfFile1.js index 1a1f7cb8900..1be031fa84a 100644 --- a/tests/baselines/reference/commentEmitAtEndOfFile1.js +++ b/tests/baselines/reference/commentEmitAtEndOfFile1.js @@ -16,7 +16,6 @@ var f = ''; // test #2 var foo; (function (foo) { - function bar() { - } + function bar() { } })(foo || (foo = {})); // test #4 diff --git a/tests/baselines/reference/commentInMethodCall.js b/tests/baselines/reference/commentInMethodCall.js index 0f304df0b35..4ad2fc552d7 100644 --- a/tests/baselines/reference/commentInMethodCall.js +++ b/tests/baselines/reference/commentInMethodCall.js @@ -8,5 +8,4 @@ s.map(// do something //// [commentInMethodCall.js] //commment here var s; -s.map(function () { -}); +s.map(function () { }); diff --git a/tests/baselines/reference/commentOnClassAccessor2.js b/tests/baselines/reference/commentOnClassAccessor2.js index c85d17e6e19..e75431a7280 100644 --- a/tests/baselines/reference/commentOnClassAccessor2.js +++ b/tests/baselines/reference/commentOnClassAccessor2.js @@ -25,8 +25,7 @@ var C = (function () { /** * Setter. */ - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/commentsOnObjectLiteral3.js b/tests/baselines/reference/commentsOnObjectLiteral3.js index 5d57b76991e..49f2a6ffbf9 100644 --- a/tests/baselines/reference/commentsOnObjectLiteral3.js +++ b/tests/baselines/reference/commentsOnObjectLiteral3.js @@ -27,8 +27,7 @@ var v = { func: function () { }, //PropertyName + CallSignature - func1: function () { - }, + func1: function () { }, //getter get a() { return this.prop; diff --git a/tests/baselines/reference/compoundAssignmentLHSIsValue.js b/tests/baselines/reference/compoundAssignmentLHSIsValue.js index 5cefd44e1c5..d85d053f8eb 100644 --- a/tests/baselines/reference/compoundAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundAssignmentLHSIsValue.js @@ -213,17 +213,13 @@ var Derived = (function (_super) { return Derived; })(C); // function expression -function bar1() { -} +function bar1() { } value; -function bar2() { -} +function bar2() { } value; -(function () { -}); +(function () { }); value; -(function () { -}); +(function () { }); value; // function calls foo() *= value; @@ -253,9 +249,7 @@ foo() += value; ({}) += value; ([]) *= value; ([]) += value; -(function baz1() { -}) *= value; -(function baz2() { -}) += value; +(function baz1() { }) *= value; +(function baz2() { }) += value; (foo()) *= value; (foo()) += value; diff --git a/tests/baselines/reference/computedPropertyNames1.js b/tests/baselines/reference/computedPropertyNames1.js index 8f3e448d698..4f0bcb3a8f4 100644 --- a/tests/baselines/reference/computedPropertyNames1.js +++ b/tests/baselines/reference/computedPropertyNames1.js @@ -9,6 +9,5 @@ var v = { get [0 + 1]() { return 0; }, - set [0 + 1](v) { - } //No error + set [0 + 1](v) { } //No error }; diff --git a/tests/baselines/reference/computedPropertyNames10.js b/tests/baselines/reference/computedPropertyNames10.js index 138cbd7a4b2..eb8db65dba5 100644 --- a/tests/baselines/reference/computedPropertyNames10.js +++ b/tests/baselines/reference/computedPropertyNames10.js @@ -21,26 +21,15 @@ var s; var n; var a; var v = { - [s]() { - }, - [n]() { - }, - [s + s]() { - }, - [s + n]() { - }, - [+s]() { - }, - [""]() { - }, - [0]() { - }, - [a]() { - }, - [true]() { - }, - [`hello bye`]() { - }, - [`hello ${a} bye`]() { - } + [s]() { }, + [n]() { }, + [s + s]() { }, + [s + n]() { }, + [+s]() { }, + [""]() { }, + [0]() { }, + [a]() { }, + [true]() { }, + [`hello bye`]() { }, + [`hello ${a} bye`]() { } }; diff --git a/tests/baselines/reference/computedPropertyNames11.js b/tests/baselines/reference/computedPropertyNames11.js index d82a7c4e512..206fce0d76f 100644 --- a/tests/baselines/reference/computedPropertyNames11.js +++ b/tests/baselines/reference/computedPropertyNames11.js @@ -24,28 +24,23 @@ var v = { get [s]() { return 0; }, - set [n](v) { - }, + set [n](v) { }, get [s + s]() { return 0; }, - set [s + n](v) { - }, + set [s + n](v) { }, get [+s]() { return 0; }, - set [""](v) { - }, + set [""](v) { }, get [0]() { return 0; }, - set [a](v) { - }, + set [a](v) { }, get [true]() { return 0; }, - set [`hello bye`](v) { - }, + set [`hello bye`](v) { }, get [`hello ${a} bye`]() { return 0; } diff --git a/tests/baselines/reference/computedPropertyNames13.js b/tests/baselines/reference/computedPropertyNames13.js index ea531a9c644..0456e32602f 100644 --- a/tests/baselines/reference/computedPropertyNames13.js +++ b/tests/baselines/reference/computedPropertyNames13.js @@ -23,27 +23,16 @@ var a; var C = (function () { function C() { } - C.prototype[s] = function () { - }; - C.prototype[n] = function () { - }; - C[s + s] = function () { - }; - C.prototype[s + n] = function () { - }; - C.prototype[+s] = function () { - }; - C[""] = function () { - }; - C.prototype[0] = function () { - }; - C.prototype[a] = function () { - }; - C[true] = function () { - }; - C.prototype[`hello bye`] = function () { - }; - C[`hello ${a} bye`] = function () { - }; + C.prototype[s] = function () { }; + C.prototype[n] = function () { }; + C[s + s] = function () { }; + C.prototype[s + n] = function () { }; + C.prototype[+s] = function () { }; + C[""] = function () { }; + C.prototype[0] = function () { }; + C.prototype[a] = function () { }; + C[true] = function () { }; + C.prototype[`hello bye`] = function () { }; + C[`hello ${a} bye`] = function () { }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames14.js b/tests/baselines/reference/computedPropertyNames14.js index aa551795da6..a0b39a5e143 100644 --- a/tests/baselines/reference/computedPropertyNames14.js +++ b/tests/baselines/reference/computedPropertyNames14.js @@ -14,17 +14,11 @@ var b; var C = (function () { function C() { } - C.prototype[b] = function () { - }; - C[true] = function () { - }; - C.prototype[[]] = function () { - }; - C[{}] = function () { - }; - C.prototype[undefined] = function () { - }; - C[null] = function () { - }; + C.prototype[b] = function () { }; + C[true] = function () { }; + C.prototype[[]] = function () { }; + C[{}] = function () { }; + C.prototype[undefined] = function () { }; + C[null] = function () { }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames15.js b/tests/baselines/reference/computedPropertyNames15.js index 1b506bbeb90..429b23614ab 100644 --- a/tests/baselines/reference/computedPropertyNames15.js +++ b/tests/baselines/reference/computedPropertyNames15.js @@ -15,11 +15,8 @@ var p3; var C = (function () { function C() { } - C.prototype[p1] = function () { - }; - C.prototype[p2] = function () { - }; - C.prototype[p3] = function () { - }; + C.prototype[p1] = function () { }; + C.prototype[p2] = function () { }; + C.prototype[p3] = function () { }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames16.js b/tests/baselines/reference/computedPropertyNames16.js index 295deb9ee82..9a55c3f9ed5 100644 --- a/tests/baselines/reference/computedPropertyNames16.js +++ b/tests/baselines/reference/computedPropertyNames16.js @@ -31,8 +31,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, n, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -44,8 +43,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, s + n, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -57,8 +55,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C, "", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -70,8 +67,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, a, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -83,8 +79,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, `hello bye`, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames17.js b/tests/baselines/reference/computedPropertyNames17.js index 5a55dbf7e1b..026671ed8a6 100644 --- a/tests/baselines/reference/computedPropertyNames17.js +++ b/tests/baselines/reference/computedPropertyNames17.js @@ -22,8 +22,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C, true, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -35,8 +34,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, {}, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -48,8 +46,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, null, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames2.js b/tests/baselines/reference/computedPropertyNames2.js index 78d53ef94fc..737ec08c207 100644 --- a/tests/baselines/reference/computedPropertyNames2.js +++ b/tests/baselines/reference/computedPropertyNames2.js @@ -16,31 +16,25 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function () { - }; - C[methodName] = function () { - }; + C.prototype[methodName] = function () { }; + C[methodName] = function () { }; Object.defineProperty(C.prototype, accessorName, { - get: function () { - }, + get: function () { }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, accessorName, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - get: function () { - }, + get: function () { }, enumerable: true, configurable: true }); Object.defineProperty(C, accessorName, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames21.js b/tests/baselines/reference/computedPropertyNames21.js index 250d9142aa5..d5ca1422a5e 100644 --- a/tests/baselines/reference/computedPropertyNames21.js +++ b/tests/baselines/reference/computedPropertyNames21.js @@ -13,7 +13,6 @@ var C = (function () { C.prototype.bar = function () { return 0; }; - C.prototype[this.bar()] = function () { - }; + C.prototype[this.bar()] = function () { }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames22.js b/tests/baselines/reference/computedPropertyNames22.js index b42946536d0..dc6a53ff91a 100644 --- a/tests/baselines/reference/computedPropertyNames22.js +++ b/tests/baselines/reference/computedPropertyNames22.js @@ -14,8 +14,7 @@ var C = (function () { } C.prototype.bar = function () { var obj = { - [this.bar()]() { - } + [this.bar()]() { } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames23.js b/tests/baselines/reference/computedPropertyNames23.js index 9d71ef34c1e..bd94501b577 100644 --- a/tests/baselines/reference/computedPropertyNames23.js +++ b/tests/baselines/reference/computedPropertyNames23.js @@ -15,7 +15,6 @@ var C = (function () { C.prototype.bar = function () { return 0; }; - C.prototype[{ [this.bar()]: 1 }[0]] = function () { - }; + C.prototype[{ [this.bar()]: 1 }[0]] = function () { }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames24.js b/tests/baselines/reference/computedPropertyNames24.js index 2ef2826ee22..389743497a9 100644 --- a/tests/baselines/reference/computedPropertyNames24.js +++ b/tests/baselines/reference/computedPropertyNames24.js @@ -32,7 +32,6 @@ var C = (function (_super) { } // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. - C.prototype[super.bar.call(this)] = function () { - }; + C.prototype[super.bar.call(this)] = function () { }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames25.js b/tests/baselines/reference/computedPropertyNames25.js index a15fcb217e7..8252fdce7f2 100644 --- a/tests/baselines/reference/computedPropertyNames25.js +++ b/tests/baselines/reference/computedPropertyNames25.js @@ -35,8 +35,7 @@ var C = (function (_super) { } C.prototype.foo = function () { var obj = { - [_super.prototype.bar.call(this)]() { - } + [_super.prototype.bar.call(this)]() { } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames26.js b/tests/baselines/reference/computedPropertyNames26.js index 96760fc279c..c19137ce32b 100644 --- a/tests/baselines/reference/computedPropertyNames26.js +++ b/tests/baselines/reference/computedPropertyNames26.js @@ -34,7 +34,6 @@ var C = (function (_super) { } // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. - C.prototype[{ [super.bar.call(this)]: 1 }[0]] = function () { - }; + C.prototype[{ [super.bar.call(this)]: 1 }[0]] = function () { }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames27.js b/tests/baselines/reference/computedPropertyNames27.js index 71db977e9b6..1cae552689b 100644 --- a/tests/baselines/reference/computedPropertyNames27.js +++ b/tests/baselines/reference/computedPropertyNames27.js @@ -22,7 +22,6 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype[(_super.call(this), "prop")] = function () { - }; + C.prototype[(_super.call(this), "prop")] = function () { }; return C; })(Base); diff --git a/tests/baselines/reference/computedPropertyNames28.js b/tests/baselines/reference/computedPropertyNames28.js index 96c7cd082f1..0a3985a640c 100644 --- a/tests/baselines/reference/computedPropertyNames28.js +++ b/tests/baselines/reference/computedPropertyNames28.js @@ -27,8 +27,7 @@ var C = (function (_super) { function C() { _super.call(this); var obj = { - [(_super.call(this), "prop")]() { - } + [(_super.call(this), "prop")]() { } }; } return C; diff --git a/tests/baselines/reference/computedPropertyNames29.js b/tests/baselines/reference/computedPropertyNames29.js index 94e83f34629..50d050d888e 100644 --- a/tests/baselines/reference/computedPropertyNames29.js +++ b/tests/baselines/reference/computedPropertyNames29.js @@ -17,8 +17,7 @@ var C = (function () { C.prototype.bar = function () { (() => { var obj = { - [this.bar()]() { - } // needs capture + [this.bar()]() { } // needs capture }; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames3.js b/tests/baselines/reference/computedPropertyNames3.js index 969bbf96d86..19f938e32ad 100644 --- a/tests/baselines/reference/computedPropertyNames3.js +++ b/tests/baselines/reference/computedPropertyNames3.js @@ -14,32 +14,25 @@ var id; var C = (function () { function C() { } - C.prototype[0 + 1] = function () { - }; - C[() => { - }] = function () { - }; + C.prototype[0 + 1] = function () { }; + C[() => { }] = function () { }; Object.defineProperty(C.prototype, delete id, { - get: function () { - }, + get: function () { }, enumerable: true, configurable: true }); Object.defineProperty(C.prototype, [0, 1], { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); Object.defineProperty(C, "", { - get: function () { - }, + get: function () { }, enumerable: true, configurable: true }); Object.defineProperty(C, id.toString(), { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames30.js b/tests/baselines/reference/computedPropertyNames30.js index 608531ffb5b..ae2b24385f4 100644 --- a/tests/baselines/reference/computedPropertyNames30.js +++ b/tests/baselines/reference/computedPropertyNames30.js @@ -36,8 +36,7 @@ var C = (function (_super) { // Ideally, we would capture this. But the reference is // illegal, and not capturing this is consistent with //treatment of other similar violations. - [(_super.call(this), "prop")]() { - } + [(_super.call(this), "prop")]() { } }; }); } diff --git a/tests/baselines/reference/computedPropertyNames31.js b/tests/baselines/reference/computedPropertyNames31.js index 9a31b80e346..227f10e3bd4 100644 --- a/tests/baselines/reference/computedPropertyNames31.js +++ b/tests/baselines/reference/computedPropertyNames31.js @@ -39,8 +39,7 @@ var C = (function (_super) { var _this = this; (() => { var obj = { - [_super.prototype.bar.call(_this)]() { - } // needs capture + [_super.prototype.bar.call(_this)]() { } // needs capture }; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames32.js b/tests/baselines/reference/computedPropertyNames32.js index d3e98681369..9bc723581ef 100644 --- a/tests/baselines/reference/computedPropertyNames32.js +++ b/tests/baselines/reference/computedPropertyNames32.js @@ -17,7 +17,6 @@ var C = (function () { C.prototype.bar = function () { return 0; }; - C.prototype[foo()] = function () { - }; + C.prototype[foo()] = function () { }; return C; })(); diff --git a/tests/baselines/reference/computedPropertyNames33.js b/tests/baselines/reference/computedPropertyNames33.js index 554ec315897..43ceeb2b2fb 100644 --- a/tests/baselines/reference/computedPropertyNames33.js +++ b/tests/baselines/reference/computedPropertyNames33.js @@ -18,8 +18,7 @@ var C = (function () { } C.prototype.bar = function () { var obj = { - [foo()]() { - } + [foo()]() { } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames34.js b/tests/baselines/reference/computedPropertyNames34.js index f1d774139b1..12892eefe4f 100644 --- a/tests/baselines/reference/computedPropertyNames34.js +++ b/tests/baselines/reference/computedPropertyNames34.js @@ -18,8 +18,7 @@ var C = (function () { } C.bar = function () { var obj = { - [foo()]() { - } + [foo()]() { } }; return 0; }; diff --git a/tests/baselines/reference/computedPropertyNames36.js b/tests/baselines/reference/computedPropertyNames36.js index 7c731014d1e..5df5c503911 100644 --- a/tests/baselines/reference/computedPropertyNames36.js +++ b/tests/baselines/reference/computedPropertyNames36.js @@ -33,8 +33,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { - }, + set: function (p) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames37.js b/tests/baselines/reference/computedPropertyNames37.js index fb4c32909d5..540dfa27e1e 100644 --- a/tests/baselines/reference/computedPropertyNames37.js +++ b/tests/baselines/reference/computedPropertyNames37.js @@ -33,8 +33,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, "set1", { - set: function (p) { - }, + set: function (p) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames38.js b/tests/baselines/reference/computedPropertyNames38.js index 922244bfecf..fbbbe83ddc6 100644 --- a/tests/baselines/reference/computedPropertyNames38.js +++ b/tests/baselines/reference/computedPropertyNames38.js @@ -33,8 +33,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { - }, + set: function (p) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames39.js b/tests/baselines/reference/computedPropertyNames39.js index 62621f4e754..1d367c8d856 100644 --- a/tests/baselines/reference/computedPropertyNames39.js +++ b/tests/baselines/reference/computedPropertyNames39.js @@ -33,8 +33,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, 1 << 6, { - set: function (p) { - }, + set: function (p) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames43.js b/tests/baselines/reference/computedPropertyNames43.js index 22ac7774439..0e7c3b5dac1 100644 --- a/tests/baselines/reference/computedPropertyNames43.js +++ b/tests/baselines/reference/computedPropertyNames43.js @@ -48,8 +48,7 @@ var D = (function (_super) { configurable: true }); Object.defineProperty(D.prototype, "set1", { - set: function (p) { - }, + set: function (p) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames44.js b/tests/baselines/reference/computedPropertyNames44.js index c91a52e8199..37466dad602 100644 --- a/tests/baselines/reference/computedPropertyNames44.js +++ b/tests/baselines/reference/computedPropertyNames44.js @@ -46,8 +46,7 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { - }, + set: function (p) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames45.js b/tests/baselines/reference/computedPropertyNames45.js index 7ec3c165e12..69e0df349ca 100644 --- a/tests/baselines/reference/computedPropertyNames45.js +++ b/tests/baselines/reference/computedPropertyNames45.js @@ -47,8 +47,7 @@ var D = (function (_super) { _super.apply(this, arguments); } Object.defineProperty(D.prototype, "set1", { - set: function (p) { - }, + set: function (p) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNames9.js b/tests/baselines/reference/computedPropertyNames9.js index ede8bb3012b..c2e89cd3133 100644 --- a/tests/baselines/reference/computedPropertyNames9.js +++ b/tests/baselines/reference/computedPropertyNames9.js @@ -11,8 +11,7 @@ var v = { } //// [computedPropertyNames9.js] -function f(x) { -} +function f(x) { } var v = { [f("")]: 0, [f(0)]: 0, diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6.js b/tests/baselines/reference/computedPropertyNamesContextualType6.js index a92958871d9..20678a60658 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType6.js @@ -16,8 +16,7 @@ foo({ //// [computedPropertyNamesContextualType6.js] foo({ p: "", - 0: () => { - }, + 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0] diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7.js b/tests/baselines/reference/computedPropertyNamesContextualType7.js index 00103bc76db..a948c31d750 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType7.js @@ -16,8 +16,7 @@ foo({ //// [computedPropertyNamesContextualType7.js] foo({ p: "", - 0: () => { - }, + 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0] diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1.js index bc8b5d0e910..bbdb6cd7baf 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit1.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit1.js @@ -9,8 +9,7 @@ class C { var C = (function () { function C() { } - C.prototype["" + ""] = function () { - }; + C.prototype["" + ""] = function () { }; Object.defineProperty(C.prototype, "" + "", { get: function () { return 0; @@ -19,8 +18,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C.prototype, "" + "", { - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2.js index 647f3fab135..10313841c4f 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit2.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit2.js @@ -9,8 +9,7 @@ class C { var C = (function () { function C() { } - C["" + ""] = function () { - }; + C["" + ""] = function () { }; Object.defineProperty(C, "" + "", { get: function () { return 0; @@ -19,8 +18,7 @@ var C = (function () { configurable: true }); Object.defineProperty(C, "" + "", { - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5.js index d7ac3319eca..d59d84b9e72 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5.js @@ -9,13 +9,11 @@ var v = { //// [computedPropertyNamesDeclarationEmit5.js] var v = { ["" + ""]: 0, - ["" + ""]() { - }, + ["" + ""]() { }, get ["" + ""]() { return 0; }, - set ["" + ""](x) { - } + set ["" + ""](x) { } }; diff --git a/tests/baselines/reference/computedPropertyNamesOnOverloads.js b/tests/baselines/reference/computedPropertyNamesOnOverloads.js index 1db857620e9..4312e533318 100644 --- a/tests/baselines/reference/computedPropertyNamesOnOverloads.js +++ b/tests/baselines/reference/computedPropertyNamesOnOverloads.js @@ -13,7 +13,6 @@ var accessorName = "accessor"; var C = (function () { function C() { } - C.prototype[methodName] = function (v) { - }; + C.prototype[methodName] = function (v) { }; return C; })(); diff --git a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js index b628c21bd14..b2830e4d1d6 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js +++ b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.js @@ -77,8 +77,7 @@ var exprBoolean2; var exprNumber2; var exprString2; var exprIsObject2; -function foo() { -} +function foo() { } ; var C = (function () { function C() { diff --git a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js index e2029d1bf37..d8a36f9e09e 100644 --- a/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js +++ b/tests/baselines/reference/conditionallyDuplicateOverloadsCausedByOverloadResolution.js @@ -22,8 +22,7 @@ var out2 = foo2((x, y) => { //// [conditionallyDuplicateOverloadsCausedByOverloadResolution.js] var out = foo(function (x, y) { - function bar() { - } + function bar() { } return bar; }); var out2 = foo2(function (x, y) { diff --git a/tests/baselines/reference/conflictMarkerTrivia2.js b/tests/baselines/reference/conflictMarkerTrivia2.js index bbb631de388..bbf6726b994 100644 --- a/tests/baselines/reference/conflictMarkerTrivia2.js +++ b/tests/baselines/reference/conflictMarkerTrivia2.js @@ -20,7 +20,6 @@ var C = (function () { C.prototype.foo = function () { a(); }; - C.prototype.bar = function () { - }; + C.prototype.bar = function () { }; return C; })(); diff --git a/tests/baselines/reference/conflictingTypeAnnotatedVar.js b/tests/baselines/reference/conflictingTypeAnnotatedVar.js index b44dc6f1e33..283912c487b 100644 --- a/tests/baselines/reference/conflictingTypeAnnotatedVar.js +++ b/tests/baselines/reference/conflictingTypeAnnotatedVar.js @@ -5,7 +5,5 @@ function foo(): number { } //// [conflictingTypeAnnotatedVar.js] var foo; -function foo() { -} -function foo() { -} +function foo() { } +function foo() { } diff --git a/tests/baselines/reference/constDeclarations-access2.js b/tests/baselines/reference/constDeclarations-access2.js index fd51c932636..ae8dae70646 100644 --- a/tests/baselines/reference/constDeclarations-access2.js +++ b/tests/baselines/reference/constDeclarations-access2.js @@ -62,11 +62,9 @@ x--; ++((x)); // OK var a = x + 1; -function f(v) { -} +function f(v) { } f(x); -if (x) { -} +if (x) { } x; (x); -x; diff --git a/tests/baselines/reference/constDeclarations-access3.js b/tests/baselines/reference/constDeclarations-access3.js index 9ac4880bdd1..9140da965c3 100644 --- a/tests/baselines/reference/constDeclarations-access3.js +++ b/tests/baselines/reference/constDeclarations-access3.js @@ -71,11 +71,9 @@ M.x--; M["x"] = 0; // OK var a = M.x + 1; -function f(v) { -} +function f(v) { } f(M.x); -if (M.x) { -} +if (M.x) { } M.x; (M.x); -M.x; diff --git a/tests/baselines/reference/constDeclarations-access4.js b/tests/baselines/reference/constDeclarations-access4.js index b226e746bba..608d950526a 100644 --- a/tests/baselines/reference/constDeclarations-access4.js +++ b/tests/baselines/reference/constDeclarations-access4.js @@ -67,11 +67,9 @@ M.x--; M["x"] = 0; // OK var a = M.x + 1; -function f(v) { -} +function f(v) { } f(M.x); -if (M.x) { -} +if (M.x) { } M.x; (M.x); -M.x; diff --git a/tests/baselines/reference/constDeclarations-access5.js b/tests/baselines/reference/constDeclarations-access5.js index 7acc95ad055..71b8c99ae58 100644 --- a/tests/baselines/reference/constDeclarations-access5.js +++ b/tests/baselines/reference/constDeclarations-access5.js @@ -76,11 +76,9 @@ define(["require", "exports", 'constDeclarations_access_1'], function (require, m["x"] = 0; // OK var a = m.x + 1; - function f(v) { - } + function f(v) { } f(m.x); - if (m.x) { - } + if (m.x) { } m.x; (m.x); -m.x; diff --git a/tests/baselines/reference/constDeclarations-errors.js b/tests/baselines/reference/constDeclarations-errors.js index 0af646010f0..2947593b01d 100644 --- a/tests/baselines/reference/constDeclarations-errors.js +++ b/tests/baselines/reference/constDeclarations-errors.js @@ -23,14 +23,10 @@ const c1; const c2; const c3, c4, c5, c6; // error, missing initialicer // error, can not be unintalized -for (var c in {}) { -} +for (var c in {}) { } // error, assigning to a const -for (const c8 = 0; c8 < 1; c8++) { -} +for (const c8 = 0; c8 < 1; c8++) { } // error, can not be unintalized -for (const c9; c9 < 1;) { -} +for (const c9; c9 < 1;) { } // error, can not be unintalized -for (const c10 = 0, c11; c10 < 1;) { -} +for (const c10 = 0, c11; c10 < 1;) { } diff --git a/tests/baselines/reference/constantOverloadFunction.js b/tests/baselines/reference/constantOverloadFunction.js index 12e84e2077f..408b56805fb 100644 --- a/tests/baselines/reference/constantOverloadFunction.js +++ b/tests/baselines/reference/constantOverloadFunction.js @@ -23,8 +23,7 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); var Derived1 = (function (_super) { @@ -32,8 +31,7 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { - }; + Derived1.prototype.bar = function () { }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -41,8 +39,7 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { - }; + Derived2.prototype.baz = function () { }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -50,8 +47,7 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { - }; + Derived3.prototype.biz = function () { }; return Derived3; })(Base); function foo(tagName) { diff --git a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js index 563b73d7e5b..591d6171dbe 100644 --- a/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js +++ b/tests/baselines/reference/constantOverloadFunctionNoSubtypeError.js @@ -24,8 +24,7 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); var Derived1 = (function (_super) { @@ -33,8 +32,7 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { - }; + Derived1.prototype.bar = function () { }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -42,8 +40,7 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { - }; + Derived2.prototype.baz = function () { }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -51,8 +48,7 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { - }; + Derived3.prototype.biz = function () { }; return Derived3; })(Base); function foo(tagName) { diff --git a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js index 3d99e07bb5e..caeb2d32ee4 100644 --- a/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js +++ b/tests/baselines/reference/constraintCheckInGenericBaseTypeReference.js @@ -30,8 +30,7 @@ var __extends = this.__extends || function (d, b) { var Constraint = (function () { function Constraint() { } - Constraint.prototype.method = function () { - }; + Constraint.prototype.method = function () { }; return Constraint; })(); var GenericBase = (function () { diff --git a/tests/baselines/reference/constraintErrors1.js b/tests/baselines/reference/constraintErrors1.js index c8da89d574c..71723130b55 100644 --- a/tests/baselines/reference/constraintErrors1.js +++ b/tests/baselines/reference/constraintErrors1.js @@ -2,5 +2,4 @@ function foo5(test: T) { } //// [constraintErrors1.js] -function foo5(test) { -} +function foo5(test) { } diff --git a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js index 5f9e902141b..7850b0ebd01 100644 --- a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js +++ b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.js @@ -40,8 +40,7 @@ var i2: I2<{}>; //// [constraintSatisfactionWithEmptyObject.js] // valid uses of a basic object constraint, no errors expected // Object constraint -function foo(x) { -} +function foo(x) { } var r = foo({}); var a = {}; var r = foo({}); @@ -54,8 +53,7 @@ var C = (function () { var r2 = new C({}); var i; // {} constraint -function foo2(x) { -} +function foo2(x) { } var r = foo2({}); var a = {}; var r = foo2({}); diff --git a/tests/baselines/reference/constructorArgWithGenericCallSignature.js b/tests/baselines/reference/constructorArgWithGenericCallSignature.js index 5fa7c46124b..ca859869850 100644 --- a/tests/baselines/reference/constructorArgWithGenericCallSignature.js +++ b/tests/baselines/reference/constructorArgWithGenericCallSignature.js @@ -23,8 +23,7 @@ var Test; return MyClass; })(); Test.MyClass = MyClass; - function F(func) { - } + function F(func) { } Test.F = F; })(Test || (Test = {})); var func; diff --git a/tests/baselines/reference/constructorOverloads1.js b/tests/baselines/reference/constructorOverloads1.js index 2e6dda4bd20..97f33dca862 100644 --- a/tests/baselines/reference/constructorOverloads1.js +++ b/tests/baselines/reference/constructorOverloads1.js @@ -25,10 +25,8 @@ f1.bar2(); var Foo = (function () { function Foo(x) { } - Foo.prototype.bar1 = function () { - }; - Foo.prototype.bar2 = function () { - }; + Foo.prototype.bar1 = function () { }; + Foo.prototype.bar2 = function () { }; return Foo; })(); var f1 = new Foo("hey"); diff --git a/tests/baselines/reference/constructorOverloads2.js b/tests/baselines/reference/constructorOverloads2.js index 6ab367d8434..e3eae0ed5a9 100644 --- a/tests/baselines/reference/constructorOverloads2.js +++ b/tests/baselines/reference/constructorOverloads2.js @@ -35,8 +35,7 @@ var __extends = this.__extends || function (d, b) { var FooBase = (function () { function FooBase(x) { } - FooBase.prototype.bar1 = function () { - }; + FooBase.prototype.bar1 = function () { }; return FooBase; })(); var Foo = (function (_super) { @@ -44,8 +43,7 @@ var Foo = (function (_super) { function Foo(x, y) { _super.call(this, x); } - Foo.prototype.bar1 = function () { - }; + Foo.prototype.bar1 = function () { }; return Foo; })(FooBase); var f1 = new Foo("hey"); diff --git a/tests/baselines/reference/constructorOverloads3.js b/tests/baselines/reference/constructorOverloads3.js index 08f43cf9301..c54226745c2 100644 --- a/tests/baselines/reference/constructorOverloads3.js +++ b/tests/baselines/reference/constructorOverloads3.js @@ -33,8 +33,7 @@ var Foo = (function (_super) { __extends(Foo, _super); function Foo(x, y) { } - Foo.prototype.bar1 = function () { - }; + Foo.prototype.bar1 = function () { }; return Foo; })(FooBase); var f1 = new Foo("hey"); diff --git a/tests/baselines/reference/constructorReturnsInvalidType.js b/tests/baselines/reference/constructorReturnsInvalidType.js index 92afb41a3fe..7f6119cc8bd 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.js +++ b/tests/baselines/reference/constructorReturnsInvalidType.js @@ -14,8 +14,7 @@ var X = (function () { function X() { return 1; } - X.prototype.foo = function () { - }; + X.prototype.foo = function () { }; return X; })(); var x = new X(); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 5a9a03f293c..86338c1d913 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -413,16 +413,13 @@ var BasicFeatures = (function () { try { throw null; } - catch (Exception) { - } + catch (Exception) { } } try { } finally { - try { - } - catch (Exception) { - } + try { } + catch (Exception) { } } return retVal; }; @@ -435,10 +432,8 @@ var BasicFeatures = (function () { var c = new CLASS(); var xx = c; retVal += ; - try { - } - catch () { - } + try { } + catch () { } Property; retVal += c.Member(); retVal += xx.Foo() ? 0 : 1; @@ -552,8 +547,7 @@ rest: string[]; { & public; DefaultValue(value ? : string = "Hello"); - { - } + { } } var Weekdays; (function (Weekdays) { diff --git a/tests/baselines/reference/contextualTypeAppliedToVarArgs.js b/tests/baselines/reference/contextualTypeAppliedToVarArgs.js index c4e78318a9c..77ce90ec737 100644 --- a/tests/baselines/reference/contextualTypeAppliedToVarArgs.js +++ b/tests/baselines/reference/contextualTypeAppliedToVarArgs.js @@ -18,8 +18,7 @@ class Foo{ //// [contextualTypeAppliedToVarArgs.js] function delegate(instance, method, data) { - return function () { - }; + return function () { }; } var Foo = (function () { function Foo() { diff --git a/tests/baselines/reference/contextualTyping.js b/tests/baselines/reference/contextualTyping.js index 0abfa95e45b..46e09d7f9e5 100644 --- a/tests/baselines/reference/contextualTyping.js +++ b/tests/baselines/reference/contextualTyping.js @@ -352,8 +352,7 @@ objc8.t14 = ({ a: [] }); // CONTEXT: Function call -function c9t5(f) { -} +function c9t5(f) { } ; c9t5(function (n) { return ({}); diff --git a/tests/baselines/reference/contextualTyping.js.map b/tests/baselines/reference/contextualTyping.js.map index 14455bb0ba3..98c41439762 100644 --- a/tests/baselines/reference/contextualTyping.js.map +++ b/tests/baselines/reference/contextualTyping.js.map @@ -1,2 +1,2 @@ //// [contextualTyping.js.map] -{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":["C1T5","C1T5.constructor","C2T5","C4T5","C4T5.constructor","C5T5","c9t5","C11t5","C11t5.constructor","EF1","Point"],"mappings":"AAaA,AADA,sCAAsC;IAChC,IAAI;IAAVA,SAAMA,IAAIA;QACNC,QAAGA,GAAqCA,UAASA,CAACA;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IAADD,WAACA;AAADA,CAACA,AAJD,IAIC;AAGD,AADA,uCAAuC;AACvC,IAAO,IAAI,CAIV;AAJD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAGA,GAAqCA,UAASA,CAACA;QACzD,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EAJM,IAAI,KAAJ,IAAI,QAIV;AAGD,AADA,gCAAgC;IAC5B,IAAI,GAA0B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAGF,AADA,qCAAqC;IAC/B,IAAI;IAENC,SAFEA,IAAIA;QAGFC,IAAIA,CAACA,GAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;YACpB,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IACLD,WAACA;AAADA,CAACA,AAPD,IAOC;AAGD,AADA,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAqCA,CAACA;IACjDA,QAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EALM,IAAI,KAAJ,IAAI,QAKV;AAGD,AADA,+BAA+B;IAC3B,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAG9D,AADA,kCAAkC;IAC9B,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,AADA,yBAAyB;SAChB,IAAI,CAAC,CAAsB;AAAGC,CAACA;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAGH,AADA,4BAA4B;IACxB,KAAK,GAA8B;IAAa,MAAM,CAAC,UAAS,CAAC;QAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;IAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAG/F,AADA,0BAA0B;IACpB,KAAK;IAAGC,SAARA,KAAKA,CAAeA,CAAsBA;IAAIC,CAACA;IAACD,YAACA;AAADA,CAACA,AAAvD,IAAuD;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAGrD,AADA,qCAAqC;IACjC,KAAK,GAA2B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC;IAAIE,MAAMA,CAACA,CAACA,GAACA,CAACA,CAACA;AAACA,CAACA;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;IACfC,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IACXA,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IAEXA,MAAMA,CAACA,IAAIA,CAACA;AAChBA,CAACA;AAED,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} \ No newline at end of file +{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":["C1T5","C1T5.constructor","C2T5","C4T5","C4T5.constructor","C5T5","C11t5","C11t5.constructor","EF1","Point"],"mappings":"AAaA,AADA,sCAAsC;IAChC,IAAI;IAAVA,SAAMA,IAAIA;QACNC,QAAGA,GAAqCA,UAASA,CAACA;YAC9C,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IAADD,WAACA;AAADA,CAACA,AAJD,IAIC;AAGD,AADA,uCAAuC;AACvC,IAAO,IAAI,CAIV;AAJD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAGA,GAAqCA,UAASA,CAACA;QACzD,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EAJM,IAAI,KAAJ,IAAI,QAIV;AAGD,AADA,gCAAgC;IAC5B,IAAI,GAA0B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAGF,AADA,qCAAqC;IAC/B,IAAI;IAENC,SAFEA,IAAIA;QAGFC,IAAIA,CAACA,GAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;YACpB,MAAM,CAAC,CAAC,CAAC;QACb,CAAC,CAAAA;IACLA,CAACA;IACLD,WAACA;AAADA,CAACA,AAPD,IAOC;AAGD,AADA,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI,EAAC,CAAC;IACEE,QAAqCA,CAACA;IACjDA,QAAGA,GAAGA,UAASA,CAACA,EAAEA,CAACA;QACf,MAAM,CAAC,CAAC,CAAC;IACb,CAAC,CAAAA;AACLA,CAACA,EALM,IAAI,KAAJ,IAAI,QAKV;AAGD,AADA,+BAA+B;IAC3B,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAG9D,AADA,kCAAkC;IAC9B,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,AADA,yBAAyB;SAChB,IAAI,CAAC,CAAsB,KAAI;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,MAAM,CAAO,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAGH,AADA,4BAA4B;IACxB,KAAK,GAA8B;IAAa,MAAM,CAAC,UAAS,CAAC;QAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;IAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAG/F,AADA,0BAA0B;IACpB,KAAK;IAAGC,SAARA,KAAKA,CAAeA,CAAsBA;IAAIC,CAACA;IAACD,YAACA;AAADA,CAACA,AAAvD,IAAuD;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAGrD,AADA,qCAAqC;IACjC,KAAK,GAA2B,CAAC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB;IAAa,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAO,CAAC,EAAE,CAAC,CAAA;AAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ;IAAI,MAAM,CAAC,CAAC,CAAA;AAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC;IAAI,MAAM,CAAC,CAAC,CAAC;AAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC;QAAI,MAAM,CAAC,CAAC,CAAC;IAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC;IAAIE,MAAMA,CAACA,CAACA,GAACA,CAACA,CAACA;AAACA,CAACA;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;IACfC,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IACXA,IAAIA,CAACA,CAACA,GAAGA,CAACA,CAACA;IAEXA,MAAMA,CAACA,IAAIA,CAACA;AAChBA,CAACA;AAED,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping.sourcemap.txt b/tests/baselines/reference/contextualTyping.sourcemap.txt index 9ee97ee0804..6f9c9d2c1ec 100644 --- a/tests/baselines/reference/contextualTyping.sourcemap.txt +++ b/tests/baselines/reference/contextualTyping.sourcemap.txt @@ -2270,38 +2270,32 @@ sourceFile:contextualTyping.ts 2 >Emitted(120, 1) Source(145, 1) + SourceIndex(0) 3 >Emitted(120, 26) Source(145, 26) + SourceIndex(0) --- ->>>function c9t5(f) { +>>>function c9t5(f) { } 1 >^^^^^^^^^ 2 > ^^^^ 3 > ^ 4 > ^ +5 > ^^^^^ 1 > >function 2 > c9t5 3 > ( 4 > f: (n: number) => IFoo +5 > ) {} 1 >Emitted(121, 10) Source(146, 10) + SourceIndex(0) 2 >Emitted(121, 14) Source(146, 14) + SourceIndex(0) 3 >Emitted(121, 15) Source(146, 15) + SourceIndex(0) 4 >Emitted(121, 16) Source(146, 37) + SourceIndex(0) ---- ->>>} -1 > -2 >^ -3 > ^-> -1 >) { -2 >} -1 >Emitted(122, 1) Source(146, 40) + SourceIndex(0) name (c9t5) -2 >Emitted(122, 2) Source(146, 41) + SourceIndex(0) name (c9t5) +5 >Emitted(121, 21) Source(146, 41) + SourceIndex(0) --- >>>; -1-> +1 > 2 >^ 3 > ^^^^^^^^^^^^^^^^^^^-> -1-> +1 > 2 >; -1->Emitted(123, 1) Source(146, 41) + SourceIndex(0) -2 >Emitted(123, 2) Source(146, 42) + SourceIndex(0) +1 >Emitted(122, 1) Source(146, 41) + SourceIndex(0) +2 >Emitted(122, 2) Source(146, 42) + SourceIndex(0) --- >>>c9t5(function (n) { 1-> @@ -2316,11 +2310,11 @@ sourceFile:contextualTyping.ts 3 > ( 4 > function( 5 > n -1->Emitted(124, 1) Source(147, 1) + SourceIndex(0) -2 >Emitted(124, 5) Source(147, 5) + SourceIndex(0) -3 >Emitted(124, 6) Source(147, 6) + SourceIndex(0) -4 >Emitted(124, 16) Source(147, 15) + SourceIndex(0) -5 >Emitted(124, 17) Source(147, 16) + SourceIndex(0) +1->Emitted(123, 1) Source(147, 1) + SourceIndex(0) +2 >Emitted(123, 5) Source(147, 5) + SourceIndex(0) +3 >Emitted(123, 6) Source(147, 6) + SourceIndex(0) +4 >Emitted(123, 16) Source(147, 15) + SourceIndex(0) +5 >Emitted(123, 17) Source(147, 16) + SourceIndex(0) --- >>> return ({}); 1->^^^^ @@ -2338,13 +2332,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > ; -1->Emitted(125, 5) Source(148, 5) + SourceIndex(0) -2 >Emitted(125, 11) Source(148, 11) + SourceIndex(0) -3 >Emitted(125, 12) Source(148, 18) + SourceIndex(0) -4 >Emitted(125, 13) Source(148, 19) + SourceIndex(0) -5 >Emitted(125, 15) Source(148, 21) + SourceIndex(0) -6 >Emitted(125, 16) Source(148, 22) + SourceIndex(0) -7 >Emitted(125, 17) Source(148, 23) + SourceIndex(0) +1->Emitted(124, 5) Source(148, 5) + SourceIndex(0) +2 >Emitted(124, 11) Source(148, 11) + SourceIndex(0) +3 >Emitted(124, 12) Source(148, 18) + SourceIndex(0) +4 >Emitted(124, 13) Source(148, 19) + SourceIndex(0) +5 >Emitted(124, 15) Source(148, 21) + SourceIndex(0) +6 >Emitted(124, 16) Source(148, 22) + SourceIndex(0) +7 >Emitted(124, 17) Source(148, 23) + SourceIndex(0) --- >>>}); 1 > @@ -2357,10 +2351,10 @@ sourceFile:contextualTyping.ts 2 >} 3 > ) 4 > ; -1 >Emitted(126, 1) Source(149, 1) + SourceIndex(0) -2 >Emitted(126, 2) Source(149, 2) + SourceIndex(0) -3 >Emitted(126, 3) Source(149, 3) + SourceIndex(0) -4 >Emitted(126, 4) Source(149, 4) + SourceIndex(0) +1 >Emitted(125, 1) Source(149, 1) + SourceIndex(0) +2 >Emitted(125, 2) Source(149, 2) + SourceIndex(0) +3 >Emitted(125, 3) Source(149, 3) + SourceIndex(0) +4 >Emitted(125, 4) Source(149, 4) + SourceIndex(0) --- >>>// CONTEXT: Return statement 1-> @@ -2372,9 +2366,9 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Return statement -1->Emitted(127, 1) Source(152, 1) + SourceIndex(0) -2 >Emitted(127, 1) Source(151, 1) + SourceIndex(0) -3 >Emitted(127, 29) Source(151, 29) + SourceIndex(0) +1->Emitted(126, 1) Source(152, 1) + SourceIndex(0) +2 >Emitted(126, 1) Source(151, 1) + SourceIndex(0) +3 >Emitted(126, 29) Source(151, 29) + SourceIndex(0) --- >>>var c10t5 = function () { 1 >^^^^ @@ -2385,9 +2379,9 @@ sourceFile:contextualTyping.ts >var 2 > c10t5 3 > : () => (n: number) => IFoo = -1 >Emitted(128, 5) Source(152, 5) + SourceIndex(0) -2 >Emitted(128, 10) Source(152, 10) + SourceIndex(0) -3 >Emitted(128, 13) Source(152, 40) + SourceIndex(0) +1 >Emitted(127, 5) Source(152, 5) + SourceIndex(0) +2 >Emitted(127, 10) Source(152, 10) + SourceIndex(0) +3 >Emitted(127, 13) Source(152, 40) + SourceIndex(0) --- >>> return function (n) { 1->^^^^ @@ -2400,11 +2394,11 @@ sourceFile:contextualTyping.ts 3 > 4 > function( 5 > n -1->Emitted(129, 5) Source(152, 53) + SourceIndex(0) -2 >Emitted(129, 11) Source(152, 59) + SourceIndex(0) -3 >Emitted(129, 12) Source(152, 60) + SourceIndex(0) -4 >Emitted(129, 22) Source(152, 69) + SourceIndex(0) -5 >Emitted(129, 23) Source(152, 70) + SourceIndex(0) +1->Emitted(128, 5) Source(152, 53) + SourceIndex(0) +2 >Emitted(128, 11) Source(152, 59) + SourceIndex(0) +3 >Emitted(128, 12) Source(152, 60) + SourceIndex(0) +4 >Emitted(128, 22) Source(152, 69) + SourceIndex(0) +5 >Emitted(128, 23) Source(152, 70) + SourceIndex(0) --- >>> return ({}); 1 >^^^^^^^^ @@ -2421,13 +2415,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > -1 >Emitted(130, 9) Source(152, 74) + SourceIndex(0) -2 >Emitted(130, 15) Source(152, 80) + SourceIndex(0) -3 >Emitted(130, 16) Source(152, 87) + SourceIndex(0) -4 >Emitted(130, 17) Source(152, 88) + SourceIndex(0) -5 >Emitted(130, 19) Source(152, 90) + SourceIndex(0) -6 >Emitted(130, 20) Source(152, 91) + SourceIndex(0) -7 >Emitted(130, 21) Source(152, 91) + SourceIndex(0) +1 >Emitted(129, 9) Source(152, 74) + SourceIndex(0) +2 >Emitted(129, 15) Source(152, 80) + SourceIndex(0) +3 >Emitted(129, 16) Source(152, 87) + SourceIndex(0) +4 >Emitted(129, 17) Source(152, 88) + SourceIndex(0) +5 >Emitted(129, 19) Source(152, 90) + SourceIndex(0) +6 >Emitted(129, 20) Source(152, 91) + SourceIndex(0) +7 >Emitted(129, 21) Source(152, 91) + SourceIndex(0) --- >>> }; 1 >^^^^ @@ -2436,9 +2430,9 @@ sourceFile:contextualTyping.ts 1 > 2 > } 3 > -1 >Emitted(131, 5) Source(152, 92) + SourceIndex(0) -2 >Emitted(131, 6) Source(152, 93) + SourceIndex(0) -3 >Emitted(131, 7) Source(152, 93) + SourceIndex(0) +1 >Emitted(130, 5) Source(152, 92) + SourceIndex(0) +2 >Emitted(130, 6) Source(152, 93) + SourceIndex(0) +3 >Emitted(130, 7) Source(152, 93) + SourceIndex(0) --- >>>}; 1 > @@ -2448,9 +2442,9 @@ sourceFile:contextualTyping.ts 1 > 2 >} 3 > ; -1 >Emitted(132, 1) Source(152, 94) + SourceIndex(0) -2 >Emitted(132, 2) Source(152, 95) + SourceIndex(0) -3 >Emitted(132, 3) Source(152, 96) + SourceIndex(0) +1 >Emitted(131, 1) Source(152, 94) + SourceIndex(0) +2 >Emitted(131, 2) Source(152, 95) + SourceIndex(0) +3 >Emitted(131, 3) Source(152, 96) + SourceIndex(0) --- >>>// CONTEXT: Newing a class 1-> @@ -2463,9 +2457,9 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Newing a class -1->Emitted(133, 1) Source(155, 1) + SourceIndex(0) -2 >Emitted(133, 1) Source(154, 1) + SourceIndex(0) -3 >Emitted(133, 27) Source(154, 27) + SourceIndex(0) +1->Emitted(132, 1) Source(155, 1) + SourceIndex(0) +2 >Emitted(132, 1) Source(154, 1) + SourceIndex(0) +3 >Emitted(132, 27) Source(154, 27) + SourceIndex(0) --- >>>var C11t5 = (function () { 1->^^^^ @@ -2474,8 +2468,8 @@ sourceFile:contextualTyping.ts 1-> >class 2 > C11t5 -1->Emitted(134, 5) Source(155, 7) + SourceIndex(0) -2 >Emitted(134, 10) Source(155, 12) + SourceIndex(0) +1->Emitted(133, 5) Source(155, 7) + SourceIndex(0) +2 >Emitted(133, 10) Source(155, 12) + SourceIndex(0) --- >>> function C11t5(f) { 1->^^^^ @@ -2488,11 +2482,11 @@ sourceFile:contextualTyping.ts 3 > C11t5 4 > { constructor( 5 > f: (n: number) => IFoo -1->Emitted(135, 5) Source(155, 15) + SourceIndex(0) name (C11t5) -2 >Emitted(135, 14) Source(155, 7) + SourceIndex(0) name (C11t5) -3 >Emitted(135, 19) Source(155, 12) + SourceIndex(0) name (C11t5) -4 >Emitted(135, 20) Source(155, 27) + SourceIndex(0) name (C11t5) -5 >Emitted(135, 21) Source(155, 49) + SourceIndex(0) name (C11t5) +1->Emitted(134, 5) Source(155, 15) + SourceIndex(0) name (C11t5) +2 >Emitted(134, 14) Source(155, 7) + SourceIndex(0) name (C11t5) +3 >Emitted(134, 19) Source(155, 12) + SourceIndex(0) name (C11t5) +4 >Emitted(134, 20) Source(155, 27) + SourceIndex(0) name (C11t5) +5 >Emitted(134, 21) Source(155, 49) + SourceIndex(0) name (C11t5) --- >>> } 1 >^^^^ @@ -2500,16 +2494,16 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^-> 1 >) { 2 > } -1 >Emitted(136, 5) Source(155, 53) + SourceIndex(0) name (C11t5.constructor) -2 >Emitted(136, 6) Source(155, 54) + SourceIndex(0) name (C11t5.constructor) +1 >Emitted(135, 5) Source(155, 53) + SourceIndex(0) name (C11t5.constructor) +2 >Emitted(135, 6) Source(155, 54) + SourceIndex(0) name (C11t5.constructor) --- >>> return C11t5; 1->^^^^ 2 > ^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(137, 5) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(137, 17) Source(155, 56) + SourceIndex(0) name (C11t5) +1->Emitted(136, 5) Source(155, 55) + SourceIndex(0) name (C11t5) +2 >Emitted(136, 17) Source(155, 56) + SourceIndex(0) name (C11t5) --- >>>})(); 1 > @@ -2520,10 +2514,10 @@ sourceFile:contextualTyping.ts 2 >} 3 > 4 > class C11t5 { constructor(f: (n: number) => IFoo) { } } -1 >Emitted(138, 1) Source(155, 55) + SourceIndex(0) name (C11t5) -2 >Emitted(138, 2) Source(155, 56) + SourceIndex(0) name (C11t5) -3 >Emitted(138, 2) Source(155, 1) + SourceIndex(0) -4 >Emitted(138, 6) Source(155, 56) + SourceIndex(0) +1 >Emitted(137, 1) Source(155, 55) + SourceIndex(0) name (C11t5) +2 >Emitted(137, 2) Source(155, 56) + SourceIndex(0) name (C11t5) +3 >Emitted(137, 2) Source(155, 1) + SourceIndex(0) +4 >Emitted(137, 6) Source(155, 56) + SourceIndex(0) --- >>>; 1 > @@ -2531,8 +2525,8 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >; -1 >Emitted(139, 1) Source(155, 56) + SourceIndex(0) -2 >Emitted(139, 2) Source(155, 57) + SourceIndex(0) +1 >Emitted(138, 1) Source(155, 56) + SourceIndex(0) +2 >Emitted(138, 2) Source(155, 57) + SourceIndex(0) --- >>>var i = new C11t5(function (n) { 1-> @@ -2554,15 +2548,15 @@ sourceFile:contextualTyping.ts 7 > ( 8 > function( 9 > n -1->Emitted(140, 1) Source(156, 1) + SourceIndex(0) -2 >Emitted(140, 5) Source(156, 5) + SourceIndex(0) -3 >Emitted(140, 6) Source(156, 6) + SourceIndex(0) -4 >Emitted(140, 9) Source(156, 9) + SourceIndex(0) -5 >Emitted(140, 13) Source(156, 13) + SourceIndex(0) -6 >Emitted(140, 18) Source(156, 18) + SourceIndex(0) -7 >Emitted(140, 19) Source(156, 19) + SourceIndex(0) -8 >Emitted(140, 29) Source(156, 28) + SourceIndex(0) -9 >Emitted(140, 30) Source(156, 29) + SourceIndex(0) +1->Emitted(139, 1) Source(156, 1) + SourceIndex(0) +2 >Emitted(139, 5) Source(156, 5) + SourceIndex(0) +3 >Emitted(139, 6) Source(156, 6) + SourceIndex(0) +4 >Emitted(139, 9) Source(156, 9) + SourceIndex(0) +5 >Emitted(139, 13) Source(156, 13) + SourceIndex(0) +6 >Emitted(139, 18) Source(156, 18) + SourceIndex(0) +7 >Emitted(139, 19) Source(156, 19) + SourceIndex(0) +8 >Emitted(139, 29) Source(156, 28) + SourceIndex(0) +9 >Emitted(139, 30) Source(156, 29) + SourceIndex(0) --- >>> return ({}); 1 >^^^^ @@ -2579,13 +2573,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > -1 >Emitted(141, 5) Source(156, 33) + SourceIndex(0) -2 >Emitted(141, 11) Source(156, 39) + SourceIndex(0) -3 >Emitted(141, 12) Source(156, 46) + SourceIndex(0) -4 >Emitted(141, 13) Source(156, 47) + SourceIndex(0) -5 >Emitted(141, 15) Source(156, 49) + SourceIndex(0) -6 >Emitted(141, 16) Source(156, 50) + SourceIndex(0) -7 >Emitted(141, 17) Source(156, 50) + SourceIndex(0) +1 >Emitted(140, 5) Source(156, 33) + SourceIndex(0) +2 >Emitted(140, 11) Source(156, 39) + SourceIndex(0) +3 >Emitted(140, 12) Source(156, 46) + SourceIndex(0) +4 >Emitted(140, 13) Source(156, 47) + SourceIndex(0) +5 >Emitted(140, 15) Source(156, 49) + SourceIndex(0) +6 >Emitted(140, 16) Source(156, 50) + SourceIndex(0) +7 >Emitted(140, 17) Source(156, 50) + SourceIndex(0) --- >>>}); 1 > @@ -2597,10 +2591,10 @@ sourceFile:contextualTyping.ts 2 >} 3 > ) 4 > ; -1 >Emitted(142, 1) Source(156, 51) + SourceIndex(0) -2 >Emitted(142, 2) Source(156, 52) + SourceIndex(0) -3 >Emitted(142, 3) Source(156, 53) + SourceIndex(0) -4 >Emitted(142, 4) Source(156, 54) + SourceIndex(0) +1 >Emitted(141, 1) Source(156, 51) + SourceIndex(0) +2 >Emitted(141, 2) Source(156, 52) + SourceIndex(0) +3 >Emitted(141, 3) Source(156, 53) + SourceIndex(0) +4 >Emitted(141, 4) Source(156, 54) + SourceIndex(0) --- >>>// CONTEXT: Type annotated expression 1-> @@ -2612,9 +2606,9 @@ sourceFile:contextualTyping.ts > 2 > 3 >// CONTEXT: Type annotated expression -1->Emitted(143, 1) Source(159, 1) + SourceIndex(0) -2 >Emitted(143, 1) Source(158, 1) + SourceIndex(0) -3 >Emitted(143, 38) Source(158, 38) + SourceIndex(0) +1->Emitted(142, 1) Source(159, 1) + SourceIndex(0) +2 >Emitted(142, 1) Source(158, 1) + SourceIndex(0) +3 >Emitted(142, 38) Source(158, 38) + SourceIndex(0) --- >>>var c12t1 = (function (s) { 1 >^^^^ @@ -2630,12 +2624,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > function( 6 > s -1 >Emitted(144, 5) Source(159, 5) + SourceIndex(0) -2 >Emitted(144, 10) Source(159, 10) + SourceIndex(0) -3 >Emitted(144, 13) Source(159, 37) + SourceIndex(0) -4 >Emitted(144, 14) Source(159, 38) + SourceIndex(0) -5 >Emitted(144, 24) Source(159, 47) + SourceIndex(0) -6 >Emitted(144, 25) Source(159, 48) + SourceIndex(0) +1 >Emitted(143, 5) Source(159, 5) + SourceIndex(0) +2 >Emitted(143, 10) Source(159, 10) + SourceIndex(0) +3 >Emitted(143, 13) Source(159, 37) + SourceIndex(0) +4 >Emitted(143, 14) Source(159, 38) + SourceIndex(0) +5 >Emitted(143, 24) Source(159, 47) + SourceIndex(0) +6 >Emitted(143, 25) Source(159, 48) + SourceIndex(0) --- >>> return s; 1 >^^^^ @@ -2648,11 +2642,11 @@ sourceFile:contextualTyping.ts 3 > 4 > s 5 > -1 >Emitted(145, 5) Source(159, 52) + SourceIndex(0) -2 >Emitted(145, 11) Source(159, 58) + SourceIndex(0) -3 >Emitted(145, 12) Source(159, 59) + SourceIndex(0) -4 >Emitted(145, 13) Source(159, 60) + SourceIndex(0) -5 >Emitted(145, 14) Source(159, 60) + SourceIndex(0) +1 >Emitted(144, 5) Source(159, 52) + SourceIndex(0) +2 >Emitted(144, 11) Source(159, 58) + SourceIndex(0) +3 >Emitted(144, 12) Source(159, 59) + SourceIndex(0) +4 >Emitted(144, 13) Source(159, 60) + SourceIndex(0) +5 >Emitted(144, 14) Source(159, 60) + SourceIndex(0) --- >>>}); 1 > @@ -2664,10 +2658,10 @@ sourceFile:contextualTyping.ts 2 >} 3 > ) 4 > ; -1 >Emitted(146, 1) Source(159, 61) + SourceIndex(0) -2 >Emitted(146, 2) Source(159, 62) + SourceIndex(0) -3 >Emitted(146, 3) Source(159, 63) + SourceIndex(0) -4 >Emitted(146, 4) Source(159, 64) + SourceIndex(0) +1 >Emitted(145, 1) Source(159, 61) + SourceIndex(0) +2 >Emitted(145, 2) Source(159, 62) + SourceIndex(0) +3 >Emitted(145, 3) Source(159, 63) + SourceIndex(0) +4 >Emitted(145, 4) Source(159, 64) + SourceIndex(0) --- >>>var c12t2 = ({ 1-> @@ -2681,11 +2675,11 @@ sourceFile:contextualTyping.ts 3 > c12t2 4 > = 5 > ( -1->Emitted(147, 1) Source(160, 1) + SourceIndex(0) -2 >Emitted(147, 5) Source(160, 5) + SourceIndex(0) -3 >Emitted(147, 10) Source(160, 10) + SourceIndex(0) -4 >Emitted(147, 13) Source(160, 20) + SourceIndex(0) -5 >Emitted(147, 14) Source(160, 21) + SourceIndex(0) +1->Emitted(146, 1) Source(160, 1) + SourceIndex(0) +2 >Emitted(146, 5) Source(160, 5) + SourceIndex(0) +3 >Emitted(146, 10) Source(160, 10) + SourceIndex(0) +4 >Emitted(146, 13) Source(160, 20) + SourceIndex(0) +5 >Emitted(146, 14) Source(160, 21) + SourceIndex(0) --- >>> n: 1 1 >^^^^ @@ -2697,10 +2691,10 @@ sourceFile:contextualTyping.ts 2 > n 3 > : 4 > 1 -1 >Emitted(148, 5) Source(161, 5) + SourceIndex(0) -2 >Emitted(148, 6) Source(161, 6) + SourceIndex(0) -3 >Emitted(148, 8) Source(161, 8) + SourceIndex(0) -4 >Emitted(148, 9) Source(161, 9) + SourceIndex(0) +1 >Emitted(147, 5) Source(161, 5) + SourceIndex(0) +2 >Emitted(147, 6) Source(161, 6) + SourceIndex(0) +3 >Emitted(147, 8) Source(161, 8) + SourceIndex(0) +4 >Emitted(147, 9) Source(161, 9) + SourceIndex(0) --- >>>}); 1 >^ @@ -2711,9 +2705,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > ; -1 >Emitted(149, 2) Source(162, 2) + SourceIndex(0) -2 >Emitted(149, 3) Source(162, 3) + SourceIndex(0) -3 >Emitted(149, 4) Source(162, 4) + SourceIndex(0) +1 >Emitted(148, 2) Source(162, 2) + SourceIndex(0) +2 >Emitted(148, 3) Source(162, 3) + SourceIndex(0) +3 >Emitted(148, 4) Source(162, 4) + SourceIndex(0) --- >>>var c12t3 = []; 1-> @@ -2730,12 +2724,12 @@ sourceFile:contextualTyping.ts 4 > = 5 > [] 6 > ; -1->Emitted(150, 1) Source(163, 1) + SourceIndex(0) -2 >Emitted(150, 5) Source(163, 5) + SourceIndex(0) -3 >Emitted(150, 10) Source(163, 10) + SourceIndex(0) -4 >Emitted(150, 13) Source(163, 24) + SourceIndex(0) -5 >Emitted(150, 15) Source(163, 26) + SourceIndex(0) -6 >Emitted(150, 16) Source(163, 27) + SourceIndex(0) +1->Emitted(149, 1) Source(163, 1) + SourceIndex(0) +2 >Emitted(149, 5) Source(163, 5) + SourceIndex(0) +3 >Emitted(149, 10) Source(163, 10) + SourceIndex(0) +4 >Emitted(149, 13) Source(163, 24) + SourceIndex(0) +5 >Emitted(149, 15) Source(163, 26) + SourceIndex(0) +6 >Emitted(149, 16) Source(163, 27) + SourceIndex(0) --- >>>var c12t4 = function () { 1-> @@ -2748,10 +2742,10 @@ sourceFile:contextualTyping.ts 2 >var 3 > c12t4 4 > = <() => IFoo> -1->Emitted(151, 1) Source(164, 1) + SourceIndex(0) -2 >Emitted(151, 5) Source(164, 5) + SourceIndex(0) -3 >Emitted(151, 10) Source(164, 10) + SourceIndex(0) -4 >Emitted(151, 13) Source(164, 26) + SourceIndex(0) +1->Emitted(150, 1) Source(164, 1) + SourceIndex(0) +2 >Emitted(150, 5) Source(164, 5) + SourceIndex(0) +3 >Emitted(150, 10) Source(164, 10) + SourceIndex(0) +4 >Emitted(150, 13) Source(164, 26) + SourceIndex(0) --- >>> return ({}); 1->^^^^ @@ -2768,13 +2762,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > -1->Emitted(152, 5) Source(164, 39) + SourceIndex(0) -2 >Emitted(152, 11) Source(164, 45) + SourceIndex(0) -3 >Emitted(152, 12) Source(164, 52) + SourceIndex(0) -4 >Emitted(152, 13) Source(164, 53) + SourceIndex(0) -5 >Emitted(152, 15) Source(164, 55) + SourceIndex(0) -6 >Emitted(152, 16) Source(164, 56) + SourceIndex(0) -7 >Emitted(152, 17) Source(164, 56) + SourceIndex(0) +1->Emitted(151, 5) Source(164, 39) + SourceIndex(0) +2 >Emitted(151, 11) Source(164, 45) + SourceIndex(0) +3 >Emitted(151, 12) Source(164, 52) + SourceIndex(0) +4 >Emitted(151, 13) Source(164, 53) + SourceIndex(0) +5 >Emitted(151, 15) Source(164, 55) + SourceIndex(0) +6 >Emitted(151, 16) Source(164, 56) + SourceIndex(0) +7 >Emitted(151, 17) Source(164, 56) + SourceIndex(0) --- >>>}; 1 > @@ -2784,9 +2778,9 @@ sourceFile:contextualTyping.ts 1 > 2 >} 3 > ; -1 >Emitted(153, 1) Source(164, 57) + SourceIndex(0) -2 >Emitted(153, 2) Source(164, 58) + SourceIndex(0) -3 >Emitted(153, 3) Source(164, 59) + SourceIndex(0) +1 >Emitted(152, 1) Source(164, 57) + SourceIndex(0) +2 >Emitted(152, 2) Source(164, 58) + SourceIndex(0) +3 >Emitted(152, 3) Source(164, 59) + SourceIndex(0) --- >>>var c12t5 = function (n) { 1-> @@ -2802,12 +2796,12 @@ sourceFile:contextualTyping.ts 4 > = <(n: number) => IFoo> 5 > function( 6 > n -1->Emitted(154, 1) Source(165, 1) + SourceIndex(0) -2 >Emitted(154, 5) Source(165, 5) + SourceIndex(0) -3 >Emitted(154, 10) Source(165, 10) + SourceIndex(0) -4 >Emitted(154, 13) Source(165, 35) + SourceIndex(0) -5 >Emitted(154, 23) Source(165, 44) + SourceIndex(0) -6 >Emitted(154, 24) Source(165, 45) + SourceIndex(0) +1->Emitted(153, 1) Source(165, 1) + SourceIndex(0) +2 >Emitted(153, 5) Source(165, 5) + SourceIndex(0) +3 >Emitted(153, 10) Source(165, 10) + SourceIndex(0) +4 >Emitted(153, 13) Source(165, 35) + SourceIndex(0) +5 >Emitted(153, 23) Source(165, 44) + SourceIndex(0) +6 >Emitted(153, 24) Source(165, 45) + SourceIndex(0) --- >>> return ({}); 1 >^^^^ @@ -2824,13 +2818,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > -1 >Emitted(155, 5) Source(165, 49) + SourceIndex(0) -2 >Emitted(155, 11) Source(165, 55) + SourceIndex(0) -3 >Emitted(155, 12) Source(165, 62) + SourceIndex(0) -4 >Emitted(155, 13) Source(165, 63) + SourceIndex(0) -5 >Emitted(155, 15) Source(165, 65) + SourceIndex(0) -6 >Emitted(155, 16) Source(165, 66) + SourceIndex(0) -7 >Emitted(155, 17) Source(165, 66) + SourceIndex(0) +1 >Emitted(154, 5) Source(165, 49) + SourceIndex(0) +2 >Emitted(154, 11) Source(165, 55) + SourceIndex(0) +3 >Emitted(154, 12) Source(165, 62) + SourceIndex(0) +4 >Emitted(154, 13) Source(165, 63) + SourceIndex(0) +5 >Emitted(154, 15) Source(165, 65) + SourceIndex(0) +6 >Emitted(154, 16) Source(165, 66) + SourceIndex(0) +7 >Emitted(154, 17) Source(165, 66) + SourceIndex(0) --- >>>}; 1 > @@ -2840,9 +2834,9 @@ sourceFile:contextualTyping.ts 1 > 2 >} 3 > ; -1 >Emitted(156, 1) Source(165, 67) + SourceIndex(0) -2 >Emitted(156, 2) Source(165, 68) + SourceIndex(0) -3 >Emitted(156, 3) Source(165, 69) + SourceIndex(0) +1 >Emitted(155, 1) Source(165, 67) + SourceIndex(0) +2 >Emitted(155, 2) Source(165, 68) + SourceIndex(0) +3 >Emitted(155, 3) Source(165, 69) + SourceIndex(0) --- >>>var c12t6 = function (n, s) { 1-> @@ -2862,14 +2856,14 @@ sourceFile:contextualTyping.ts 6 > n 7 > , 8 > s -1->Emitted(157, 1) Source(166, 1) + SourceIndex(0) -2 >Emitted(157, 5) Source(166, 5) + SourceIndex(0) -3 >Emitted(157, 10) Source(166, 10) + SourceIndex(0) -4 >Emitted(157, 13) Source(166, 46) + SourceIndex(0) -5 >Emitted(157, 23) Source(166, 55) + SourceIndex(0) -6 >Emitted(157, 24) Source(166, 56) + SourceIndex(0) -7 >Emitted(157, 26) Source(166, 58) + SourceIndex(0) -8 >Emitted(157, 27) Source(166, 59) + SourceIndex(0) +1->Emitted(156, 1) Source(166, 1) + SourceIndex(0) +2 >Emitted(156, 5) Source(166, 5) + SourceIndex(0) +3 >Emitted(156, 10) Source(166, 10) + SourceIndex(0) +4 >Emitted(156, 13) Source(166, 46) + SourceIndex(0) +5 >Emitted(156, 23) Source(166, 55) + SourceIndex(0) +6 >Emitted(156, 24) Source(166, 56) + SourceIndex(0) +7 >Emitted(156, 26) Source(166, 58) + SourceIndex(0) +8 >Emitted(156, 27) Source(166, 59) + SourceIndex(0) --- >>> return ({}); 1 >^^^^ @@ -2886,13 +2880,13 @@ sourceFile:contextualTyping.ts 5 > {} 6 > ) 7 > -1 >Emitted(158, 5) Source(166, 63) + SourceIndex(0) -2 >Emitted(158, 11) Source(166, 69) + SourceIndex(0) -3 >Emitted(158, 12) Source(166, 76) + SourceIndex(0) -4 >Emitted(158, 13) Source(166, 77) + SourceIndex(0) -5 >Emitted(158, 15) Source(166, 79) + SourceIndex(0) -6 >Emitted(158, 16) Source(166, 80) + SourceIndex(0) -7 >Emitted(158, 17) Source(166, 80) + SourceIndex(0) +1 >Emitted(157, 5) Source(166, 63) + SourceIndex(0) +2 >Emitted(157, 11) Source(166, 69) + SourceIndex(0) +3 >Emitted(157, 12) Source(166, 76) + SourceIndex(0) +4 >Emitted(157, 13) Source(166, 77) + SourceIndex(0) +5 >Emitted(157, 15) Source(166, 79) + SourceIndex(0) +6 >Emitted(157, 16) Source(166, 80) + SourceIndex(0) +7 >Emitted(157, 17) Source(166, 80) + SourceIndex(0) --- >>>}; 1 > @@ -2902,9 +2896,9 @@ sourceFile:contextualTyping.ts 1 > 2 >} 3 > ; -1 >Emitted(159, 1) Source(166, 81) + SourceIndex(0) -2 >Emitted(159, 2) Source(166, 82) + SourceIndex(0) -3 >Emitted(159, 3) Source(166, 83) + SourceIndex(0) +1 >Emitted(158, 1) Source(166, 81) + SourceIndex(0) +2 >Emitted(158, 2) Source(166, 82) + SourceIndex(0) +3 >Emitted(158, 3) Source(166, 83) + SourceIndex(0) --- >>>var c12t7 = function (n) { 1-> @@ -2923,12 +2917,12 @@ sourceFile:contextualTyping.ts > }> 5 > function( 6 > n:number -1->Emitted(160, 1) Source(167, 1) + SourceIndex(0) -2 >Emitted(160, 5) Source(167, 5) + SourceIndex(0) -3 >Emitted(160, 10) Source(167, 10) + SourceIndex(0) -4 >Emitted(160, 13) Source(170, 4) + SourceIndex(0) -5 >Emitted(160, 23) Source(170, 13) + SourceIndex(0) -6 >Emitted(160, 24) Source(170, 21) + SourceIndex(0) +1->Emitted(159, 1) Source(167, 1) + SourceIndex(0) +2 >Emitted(159, 5) Source(167, 5) + SourceIndex(0) +3 >Emitted(159, 10) Source(167, 10) + SourceIndex(0) +4 >Emitted(159, 13) Source(170, 4) + SourceIndex(0) +5 >Emitted(159, 23) Source(170, 13) + SourceIndex(0) +6 >Emitted(159, 24) Source(170, 21) + SourceIndex(0) --- >>> return n; 1 >^^^^ @@ -2941,11 +2935,11 @@ sourceFile:contextualTyping.ts 3 > 4 > n 5 > -1 >Emitted(161, 5) Source(170, 25) + SourceIndex(0) -2 >Emitted(161, 11) Source(170, 31) + SourceIndex(0) -3 >Emitted(161, 12) Source(170, 32) + SourceIndex(0) -4 >Emitted(161, 13) Source(170, 33) + SourceIndex(0) -5 >Emitted(161, 14) Source(170, 33) + SourceIndex(0) +1 >Emitted(160, 5) Source(170, 25) + SourceIndex(0) +2 >Emitted(160, 11) Source(170, 31) + SourceIndex(0) +3 >Emitted(160, 12) Source(170, 32) + SourceIndex(0) +4 >Emitted(160, 13) Source(170, 33) + SourceIndex(0) +5 >Emitted(160, 14) Source(170, 33) + SourceIndex(0) --- >>>}; 1 > @@ -2955,9 +2949,9 @@ sourceFile:contextualTyping.ts 1 > 2 >} 3 > ; -1 >Emitted(162, 1) Source(170, 34) + SourceIndex(0) -2 >Emitted(162, 2) Source(170, 35) + SourceIndex(0) -3 >Emitted(162, 3) Source(170, 36) + SourceIndex(0) +1 >Emitted(161, 1) Source(170, 34) + SourceIndex(0) +2 >Emitted(161, 2) Source(170, 35) + SourceIndex(0) +3 >Emitted(161, 3) Source(170, 36) + SourceIndex(0) --- >>>var c12t8 = function (n) { 1-> @@ -2974,12 +2968,12 @@ sourceFile:contextualTyping.ts 4 > = <(n: number, s: string) => number> 5 > function( 6 > n -1->Emitted(163, 1) Source(172, 1) + SourceIndex(0) -2 >Emitted(163, 5) Source(172, 5) + SourceIndex(0) -3 >Emitted(163, 10) Source(172, 10) + SourceIndex(0) -4 >Emitted(163, 13) Source(172, 48) + SourceIndex(0) -5 >Emitted(163, 23) Source(172, 57) + SourceIndex(0) -6 >Emitted(163, 24) Source(172, 58) + SourceIndex(0) +1->Emitted(162, 1) Source(172, 1) + SourceIndex(0) +2 >Emitted(162, 5) Source(172, 5) + SourceIndex(0) +3 >Emitted(162, 10) Source(172, 10) + SourceIndex(0) +4 >Emitted(162, 13) Source(172, 48) + SourceIndex(0) +5 >Emitted(162, 23) Source(172, 57) + SourceIndex(0) +6 >Emitted(162, 24) Source(172, 58) + SourceIndex(0) --- >>> return n; 1 >^^^^ @@ -2992,11 +2986,11 @@ sourceFile:contextualTyping.ts 3 > 4 > n 5 > ; -1 >Emitted(164, 5) Source(172, 62) + SourceIndex(0) -2 >Emitted(164, 11) Source(172, 68) + SourceIndex(0) -3 >Emitted(164, 12) Source(172, 69) + SourceIndex(0) -4 >Emitted(164, 13) Source(172, 70) + SourceIndex(0) -5 >Emitted(164, 14) Source(172, 71) + SourceIndex(0) +1 >Emitted(163, 5) Source(172, 62) + SourceIndex(0) +2 >Emitted(163, 11) Source(172, 68) + SourceIndex(0) +3 >Emitted(163, 12) Source(172, 69) + SourceIndex(0) +4 >Emitted(163, 13) Source(172, 70) + SourceIndex(0) +5 >Emitted(163, 14) Source(172, 71) + SourceIndex(0) --- >>>}; 1 > @@ -3006,9 +3000,9 @@ sourceFile:contextualTyping.ts 1 > 2 >} 3 > ; -1 >Emitted(165, 1) Source(172, 72) + SourceIndex(0) -2 >Emitted(165, 2) Source(172, 73) + SourceIndex(0) -3 >Emitted(165, 3) Source(172, 74) + SourceIndex(0) +1 >Emitted(164, 1) Source(172, 72) + SourceIndex(0) +2 >Emitted(164, 2) Source(172, 73) + SourceIndex(0) +3 >Emitted(164, 3) Source(172, 74) + SourceIndex(0) --- >>>var c12t9 = [[], []]; 1-> @@ -3033,16 +3027,16 @@ sourceFile:contextualTyping.ts 8 > [] 9 > ] 10> ; -1->Emitted(166, 1) Source(173, 1) + SourceIndex(0) -2 >Emitted(166, 5) Source(173, 5) + SourceIndex(0) -3 >Emitted(166, 10) Source(173, 10) + SourceIndex(0) -4 >Emitted(166, 13) Source(173, 26) + SourceIndex(0) -5 >Emitted(166, 14) Source(173, 27) + SourceIndex(0) -6 >Emitted(166, 16) Source(173, 29) + SourceIndex(0) -7 >Emitted(166, 18) Source(173, 30) + SourceIndex(0) -8 >Emitted(166, 20) Source(173, 32) + SourceIndex(0) -9 >Emitted(166, 21) Source(173, 33) + SourceIndex(0) -10>Emitted(166, 22) Source(173, 34) + SourceIndex(0) +1->Emitted(165, 1) Source(173, 1) + SourceIndex(0) +2 >Emitted(165, 5) Source(173, 5) + SourceIndex(0) +3 >Emitted(165, 10) Source(173, 10) + SourceIndex(0) +4 >Emitted(165, 13) Source(173, 26) + SourceIndex(0) +5 >Emitted(165, 14) Source(173, 27) + SourceIndex(0) +6 >Emitted(165, 16) Source(173, 29) + SourceIndex(0) +7 >Emitted(165, 18) Source(173, 30) + SourceIndex(0) +8 >Emitted(165, 20) Source(173, 32) + SourceIndex(0) +9 >Emitted(165, 21) Source(173, 33) + SourceIndex(0) +10>Emitted(165, 22) Source(173, 34) + SourceIndex(0) --- >>>var c12t10 = [({}), ({})]; 1-> @@ -3075,20 +3069,20 @@ sourceFile:contextualTyping.ts 12> ) 13> ] 14> ; -1->Emitted(167, 1) Source(174, 1) + SourceIndex(0) -2 >Emitted(167, 5) Source(174, 5) + SourceIndex(0) -3 >Emitted(167, 11) Source(174, 11) + SourceIndex(0) -4 >Emitted(167, 14) Source(174, 23) + SourceIndex(0) -5 >Emitted(167, 15) Source(174, 30) + SourceIndex(0) -6 >Emitted(167, 16) Source(174, 31) + SourceIndex(0) -7 >Emitted(167, 18) Source(174, 33) + SourceIndex(0) -8 >Emitted(167, 19) Source(174, 34) + SourceIndex(0) -9 >Emitted(167, 21) Source(174, 41) + SourceIndex(0) -10>Emitted(167, 22) Source(174, 42) + SourceIndex(0) -11>Emitted(167, 24) Source(174, 44) + SourceIndex(0) -12>Emitted(167, 25) Source(174, 45) + SourceIndex(0) -13>Emitted(167, 26) Source(174, 46) + SourceIndex(0) -14>Emitted(167, 27) Source(174, 47) + SourceIndex(0) +1->Emitted(166, 1) Source(174, 1) + SourceIndex(0) +2 >Emitted(166, 5) Source(174, 5) + SourceIndex(0) +3 >Emitted(166, 11) Source(174, 11) + SourceIndex(0) +4 >Emitted(166, 14) Source(174, 23) + SourceIndex(0) +5 >Emitted(166, 15) Source(174, 30) + SourceIndex(0) +6 >Emitted(166, 16) Source(174, 31) + SourceIndex(0) +7 >Emitted(166, 18) Source(174, 33) + SourceIndex(0) +8 >Emitted(166, 19) Source(174, 34) + SourceIndex(0) +9 >Emitted(166, 21) Source(174, 41) + SourceIndex(0) +10>Emitted(166, 22) Source(174, 42) + SourceIndex(0) +11>Emitted(166, 24) Source(174, 44) + SourceIndex(0) +12>Emitted(166, 25) Source(174, 45) + SourceIndex(0) +13>Emitted(166, 26) Source(174, 46) + SourceIndex(0) +14>Emitted(166, 27) Source(174, 47) + SourceIndex(0) --- >>>var c12t11 = [function (n, s) { 1-> @@ -3110,15 +3104,15 @@ sourceFile:contextualTyping.ts 7 > n 8 > , 9 > s -1->Emitted(168, 1) Source(175, 1) + SourceIndex(0) -2 >Emitted(168, 5) Source(175, 5) + SourceIndex(0) -3 >Emitted(168, 11) Source(175, 11) + SourceIndex(0) -4 >Emitted(168, 14) Source(175, 52) + SourceIndex(0) -5 >Emitted(168, 15) Source(175, 53) + SourceIndex(0) -6 >Emitted(168, 25) Source(175, 62) + SourceIndex(0) -7 >Emitted(168, 26) Source(175, 63) + SourceIndex(0) -8 >Emitted(168, 28) Source(175, 65) + SourceIndex(0) -9 >Emitted(168, 29) Source(175, 66) + SourceIndex(0) +1->Emitted(167, 1) Source(175, 1) + SourceIndex(0) +2 >Emitted(167, 5) Source(175, 5) + SourceIndex(0) +3 >Emitted(167, 11) Source(175, 11) + SourceIndex(0) +4 >Emitted(167, 14) Source(175, 52) + SourceIndex(0) +5 >Emitted(167, 15) Source(175, 53) + SourceIndex(0) +6 >Emitted(167, 25) Source(175, 62) + SourceIndex(0) +7 >Emitted(167, 26) Source(175, 63) + SourceIndex(0) +8 >Emitted(167, 28) Source(175, 65) + SourceIndex(0) +9 >Emitted(167, 29) Source(175, 66) + SourceIndex(0) --- >>> return s; 1 >^^^^ @@ -3131,11 +3125,11 @@ sourceFile:contextualTyping.ts 3 > 4 > s 5 > ; -1 >Emitted(169, 5) Source(175, 70) + SourceIndex(0) -2 >Emitted(169, 11) Source(175, 76) + SourceIndex(0) -3 >Emitted(169, 12) Source(175, 77) + SourceIndex(0) -4 >Emitted(169, 13) Source(175, 78) + SourceIndex(0) -5 >Emitted(169, 14) Source(175, 79) + SourceIndex(0) +1 >Emitted(168, 5) Source(175, 70) + SourceIndex(0) +2 >Emitted(168, 11) Source(175, 76) + SourceIndex(0) +3 >Emitted(168, 12) Source(175, 77) + SourceIndex(0) +4 >Emitted(168, 13) Source(175, 78) + SourceIndex(0) +5 >Emitted(168, 14) Source(175, 79) + SourceIndex(0) --- >>>}]; 1 > @@ -3147,10 +3141,10 @@ sourceFile:contextualTyping.ts 2 >} 3 > ] 4 > ; -1 >Emitted(170, 1) Source(175, 80) + SourceIndex(0) -2 >Emitted(170, 2) Source(175, 81) + SourceIndex(0) -3 >Emitted(170, 3) Source(175, 82) + SourceIndex(0) -4 >Emitted(170, 4) Source(175, 83) + SourceIndex(0) +1 >Emitted(169, 1) Source(175, 80) + SourceIndex(0) +2 >Emitted(169, 2) Source(175, 81) + SourceIndex(0) +3 >Emitted(169, 3) Source(175, 82) + SourceIndex(0) +4 >Emitted(169, 4) Source(175, 83) + SourceIndex(0) --- >>>var c12t12 = { 1-> @@ -3163,10 +3157,10 @@ sourceFile:contextualTyping.ts 2 >var 3 > c12t12 4 > = -1->Emitted(171, 1) Source(176, 1) + SourceIndex(0) -2 >Emitted(171, 5) Source(176, 5) + SourceIndex(0) -3 >Emitted(171, 11) Source(176, 11) + SourceIndex(0) -4 >Emitted(171, 14) Source(176, 21) + SourceIndex(0) +1->Emitted(170, 1) Source(176, 1) + SourceIndex(0) +2 >Emitted(170, 5) Source(176, 5) + SourceIndex(0) +3 >Emitted(170, 11) Source(176, 11) + SourceIndex(0) +4 >Emitted(170, 14) Source(176, 21) + SourceIndex(0) --- >>> foo: ({}) 1->^^^^ @@ -3182,12 +3176,12 @@ sourceFile:contextualTyping.ts 4 > ( 5 > {} 6 > ) -1->Emitted(172, 5) Source(177, 5) + SourceIndex(0) -2 >Emitted(172, 8) Source(177, 8) + SourceIndex(0) -3 >Emitted(172, 10) Source(177, 16) + SourceIndex(0) -4 >Emitted(172, 11) Source(177, 17) + SourceIndex(0) -5 >Emitted(172, 13) Source(177, 19) + SourceIndex(0) -6 >Emitted(172, 14) Source(177, 20) + SourceIndex(0) +1->Emitted(171, 5) Source(177, 5) + SourceIndex(0) +2 >Emitted(171, 8) Source(177, 8) + SourceIndex(0) +3 >Emitted(171, 10) Source(177, 16) + SourceIndex(0) +4 >Emitted(171, 11) Source(177, 17) + SourceIndex(0) +5 >Emitted(171, 13) Source(177, 19) + SourceIndex(0) +6 >Emitted(171, 14) Source(177, 20) + SourceIndex(0) --- >>>}; 1 >^ @@ -3196,8 +3190,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > -1 >Emitted(173, 2) Source(178, 2) + SourceIndex(0) -2 >Emitted(173, 3) Source(178, 2) + SourceIndex(0) +1 >Emitted(172, 2) Source(178, 2) + SourceIndex(0) +2 >Emitted(172, 3) Source(178, 2) + SourceIndex(0) --- >>>var c12t13 = ({ 1-> @@ -3212,11 +3206,11 @@ sourceFile:contextualTyping.ts 3 > c12t13 4 > = 5 > ( -1->Emitted(174, 1) Source(179, 1) + SourceIndex(0) -2 >Emitted(174, 5) Source(179, 5) + SourceIndex(0) -3 >Emitted(174, 11) Source(179, 11) + SourceIndex(0) -4 >Emitted(174, 14) Source(179, 21) + SourceIndex(0) -5 >Emitted(174, 15) Source(179, 22) + SourceIndex(0) +1->Emitted(173, 1) Source(179, 1) + SourceIndex(0) +2 >Emitted(173, 5) Source(179, 5) + SourceIndex(0) +3 >Emitted(173, 11) Source(179, 11) + SourceIndex(0) +4 >Emitted(173, 14) Source(179, 21) + SourceIndex(0) +5 >Emitted(173, 15) Source(179, 22) + SourceIndex(0) --- >>> f: function (i, s) { 1->^^^^ @@ -3234,13 +3228,13 @@ sourceFile:contextualTyping.ts 5 > i 6 > , 7 > s -1->Emitted(175, 5) Source(180, 5) + SourceIndex(0) -2 >Emitted(175, 6) Source(180, 6) + SourceIndex(0) -3 >Emitted(175, 8) Source(180, 8) + SourceIndex(0) -4 >Emitted(175, 18) Source(180, 17) + SourceIndex(0) -5 >Emitted(175, 19) Source(180, 18) + SourceIndex(0) -6 >Emitted(175, 21) Source(180, 20) + SourceIndex(0) -7 >Emitted(175, 22) Source(180, 21) + SourceIndex(0) +1->Emitted(174, 5) Source(180, 5) + SourceIndex(0) +2 >Emitted(174, 6) Source(180, 6) + SourceIndex(0) +3 >Emitted(174, 8) Source(180, 8) + SourceIndex(0) +4 >Emitted(174, 18) Source(180, 17) + SourceIndex(0) +5 >Emitted(174, 19) Source(180, 18) + SourceIndex(0) +6 >Emitted(174, 21) Source(180, 20) + SourceIndex(0) +7 >Emitted(174, 22) Source(180, 21) + SourceIndex(0) --- >>> return s; 1 >^^^^^^^^ @@ -3253,19 +3247,19 @@ sourceFile:contextualTyping.ts 3 > 4 > s 5 > ; -1 >Emitted(176, 9) Source(180, 25) + SourceIndex(0) -2 >Emitted(176, 15) Source(180, 31) + SourceIndex(0) -3 >Emitted(176, 16) Source(180, 32) + SourceIndex(0) -4 >Emitted(176, 17) Source(180, 33) + SourceIndex(0) -5 >Emitted(176, 18) Source(180, 34) + SourceIndex(0) +1 >Emitted(175, 9) Source(180, 25) + SourceIndex(0) +2 >Emitted(175, 15) Source(180, 31) + SourceIndex(0) +3 >Emitted(175, 16) Source(180, 32) + SourceIndex(0) +4 >Emitted(175, 17) Source(180, 33) + SourceIndex(0) +5 >Emitted(175, 18) Source(180, 34) + SourceIndex(0) --- >>> } 1 >^^^^ 2 > ^ 1 > 2 > } -1 >Emitted(177, 5) Source(180, 35) + SourceIndex(0) -2 >Emitted(177, 6) Source(180, 36) + SourceIndex(0) +1 >Emitted(176, 5) Source(180, 35) + SourceIndex(0) +2 >Emitted(176, 6) Source(180, 36) + SourceIndex(0) --- >>>}); 1 >^ @@ -3276,9 +3270,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(178, 2) Source(181, 2) + SourceIndex(0) -2 >Emitted(178, 3) Source(181, 3) + SourceIndex(0) -3 >Emitted(178, 4) Source(181, 3) + SourceIndex(0) +1 >Emitted(177, 2) Source(181, 2) + SourceIndex(0) +2 >Emitted(177, 3) Source(181, 3) + SourceIndex(0) +3 >Emitted(177, 4) Source(181, 3) + SourceIndex(0) --- >>>var c12t14 = ({ 1-> @@ -3292,11 +3286,11 @@ sourceFile:contextualTyping.ts 3 > c12t14 4 > = 5 > ( -1->Emitted(179, 1) Source(182, 1) + SourceIndex(0) -2 >Emitted(179, 5) Source(182, 5) + SourceIndex(0) -3 >Emitted(179, 11) Source(182, 11) + SourceIndex(0) -4 >Emitted(179, 14) Source(182, 21) + SourceIndex(0) -5 >Emitted(179, 15) Source(182, 22) + SourceIndex(0) +1->Emitted(178, 1) Source(182, 1) + SourceIndex(0) +2 >Emitted(178, 5) Source(182, 5) + SourceIndex(0) +3 >Emitted(178, 11) Source(182, 11) + SourceIndex(0) +4 >Emitted(178, 14) Source(182, 21) + SourceIndex(0) +5 >Emitted(178, 15) Source(182, 22) + SourceIndex(0) --- >>> a: [] 1 >^^^^ @@ -3308,10 +3302,10 @@ sourceFile:contextualTyping.ts 2 > a 3 > : 4 > [] -1 >Emitted(180, 5) Source(183, 5) + SourceIndex(0) -2 >Emitted(180, 6) Source(183, 6) + SourceIndex(0) -3 >Emitted(180, 8) Source(183, 8) + SourceIndex(0) -4 >Emitted(180, 10) Source(183, 10) + SourceIndex(0) +1 >Emitted(179, 5) Source(183, 5) + SourceIndex(0) +2 >Emitted(179, 6) Source(183, 6) + SourceIndex(0) +3 >Emitted(179, 8) Source(183, 8) + SourceIndex(0) +4 >Emitted(179, 10) Source(183, 10) + SourceIndex(0) --- >>>}); 1 >^ @@ -3322,9 +3316,9 @@ sourceFile:contextualTyping.ts >} 2 > ) 3 > -1 >Emitted(181, 2) Source(184, 2) + SourceIndex(0) -2 >Emitted(181, 3) Source(184, 3) + SourceIndex(0) -3 >Emitted(181, 4) Source(184, 3) + SourceIndex(0) +1 >Emitted(180, 2) Source(184, 2) + SourceIndex(0) +2 >Emitted(180, 3) Source(184, 3) + SourceIndex(0) +3 >Emitted(180, 4) Source(184, 3) + SourceIndex(0) --- >>>function EF1(a, b) { 1-> @@ -3349,13 +3343,13 @@ sourceFile:contextualTyping.ts 5 > a 6 > , 7 > b -1->Emitted(182, 1) Source(191, 1) + SourceIndex(0) -2 >Emitted(182, 10) Source(191, 10) + SourceIndex(0) -3 >Emitted(182, 13) Source(191, 13) + SourceIndex(0) -4 >Emitted(182, 14) Source(191, 14) + SourceIndex(0) -5 >Emitted(182, 15) Source(191, 15) + SourceIndex(0) -6 >Emitted(182, 17) Source(191, 16) + SourceIndex(0) -7 >Emitted(182, 18) Source(191, 17) + SourceIndex(0) +1->Emitted(181, 1) Source(191, 1) + SourceIndex(0) +2 >Emitted(181, 10) Source(191, 10) + SourceIndex(0) +3 >Emitted(181, 13) Source(191, 13) + SourceIndex(0) +4 >Emitted(181, 14) Source(191, 14) + SourceIndex(0) +5 >Emitted(181, 15) Source(191, 15) + SourceIndex(0) +6 >Emitted(181, 17) Source(191, 16) + SourceIndex(0) +7 >Emitted(181, 18) Source(191, 17) + SourceIndex(0) --- >>> return a + b; 1->^^^^ @@ -3372,13 +3366,13 @@ sourceFile:contextualTyping.ts 5 > + 6 > b 7 > ; -1->Emitted(183, 5) Source(191, 21) + SourceIndex(0) name (EF1) -2 >Emitted(183, 11) Source(191, 27) + SourceIndex(0) name (EF1) -3 >Emitted(183, 12) Source(191, 28) + SourceIndex(0) name (EF1) -4 >Emitted(183, 13) Source(191, 29) + SourceIndex(0) name (EF1) -5 >Emitted(183, 16) Source(191, 30) + SourceIndex(0) name (EF1) -6 >Emitted(183, 17) Source(191, 31) + SourceIndex(0) name (EF1) -7 >Emitted(183, 18) Source(191, 32) + SourceIndex(0) name (EF1) +1->Emitted(182, 5) Source(191, 21) + SourceIndex(0) name (EF1) +2 >Emitted(182, 11) Source(191, 27) + SourceIndex(0) name (EF1) +3 >Emitted(182, 12) Source(191, 28) + SourceIndex(0) name (EF1) +4 >Emitted(182, 13) Source(191, 29) + SourceIndex(0) name (EF1) +5 >Emitted(182, 16) Source(191, 30) + SourceIndex(0) name (EF1) +6 >Emitted(182, 17) Source(191, 31) + SourceIndex(0) name (EF1) +7 >Emitted(182, 18) Source(191, 32) + SourceIndex(0) name (EF1) --- >>>} 1 > @@ -3386,8 +3380,8 @@ sourceFile:contextualTyping.ts 3 > ^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >} -1 >Emitted(184, 1) Source(191, 33) + SourceIndex(0) name (EF1) -2 >Emitted(184, 2) Source(191, 34) + SourceIndex(0) name (EF1) +1 >Emitted(183, 1) Source(191, 33) + SourceIndex(0) name (EF1) +2 >Emitted(183, 2) Source(191, 34) + SourceIndex(0) name (EF1) --- >>>var efv = EF1(1, 2); 1-> @@ -3415,17 +3409,17 @@ sourceFile:contextualTyping.ts 9 > 2 10> ) 11> ; -1->Emitted(185, 1) Source(193, 1) + SourceIndex(0) -2 >Emitted(185, 5) Source(193, 5) + SourceIndex(0) -3 >Emitted(185, 8) Source(193, 8) + SourceIndex(0) -4 >Emitted(185, 11) Source(193, 11) + SourceIndex(0) -5 >Emitted(185, 14) Source(193, 14) + SourceIndex(0) -6 >Emitted(185, 15) Source(193, 15) + SourceIndex(0) -7 >Emitted(185, 16) Source(193, 16) + SourceIndex(0) -8 >Emitted(185, 18) Source(193, 17) + SourceIndex(0) -9 >Emitted(185, 19) Source(193, 18) + SourceIndex(0) -10>Emitted(185, 20) Source(193, 19) + SourceIndex(0) -11>Emitted(185, 21) Source(193, 20) + SourceIndex(0) +1->Emitted(184, 1) Source(193, 1) + SourceIndex(0) +2 >Emitted(184, 5) Source(193, 5) + SourceIndex(0) +3 >Emitted(184, 8) Source(193, 8) + SourceIndex(0) +4 >Emitted(184, 11) Source(193, 11) + SourceIndex(0) +5 >Emitted(184, 14) Source(193, 14) + SourceIndex(0) +6 >Emitted(184, 15) Source(193, 15) + SourceIndex(0) +7 >Emitted(184, 16) Source(193, 16) + SourceIndex(0) +8 >Emitted(184, 18) Source(193, 17) + SourceIndex(0) +9 >Emitted(184, 19) Source(193, 18) + SourceIndex(0) +10>Emitted(184, 20) Source(193, 19) + SourceIndex(0) +11>Emitted(184, 21) Source(193, 20) + SourceIndex(0) --- >>>function Point(x, y) { 1-> @@ -3456,13 +3450,13 @@ sourceFile:contextualTyping.ts 5 > x 6 > , 7 > y -1->Emitted(186, 1) Source(207, 1) + SourceIndex(0) -2 >Emitted(186, 10) Source(207, 10) + SourceIndex(0) -3 >Emitted(186, 15) Source(207, 15) + SourceIndex(0) -4 >Emitted(186, 16) Source(207, 16) + SourceIndex(0) -5 >Emitted(186, 17) Source(207, 17) + SourceIndex(0) -6 >Emitted(186, 19) Source(207, 19) + SourceIndex(0) -7 >Emitted(186, 20) Source(207, 20) + SourceIndex(0) +1->Emitted(185, 1) Source(207, 1) + SourceIndex(0) +2 >Emitted(185, 10) Source(207, 10) + SourceIndex(0) +3 >Emitted(185, 15) Source(207, 15) + SourceIndex(0) +4 >Emitted(185, 16) Source(207, 16) + SourceIndex(0) +5 >Emitted(185, 17) Source(207, 17) + SourceIndex(0) +6 >Emitted(185, 19) Source(207, 19) + SourceIndex(0) +7 >Emitted(185, 20) Source(207, 20) + SourceIndex(0) --- >>> this.x = x; 1 >^^^^ @@ -3481,13 +3475,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > x 7 > ; -1 >Emitted(187, 5) Source(208, 5) + SourceIndex(0) name (Point) -2 >Emitted(187, 9) Source(208, 9) + SourceIndex(0) name (Point) -3 >Emitted(187, 10) Source(208, 10) + SourceIndex(0) name (Point) -4 >Emitted(187, 11) Source(208, 11) + SourceIndex(0) name (Point) -5 >Emitted(187, 14) Source(208, 14) + SourceIndex(0) name (Point) -6 >Emitted(187, 15) Source(208, 15) + SourceIndex(0) name (Point) -7 >Emitted(187, 16) Source(208, 16) + SourceIndex(0) name (Point) +1 >Emitted(186, 5) Source(208, 5) + SourceIndex(0) name (Point) +2 >Emitted(186, 9) Source(208, 9) + SourceIndex(0) name (Point) +3 >Emitted(186, 10) Source(208, 10) + SourceIndex(0) name (Point) +4 >Emitted(186, 11) Source(208, 11) + SourceIndex(0) name (Point) +5 >Emitted(186, 14) Source(208, 14) + SourceIndex(0) name (Point) +6 >Emitted(186, 15) Source(208, 15) + SourceIndex(0) name (Point) +7 >Emitted(186, 16) Source(208, 16) + SourceIndex(0) name (Point) --- >>> this.y = y; 1->^^^^ @@ -3506,13 +3500,13 @@ sourceFile:contextualTyping.ts 5 > = 6 > y 7 > ; -1->Emitted(188, 5) Source(209, 5) + SourceIndex(0) name (Point) -2 >Emitted(188, 9) Source(209, 9) + SourceIndex(0) name (Point) -3 >Emitted(188, 10) Source(209, 10) + SourceIndex(0) name (Point) -4 >Emitted(188, 11) Source(209, 11) + SourceIndex(0) name (Point) -5 >Emitted(188, 14) Source(209, 14) + SourceIndex(0) name (Point) -6 >Emitted(188, 15) Source(209, 15) + SourceIndex(0) name (Point) -7 >Emitted(188, 16) Source(209, 16) + SourceIndex(0) name (Point) +1->Emitted(187, 5) Source(209, 5) + SourceIndex(0) name (Point) +2 >Emitted(187, 9) Source(209, 9) + SourceIndex(0) name (Point) +3 >Emitted(187, 10) Source(209, 10) + SourceIndex(0) name (Point) +4 >Emitted(187, 11) Source(209, 11) + SourceIndex(0) name (Point) +5 >Emitted(187, 14) Source(209, 14) + SourceIndex(0) name (Point) +6 >Emitted(187, 15) Source(209, 15) + SourceIndex(0) name (Point) +7 >Emitted(187, 16) Source(209, 16) + SourceIndex(0) name (Point) --- >>> return this; 1->^^^^ @@ -3527,11 +3521,11 @@ sourceFile:contextualTyping.ts 3 > 4 > this 5 > ; -1->Emitted(189, 5) Source(211, 5) + SourceIndex(0) name (Point) -2 >Emitted(189, 11) Source(211, 11) + SourceIndex(0) name (Point) -3 >Emitted(189, 12) Source(211, 12) + SourceIndex(0) name (Point) -4 >Emitted(189, 16) Source(211, 16) + SourceIndex(0) name (Point) -5 >Emitted(189, 17) Source(211, 17) + SourceIndex(0) name (Point) +1->Emitted(188, 5) Source(211, 5) + SourceIndex(0) name (Point) +2 >Emitted(188, 11) Source(211, 11) + SourceIndex(0) name (Point) +3 >Emitted(188, 12) Source(211, 12) + SourceIndex(0) name (Point) +4 >Emitted(188, 16) Source(211, 16) + SourceIndex(0) name (Point) +5 >Emitted(188, 17) Source(211, 17) + SourceIndex(0) name (Point) --- >>>} 1 > @@ -3540,8 +3534,8 @@ sourceFile:contextualTyping.ts 1 > > 2 >} -1 >Emitted(190, 1) Source(212, 1) + SourceIndex(0) name (Point) -2 >Emitted(190, 2) Source(212, 2) + SourceIndex(0) name (Point) +1 >Emitted(189, 1) Source(212, 1) + SourceIndex(0) name (Point) +2 >Emitted(189, 2) Source(212, 2) + SourceIndex(0) name (Point) --- >>>Point.origin = new Point(0, 0); 1-> @@ -3573,19 +3567,19 @@ sourceFile:contextualTyping.ts 11> 0 12> ) 13> ; -1->Emitted(191, 1) Source(214, 1) + SourceIndex(0) -2 >Emitted(191, 6) Source(214, 6) + SourceIndex(0) -3 >Emitted(191, 7) Source(214, 7) + SourceIndex(0) -4 >Emitted(191, 13) Source(214, 13) + SourceIndex(0) -5 >Emitted(191, 16) Source(214, 16) + SourceIndex(0) -6 >Emitted(191, 20) Source(214, 20) + SourceIndex(0) -7 >Emitted(191, 25) Source(214, 25) + SourceIndex(0) -8 >Emitted(191, 26) Source(214, 26) + SourceIndex(0) -9 >Emitted(191, 27) Source(214, 27) + SourceIndex(0) -10>Emitted(191, 29) Source(214, 29) + SourceIndex(0) -11>Emitted(191, 30) Source(214, 30) + SourceIndex(0) -12>Emitted(191, 31) Source(214, 31) + SourceIndex(0) -13>Emitted(191, 32) Source(214, 32) + SourceIndex(0) +1->Emitted(190, 1) Source(214, 1) + SourceIndex(0) +2 >Emitted(190, 6) Source(214, 6) + SourceIndex(0) +3 >Emitted(190, 7) Source(214, 7) + SourceIndex(0) +4 >Emitted(190, 13) Source(214, 13) + SourceIndex(0) +5 >Emitted(190, 16) Source(214, 16) + SourceIndex(0) +6 >Emitted(190, 20) Source(214, 20) + SourceIndex(0) +7 >Emitted(190, 25) Source(214, 25) + SourceIndex(0) +8 >Emitted(190, 26) Source(214, 26) + SourceIndex(0) +9 >Emitted(190, 27) Source(214, 27) + SourceIndex(0) +10>Emitted(190, 29) Source(214, 29) + SourceIndex(0) +11>Emitted(190, 30) Source(214, 30) + SourceIndex(0) +12>Emitted(190, 31) Source(214, 31) + SourceIndex(0) +13>Emitted(190, 32) Source(214, 32) + SourceIndex(0) --- >>>Point.prototype.add = function (dx, dy) { 1-> @@ -3613,17 +3607,17 @@ sourceFile:contextualTyping.ts 9 > dx 10> , 11> dy -1->Emitted(192, 1) Source(216, 1) + SourceIndex(0) -2 >Emitted(192, 6) Source(216, 6) + SourceIndex(0) -3 >Emitted(192, 7) Source(216, 7) + SourceIndex(0) -4 >Emitted(192, 16) Source(216, 16) + SourceIndex(0) -5 >Emitted(192, 17) Source(216, 17) + SourceIndex(0) -6 >Emitted(192, 20) Source(216, 20) + SourceIndex(0) -7 >Emitted(192, 23) Source(216, 23) + SourceIndex(0) -8 >Emitted(192, 33) Source(216, 32) + SourceIndex(0) -9 >Emitted(192, 35) Source(216, 34) + SourceIndex(0) -10>Emitted(192, 37) Source(216, 36) + SourceIndex(0) -11>Emitted(192, 39) Source(216, 38) + SourceIndex(0) +1->Emitted(191, 1) Source(216, 1) + SourceIndex(0) +2 >Emitted(191, 6) Source(216, 6) + SourceIndex(0) +3 >Emitted(191, 7) Source(216, 7) + SourceIndex(0) +4 >Emitted(191, 16) Source(216, 16) + SourceIndex(0) +5 >Emitted(191, 17) Source(216, 17) + SourceIndex(0) +6 >Emitted(191, 20) Source(216, 20) + SourceIndex(0) +7 >Emitted(191, 23) Source(216, 23) + SourceIndex(0) +8 >Emitted(191, 33) Source(216, 32) + SourceIndex(0) +9 >Emitted(191, 35) Source(216, 34) + SourceIndex(0) +10>Emitted(191, 37) Source(216, 36) + SourceIndex(0) +11>Emitted(191, 39) Source(216, 38) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^ @@ -3665,25 +3659,25 @@ sourceFile:contextualTyping.ts 17> dy 18> ) 19> ; -1->Emitted(193, 5) Source(217, 5) + SourceIndex(0) -2 >Emitted(193, 11) Source(217, 11) + SourceIndex(0) -3 >Emitted(193, 12) Source(217, 12) + SourceIndex(0) -4 >Emitted(193, 16) Source(217, 16) + SourceIndex(0) -5 >Emitted(193, 21) Source(217, 21) + SourceIndex(0) -6 >Emitted(193, 22) Source(217, 22) + SourceIndex(0) -7 >Emitted(193, 26) Source(217, 26) + SourceIndex(0) -8 >Emitted(193, 27) Source(217, 27) + SourceIndex(0) -9 >Emitted(193, 28) Source(217, 28) + SourceIndex(0) -10>Emitted(193, 31) Source(217, 31) + SourceIndex(0) -11>Emitted(193, 33) Source(217, 33) + SourceIndex(0) -12>Emitted(193, 35) Source(217, 35) + SourceIndex(0) -13>Emitted(193, 39) Source(217, 39) + SourceIndex(0) -14>Emitted(193, 40) Source(217, 40) + SourceIndex(0) -15>Emitted(193, 41) Source(217, 41) + SourceIndex(0) -16>Emitted(193, 44) Source(217, 44) + SourceIndex(0) -17>Emitted(193, 46) Source(217, 46) + SourceIndex(0) -18>Emitted(193, 47) Source(217, 47) + SourceIndex(0) -19>Emitted(193, 48) Source(217, 48) + SourceIndex(0) +1->Emitted(192, 5) Source(217, 5) + SourceIndex(0) +2 >Emitted(192, 11) Source(217, 11) + SourceIndex(0) +3 >Emitted(192, 12) Source(217, 12) + SourceIndex(0) +4 >Emitted(192, 16) Source(217, 16) + SourceIndex(0) +5 >Emitted(192, 21) Source(217, 21) + SourceIndex(0) +6 >Emitted(192, 22) Source(217, 22) + SourceIndex(0) +7 >Emitted(192, 26) Source(217, 26) + SourceIndex(0) +8 >Emitted(192, 27) Source(217, 27) + SourceIndex(0) +9 >Emitted(192, 28) Source(217, 28) + SourceIndex(0) +10>Emitted(192, 31) Source(217, 31) + SourceIndex(0) +11>Emitted(192, 33) Source(217, 33) + SourceIndex(0) +12>Emitted(192, 35) Source(217, 35) + SourceIndex(0) +13>Emitted(192, 39) Source(217, 39) + SourceIndex(0) +14>Emitted(192, 40) Source(217, 40) + SourceIndex(0) +15>Emitted(192, 41) Source(217, 41) + SourceIndex(0) +16>Emitted(192, 44) Source(217, 44) + SourceIndex(0) +17>Emitted(192, 46) Source(217, 46) + SourceIndex(0) +18>Emitted(192, 47) Source(217, 47) + SourceIndex(0) +19>Emitted(192, 48) Source(217, 48) + SourceIndex(0) --- >>>}; 1 > @@ -3694,9 +3688,9 @@ sourceFile:contextualTyping.ts > 2 >} 3 > ; -1 >Emitted(194, 1) Source(218, 1) + SourceIndex(0) -2 >Emitted(194, 2) Source(218, 2) + SourceIndex(0) -3 >Emitted(194, 3) Source(218, 3) + SourceIndex(0) +1 >Emitted(193, 1) Source(218, 1) + SourceIndex(0) +2 >Emitted(193, 2) Source(218, 2) + SourceIndex(0) +3 >Emitted(193, 3) Source(218, 3) + SourceIndex(0) --- >>>Point.prototype = { 1-> @@ -3711,11 +3705,11 @@ sourceFile:contextualTyping.ts 3 > . 4 > prototype 5 > = -1->Emitted(195, 1) Source(220, 1) + SourceIndex(0) -2 >Emitted(195, 6) Source(220, 6) + SourceIndex(0) -3 >Emitted(195, 7) Source(220, 7) + SourceIndex(0) -4 >Emitted(195, 16) Source(220, 16) + SourceIndex(0) -5 >Emitted(195, 19) Source(220, 19) + SourceIndex(0) +1->Emitted(194, 1) Source(220, 1) + SourceIndex(0) +2 >Emitted(194, 6) Source(220, 6) + SourceIndex(0) +3 >Emitted(194, 7) Source(220, 7) + SourceIndex(0) +4 >Emitted(194, 16) Source(220, 16) + SourceIndex(0) +5 >Emitted(194, 19) Source(220, 19) + SourceIndex(0) --- >>> x: 0, 1 >^^^^ @@ -3728,10 +3722,10 @@ sourceFile:contextualTyping.ts 2 > x 3 > : 4 > 0 -1 >Emitted(196, 5) Source(221, 5) + SourceIndex(0) -2 >Emitted(196, 6) Source(221, 6) + SourceIndex(0) -3 >Emitted(196, 8) Source(221, 8) + SourceIndex(0) -4 >Emitted(196, 9) Source(221, 9) + SourceIndex(0) +1 >Emitted(195, 5) Source(221, 5) + SourceIndex(0) +2 >Emitted(195, 6) Source(221, 6) + SourceIndex(0) +3 >Emitted(195, 8) Source(221, 8) + SourceIndex(0) +4 >Emitted(195, 9) Source(221, 9) + SourceIndex(0) --- >>> y: 0, 1->^^^^ @@ -3744,10 +3738,10 @@ sourceFile:contextualTyping.ts 2 > y 3 > : 4 > 0 -1->Emitted(197, 5) Source(222, 5) + SourceIndex(0) -2 >Emitted(197, 6) Source(222, 6) + SourceIndex(0) -3 >Emitted(197, 8) Source(222, 8) + SourceIndex(0) -4 >Emitted(197, 9) Source(222, 9) + SourceIndex(0) +1->Emitted(196, 5) Source(222, 5) + SourceIndex(0) +2 >Emitted(196, 6) Source(222, 6) + SourceIndex(0) +3 >Emitted(196, 8) Source(222, 8) + SourceIndex(0) +4 >Emitted(196, 9) Source(222, 9) + SourceIndex(0) --- >>> add: function (dx, dy) { 1->^^^^ @@ -3766,13 +3760,13 @@ sourceFile:contextualTyping.ts 5 > dx 6 > , 7 > dy -1->Emitted(198, 5) Source(223, 5) + SourceIndex(0) -2 >Emitted(198, 8) Source(223, 8) + SourceIndex(0) -3 >Emitted(198, 10) Source(223, 10) + SourceIndex(0) -4 >Emitted(198, 20) Source(223, 19) + SourceIndex(0) -5 >Emitted(198, 22) Source(223, 21) + SourceIndex(0) -6 >Emitted(198, 24) Source(223, 23) + SourceIndex(0) -7 >Emitted(198, 26) Source(223, 25) + SourceIndex(0) +1->Emitted(197, 5) Source(223, 5) + SourceIndex(0) +2 >Emitted(197, 8) Source(223, 8) + SourceIndex(0) +3 >Emitted(197, 10) Source(223, 10) + SourceIndex(0) +4 >Emitted(197, 20) Source(223, 19) + SourceIndex(0) +5 >Emitted(197, 22) Source(223, 21) + SourceIndex(0) +6 >Emitted(197, 24) Source(223, 23) + SourceIndex(0) +7 >Emitted(197, 26) Source(223, 25) + SourceIndex(0) --- >>> return new Point(this.x + dx, this.y + dy); 1->^^^^^^^^ @@ -3814,25 +3808,25 @@ sourceFile:contextualTyping.ts 17> dy 18> ) 19> ; -1->Emitted(199, 9) Source(224, 9) + SourceIndex(0) -2 >Emitted(199, 15) Source(224, 15) + SourceIndex(0) -3 >Emitted(199, 16) Source(224, 16) + SourceIndex(0) -4 >Emitted(199, 20) Source(224, 20) + SourceIndex(0) -5 >Emitted(199, 25) Source(224, 25) + SourceIndex(0) -6 >Emitted(199, 26) Source(224, 26) + SourceIndex(0) -7 >Emitted(199, 30) Source(224, 30) + SourceIndex(0) -8 >Emitted(199, 31) Source(224, 31) + SourceIndex(0) -9 >Emitted(199, 32) Source(224, 32) + SourceIndex(0) -10>Emitted(199, 35) Source(224, 35) + SourceIndex(0) -11>Emitted(199, 37) Source(224, 37) + SourceIndex(0) -12>Emitted(199, 39) Source(224, 39) + SourceIndex(0) -13>Emitted(199, 43) Source(224, 43) + SourceIndex(0) -14>Emitted(199, 44) Source(224, 44) + SourceIndex(0) -15>Emitted(199, 45) Source(224, 45) + SourceIndex(0) -16>Emitted(199, 48) Source(224, 48) + SourceIndex(0) -17>Emitted(199, 50) Source(224, 50) + SourceIndex(0) -18>Emitted(199, 51) Source(224, 51) + SourceIndex(0) -19>Emitted(199, 52) Source(224, 52) + SourceIndex(0) +1->Emitted(198, 9) Source(224, 9) + SourceIndex(0) +2 >Emitted(198, 15) Source(224, 15) + SourceIndex(0) +3 >Emitted(198, 16) Source(224, 16) + SourceIndex(0) +4 >Emitted(198, 20) Source(224, 20) + SourceIndex(0) +5 >Emitted(198, 25) Source(224, 25) + SourceIndex(0) +6 >Emitted(198, 26) Source(224, 26) + SourceIndex(0) +7 >Emitted(198, 30) Source(224, 30) + SourceIndex(0) +8 >Emitted(198, 31) Source(224, 31) + SourceIndex(0) +9 >Emitted(198, 32) Source(224, 32) + SourceIndex(0) +10>Emitted(198, 35) Source(224, 35) + SourceIndex(0) +11>Emitted(198, 37) Source(224, 37) + SourceIndex(0) +12>Emitted(198, 39) Source(224, 39) + SourceIndex(0) +13>Emitted(198, 43) Source(224, 43) + SourceIndex(0) +14>Emitted(198, 44) Source(224, 44) + SourceIndex(0) +15>Emitted(198, 45) Source(224, 45) + SourceIndex(0) +16>Emitted(198, 48) Source(224, 48) + SourceIndex(0) +17>Emitted(198, 50) Source(224, 50) + SourceIndex(0) +18>Emitted(198, 51) Source(224, 51) + SourceIndex(0) +19>Emitted(198, 52) Source(224, 52) + SourceIndex(0) --- >>> } 1 >^^^^ @@ -3840,8 +3834,8 @@ sourceFile:contextualTyping.ts 1 > > 2 > } -1 >Emitted(200, 5) Source(225, 5) + SourceIndex(0) -2 >Emitted(200, 6) Source(225, 6) + SourceIndex(0) +1 >Emitted(199, 5) Source(225, 5) + SourceIndex(0) +2 >Emitted(199, 6) Source(225, 6) + SourceIndex(0) --- >>>}; 1 >^ @@ -3850,8 +3844,8 @@ sourceFile:contextualTyping.ts 1 > >} 2 > ; -1 >Emitted(201, 2) Source(226, 2) + SourceIndex(0) -2 >Emitted(201, 3) Source(226, 3) + SourceIndex(0) +1 >Emitted(200, 2) Source(226, 2) + SourceIndex(0) +2 >Emitted(200, 3) Source(226, 3) + SourceIndex(0) --- >>>var x = {}; 1-> @@ -3871,11 +3865,11 @@ sourceFile:contextualTyping.ts 4 > : B = 5 > { } 6 > ; -1->Emitted(202, 1) Source(230, 1) + SourceIndex(0) -2 >Emitted(202, 5) Source(230, 5) + SourceIndex(0) -3 >Emitted(202, 6) Source(230, 6) + SourceIndex(0) -4 >Emitted(202, 9) Source(230, 12) + SourceIndex(0) -5 >Emitted(202, 11) Source(230, 15) + SourceIndex(0) -6 >Emitted(202, 12) Source(230, 16) + SourceIndex(0) +1->Emitted(201, 1) Source(230, 1) + SourceIndex(0) +2 >Emitted(201, 5) Source(230, 5) + SourceIndex(0) +3 >Emitted(201, 6) Source(230, 6) + SourceIndex(0) +4 >Emitted(201, 9) Source(230, 12) + SourceIndex(0) +5 >Emitted(201, 11) Source(230, 15) + SourceIndex(0) +6 >Emitted(201, 12) Source(230, 16) + SourceIndex(0) --- >>>//# sourceMappingURL=contextualTyping.js.map \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping25.js b/tests/baselines/reference/contextualTyping25.js index 808ee2202ec..f90a70098d7 100644 --- a/tests/baselines/reference/contextualTyping25.js +++ b/tests/baselines/reference/contextualTyping25.js @@ -2,7 +2,6 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping25.js] -function foo(param) { -} +function foo(param) { } ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping26.js b/tests/baselines/reference/contextualTyping26.js index fabd810c8f5..feacf3da328 100644 --- a/tests/baselines/reference/contextualTyping26.js +++ b/tests/baselines/reference/contextualTyping26.js @@ -2,7 +2,6 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping26.js] -function foo(param) { -} +function foo(param) { } ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping27.js b/tests/baselines/reference/contextualTyping27.js index 11b8c251416..ce35e606196 100644 --- a/tests/baselines/reference/contextualTyping27.js +++ b/tests/baselines/reference/contextualTyping27.js @@ -2,7 +2,6 @@ function foo(param:{id:number;}){}; foo(<{id:number;}>({})); //// [contextualTyping27.js] -function foo(param) { -} +function foo(param) { } ; foo(({})); diff --git a/tests/baselines/reference/contextualTyping28.js b/tests/baselines/reference/contextualTyping28.js index 24f269efb10..095e3812400 100644 --- a/tests/baselines/reference/contextualTyping28.js +++ b/tests/baselines/reference/contextualTyping28.js @@ -2,7 +2,6 @@ function foo(param:number[]){}; foo([1]); //// [contextualTyping28.js] -function foo(param) { -} +function foo(param) { } ; foo([1]); diff --git a/tests/baselines/reference/contextualTyping29.js b/tests/baselines/reference/contextualTyping29.js index 3f29d16060c..1d5b32c208d 100644 --- a/tests/baselines/reference/contextualTyping29.js +++ b/tests/baselines/reference/contextualTyping29.js @@ -2,7 +2,6 @@ function foo(param:number[]){}; foo([1, 3]); //// [contextualTyping29.js] -function foo(param) { -} +function foo(param) { } ; foo([1, 3]); diff --git a/tests/baselines/reference/contextualTyping30.js b/tests/baselines/reference/contextualTyping30.js index daf74ff9f6b..94547a387d7 100644 --- a/tests/baselines/reference/contextualTyping30.js +++ b/tests/baselines/reference/contextualTyping30.js @@ -2,7 +2,6 @@ function foo(param:number[]){}; foo([1, "a"]); //// [contextualTyping30.js] -function foo(param) { -} +function foo(param) { } ; foo([1, "a"]); diff --git a/tests/baselines/reference/contextualTyping31.js b/tests/baselines/reference/contextualTyping31.js index 346f753cd1d..1eb4d5660fc 100644 --- a/tests/baselines/reference/contextualTyping31.js +++ b/tests/baselines/reference/contextualTyping31.js @@ -2,7 +2,6 @@ function foo(param:number[]){}; foo([1]); //// [contextualTyping31.js] -function foo(param) { -} +function foo(param) { } ; foo([1]); diff --git a/tests/baselines/reference/contextualTyping32.js b/tests/baselines/reference/contextualTyping32.js index 0c02caac75d..992724d4130 100644 --- a/tests/baselines/reference/contextualTyping32.js +++ b/tests/baselines/reference/contextualTyping32.js @@ -2,8 +2,7 @@ function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return 4}]); //// [contextualTyping32.js] -function foo(param) { -} +function foo(param) { } ; foo([function () { return 1; diff --git a/tests/baselines/reference/contextualTyping33.js b/tests/baselines/reference/contextualTyping33.js index d61e6fe2d5f..0ca0c965b8b 100644 --- a/tests/baselines/reference/contextualTyping33.js +++ b/tests/baselines/reference/contextualTyping33.js @@ -2,8 +2,7 @@ function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); //// [contextualTyping33.js] -function foo(param) { -} +function foo(param) { } ; foo([function () { return 1; diff --git a/tests/baselines/reference/contextualTypingArrayOfLambdas.js b/tests/baselines/reference/contextualTypingArrayOfLambdas.js index ffe00308636..844a50428e2 100644 --- a/tests/baselines/reference/contextualTypingArrayOfLambdas.js +++ b/tests/baselines/reference/contextualTypingArrayOfLambdas.js @@ -40,7 +40,4 @@ var C = (function (_super) { } return C; })(A); -var xs = [function (x) { -}, function (x) { -}, function (x) { -}]; +var xs = [function (x) { }, function (x) { }, function (x) { }]; diff --git a/tests/baselines/reference/contextualTypingOfAccessors.js b/tests/baselines/reference/contextualTypingOfAccessors.js index 45463936831..f785d19636c 100644 --- a/tests/baselines/reference/contextualTypingOfAccessors.js +++ b/tests/baselines/reference/contextualTypingOfAccessors.js @@ -20,6 +20,5 @@ x = { get foo() { return function (n) { return n; }; }, - set foo(x) { - } + set foo(x) { } }; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js index e0008bd49c6..f832d2766ee 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression2.js +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression2.js @@ -38,5 +38,4 @@ var C = (function (_super) { } return C; })(A); -var x2 = true ? function (a) { return a.foo; } : function (b) { -}; +var x2 = true ? function (a) { return a.foo; } : function (b) { }; diff --git a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js index f7e6b63ce05..220e06da59d 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js +++ b/tests/baselines/reference/contextualTypingOfLambdaReturnExpression.js @@ -7,8 +7,7 @@ callb((a) => a.length); // Ok, we choose the second overload because the first o callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body //// [contextualTypingOfLambdaReturnExpression.js] -function callb(a) { -} +function callb(a) { } callb(function (a) { return a.length; }); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type callb(function (a) { a.length; diff --git a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js index 400a052a7bb..f21bc852af8 100644 --- a/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js +++ b/tests/baselines/reference/contextualTypingOfLambdaWithMultipleSignatures.js @@ -9,5 +9,4 @@ foo.getFoo = bar => { }; //// [contextualTypingOfLambdaWithMultipleSignatures.js] var foo; -foo.getFoo = function (bar) { -}; +foo.getFoo = function (bar) { }; diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.js b/tests/baselines/reference/contextualTypingOfObjectLiterals.js index 2d585284f50..e267ce6269e 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.js @@ -15,8 +15,7 @@ var obj1; var obj2 = { x: "" }; obj1 = {}; // Ok obj1 = obj2; // Error - indexer doesn't match -function f(x) { -} +function f(x) { } f({}); // Ok f(obj1); // Ok f(obj2); // Error - indexer doesn't match diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js index ce8abe35810..4c450d31152 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals2.js +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals2.js @@ -6,6 +6,5 @@ function f2(args: Foo) { } f2({ foo: s => s.hmm }) // 's' should be 'string', so this should be an error //// [contextualTypingOfObjectLiterals2.js] -function f2(args) { -} +function f2(args) { } f2({ foo: function (s) { return s.hmm; } }); // 's' should be 'string', so this should be an error diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js index deae65b54c9..a68f751f434 100644 --- a/tests/baselines/reference/convertKeywordsYes.js +++ b/tests/baselines/reference/convertKeywordsYes.js @@ -325,8 +325,7 @@ var string = 0; var get = 0; var yield = 0; var declare = 0; -function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { -} +function bigGeneric(c, a, b2, i, i2, l, m, n, p, p2, p3, p4, s, s2, s3, g, y, d) { } var bigObject = { constructor: 0, any: 0, diff --git a/tests/baselines/reference/covariance1.js b/tests/baselines/reference/covariance1.js index 3c3891af882..bed31338cbe 100644 --- a/tests/baselines/reference/covariance1.js +++ b/tests/baselines/reference/covariance1.js @@ -27,8 +27,7 @@ var M; return XX; })(); M.XX = XX; - function f(y) { - } + function f(y) { } M.f = f; var a; f({ x: a }); // ok diff --git a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js index 30ba24ed405..7814e9641ba 100644 --- a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js +++ b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js @@ -16,8 +16,7 @@ var Foo = (function () { })(); exports.Foo = Foo; //// [declFileAliasUseBeforeDeclaration_test.js] -function bar(a) { -} +function bar(a) { } exports.bar = bar; diff --git a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js index 52d11836b11..5d7273098f1 100644 --- a/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js +++ b/tests/baselines/reference/declFileForClassWithMultipleBaseClasses.js @@ -31,28 +31,22 @@ interface I extends A, B { var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { - }; + B.prototype.bar = function () { }; return B; })(); var D = (function () { function D() { } - D.prototype.baz = function () { - }; - D.prototype.bat = function () { - }; - D.prototype.foo = function () { - }; - D.prototype.bar = function () { - }; + D.prototype.baz = function () { }; + D.prototype.bat = function () { }; + D.prototype.foo = function () { }; + D.prototype.bar = function () { }; return D; })(); diff --git a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js index 545b70f743a..ee2dc8e83bd 100644 --- a/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js +++ b/tests/baselines/reference/declFileForClassWithPrivateOverloadedFunction.js @@ -10,8 +10,7 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index 3c8120e8db9..d6d63e3443a 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -98,8 +98,7 @@ exports.c = C.F2; exports.d = C.F3; exports.e = C.F4; exports.x = (new C.D(new C.A())).val; -function f() { -} +function f() { } exports.f = f; exports.g = C.F5(); var h = (function (_super) { diff --git a/tests/baselines/reference/declFilePrivateStatic.js b/tests/baselines/reference/declFilePrivateStatic.js index 5bec38e4dee..38efa8255a7 100644 --- a/tests/baselines/reference/declFilePrivateStatic.js +++ b/tests/baselines/reference/declFilePrivateStatic.js @@ -18,10 +18,8 @@ class C { var C = (function () { function C() { } - C.a = function () { - }; - C.b = function () { - }; + C.a = function () { }; + C.b = function () { }; Object.defineProperty(C, "c", { get: function () { return 1; @@ -37,14 +35,12 @@ var C = (function () { configurable: true }); Object.defineProperty(C, "e", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); Object.defineProperty(C, "f", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/declFileRegressionTests.js b/tests/baselines/reference/declFileRegressionTests.js index f8d0edbe48a..a8bf23a8ea8 100644 --- a/tests/baselines/reference/declFileRegressionTests.js +++ b/tests/baselines/reference/declFileRegressionTests.js @@ -8,8 +8,7 @@ var n = { w: null, x: '', y: () => { }, z: 32 }; //// [declFileRegressionTests.js] // 'null' not converted to 'any' in d.ts // function types not piped through correctly -var n = { w: null, x: '', y: function () { -}, z: 32 }; +var n = { w: null, x: '', y: function () { }, z: 32 }; //// [declFileRegressionTests.d.ts] diff --git a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js index 2d071c80de9..3cea09c8c26 100644 --- a/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js +++ b/tests/baselines/reference/declFileRestParametersOfFunctionAndFunctionType.js @@ -11,20 +11,11 @@ var f6 = () => { return [10]; } //// [declFileRestParametersOfFunctionAndFunctionType.js] -function f1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i - 0] = arguments[_i]; - } -} -function f2(x) { -} -function f3(x) { -} -function f4() { -} -function f5() { -} +function f1() { } +function f2(x) { } +function f3(x) { } +function f4() { } +function f5() { } var f6 = function () { return [10]; }; diff --git a/tests/baselines/reference/declInput-2.js b/tests/baselines/reference/declInput-2.js index 3ba5ae11bf6..30a306c09f8 100644 --- a/tests/baselines/reference/declInput-2.js +++ b/tests/baselines/reference/declInput-2.js @@ -47,10 +47,8 @@ var M; D.prototype.m252 = function () { return null; }; // don't generate - D.prototype.m26 = function (i) { - }; - D.prototype.m262 = function (i) { - }; + D.prototype.m26 = function (i) { }; + D.prototype.m262 = function (i) { }; D.prototype.m3 = function () { return new C(); }; diff --git a/tests/baselines/reference/declInput4.js b/tests/baselines/reference/declInput4.js index 18025c808fa..cce9127eddc 100644 --- a/tests/baselines/reference/declInput4.js +++ b/tests/baselines/reference/declInput4.js @@ -38,8 +38,7 @@ var M; D.prototype.m242 = function () { return null; }; - D.prototype.m26 = function (i) { - }; + D.prototype.m26 = function (i) { }; return D; })(); M.D = D; diff --git a/tests/baselines/reference/declarationEmit_nameConflicts.js b/tests/baselines/reference/declarationEmit_nameConflicts.js index 161224659f1..ae517bb7460 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts.js @@ -64,8 +64,7 @@ module.exports = f; var im = require('declarationEmit_nameConflicts_1'); var M; (function (M) { - function f() { - } + function f() { } M.f = f; var C = (function () { function C() { @@ -75,8 +74,7 @@ var M; M.C = C; var N; (function (N) { - function g() { - } + function g() { } N.g = g; ; })(N = M.N || (M.N = {})); @@ -89,8 +87,7 @@ var M; (function (M) { var P; (function (P) { - function f() { - } + function f() { } P.f = f; var C = (function () { function C() { @@ -100,8 +97,7 @@ var M; P.C = C; var N; (function (N) { - function g() { - } + function g() { } N.g = g; ; })(N = P.N || (P.N = {})); @@ -117,8 +113,7 @@ var M; (function (M) { var Q; (function (Q) { - function f() { - } + function f() { } Q.f = f; var C = (function () { function C() { @@ -128,8 +123,7 @@ var M; Q.C = C; var N; (function (N) { - function g() { - } + function g() { } N.g = g; ; })(N = Q.N || (Q.N = {})); diff --git a/tests/baselines/reference/declarationEmit_nameConflicts2.js b/tests/baselines/reference/declarationEmit_nameConflicts2.js index 43167f531d7..2a228080c68 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts2.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts2.js @@ -22,8 +22,7 @@ var X; (function (Y) { var base; (function (base) { - function f() { - } + function f() { } base.f = f; var C = (function () { function C() { diff --git a/tests/baselines/reference/declarationEmit_nameConflicts3.js b/tests/baselines/reference/declarationEmit_nameConflicts3.js index 848343362bc..0d68c38cfda 100644 --- a/tests/baselines/reference/declarationEmit_nameConflicts3.js +++ b/tests/baselines/reference/declarationEmit_nameConflicts3.js @@ -37,20 +37,17 @@ var M; (function (M) { var D; (function (D) { - function f() { - } + function f() { } D.f = f; })(D = M.D || (M.D = {})); var C; (function (C) { - function f() { - } + function f() { } C.f = f; })(C = M.C || (M.C = {})); var E; (function (E) { - function f() { - } + function f() { } E.f = f; })(E = M.E || (M.E = {})); })(M || (M = {})); @@ -61,8 +58,7 @@ var M; var C = (function () { function C() { } - C.f = function () { - }; + C.f = function () { }; return C; })(); P.C = C; diff --git a/tests/baselines/reference/declarationEmit_protectedMembers.js b/tests/baselines/reference/declarationEmit_protectedMembers.js index dc8506b220b..ff4323ce542 100644 --- a/tests/baselines/reference/declarationEmit_protectedMembers.js +++ b/tests/baselines/reference/declarationEmit_protectedMembers.js @@ -68,8 +68,7 @@ var C1 = (function () { get: function () { return 0; }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); @@ -77,8 +76,7 @@ var C1 = (function () { return this.sx; }; Object.defineProperty(C1, "staticSetter", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js index 6006f1bcf26..8e4f927a920 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -77,8 +77,7 @@ ANY2--; var ANY1; var ANY2 = ["", ""]; var obj; -var obj1 = { x: "", y: function () { -} }; +var obj1 = { x: "", y: function () { } }; function foo() { var a; return a; diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.js b/tests/baselines/reference/defaultArgsInFunctionExpressions.js index 3f77c4430e8..b0c1fe5824a 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.js +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.js @@ -49,24 +49,16 @@ s = f2(''); s = f2(); n = f2(); // Contextually type the default arg with the type annotation -var f3 = function (a) { - if (a === void 0) { a = function (s) { return s; }; } -}; +var f3 = function (a) { }; // Type check using the function's contextual type -var f4 = function (a) { - if (a === void 0) { a = ""; } -}; +var f4 = function (a) { }; // Contextually type the default arg using the function's contextual type -var f5 = function (a) { - if (a === void 0) { a = function (s) { return s; }; } -}; +var f5 = function (a) { }; var U; (function (U) { U.x; })(U || (U = {})); -var f6 = function (t) { - if (t === void 0) { t = T; } -}; +var f6 = function (t) { }; var f7 = function (t) { if (t === void 0) { t = U; } return t; diff --git a/tests/baselines/reference/defaultArgsInOverloads.js b/tests/baselines/reference/defaultArgsInOverloads.js index defc4f3e223..9bcb24ff653 100644 --- a/tests/baselines/reference/defaultArgsInOverloads.js +++ b/tests/baselines/reference/defaultArgsInOverloads.js @@ -20,18 +20,12 @@ interface I { var f: (a = 3) => number; //// [defaultArgsInOverloads.js] -function fun(a) { - if (a === void 0) { a = null; } -} +function fun(a) { } var C = (function () { function C() { } - C.prototype.fun = function (a) { - if (a === void 0) { a = null; } - }; - C.fun = function (a) { - if (a === void 0) { a = null; } - }; + C.prototype.fun = function (a) { }; + C.fun = function (a) { }; return C; })(); var f; diff --git a/tests/baselines/reference/defaultValueInFunctionOverload1.js b/tests/baselines/reference/defaultValueInFunctionOverload1.js index 0f33fe9ff2e..15aa9f22b48 100644 --- a/tests/baselines/reference/defaultValueInFunctionOverload1.js +++ b/tests/baselines/reference/defaultValueInFunctionOverload1.js @@ -3,6 +3,4 @@ function foo(x: string = ''); function foo(x = '') { } //// [defaultValueInFunctionOverload1.js] -function foo(x) { - if (x === void 0) { x = ''; } -} +function foo(x) { } diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js b/tests/baselines/reference/deleteOperatorWithAnyOtherType.js index c8a84ac83ea..e2a2be4d9aa 100644 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType.js @@ -67,8 +67,7 @@ var ANY; var ANY1; var ANY2 = ["", ""]; var obj; -var obj1 = { x: "", y: function () { -} }; +var obj1 = { x: "", y: function () { } }; function foo() { var a; return a; diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js index db54affa6d9..bdfa31cb04f 100644 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.js +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.js @@ -50,25 +50,21 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base(x) { } - Base.prototype.b = function () { - }; + Base.prototype.b = function () { }; Object.defineProperty(Base.prototype, "c", { get: function () { return ''; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Base.s = function () { - }; + Base.s = function () { }; Object.defineProperty(Base, "t", { get: function () { return ''; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js index 8c8b6a13c7e..af725e9b7bd 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers.js @@ -48,25 +48,21 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { - }; + Base.prototype.b = function (a) { }; Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Base.s = function (a) { - }; + Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -77,25 +73,21 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, x); } - Derived.prototype.b = function (a) { - }; + Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { get: function () { return y; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Derived.s = function (a) { - }; + Derived.s = function (a) { }; Object.defineProperty(Derived, "t", { get: function () { return y; }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js index 55bfd0e924d..b1f5de00fb5 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.js @@ -75,25 +75,21 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { - }; + Base.prototype.b = function (a) { }; Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Base.s = function (a) { - }; + Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -105,25 +101,21 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, a); } - Derived.prototype.b = function (a) { - }; + Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { get: function () { return y; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Derived.s = function (a) { - }; + Derived.s = function (a) { }; Object.defineProperty(Derived, "t", { get: function () { return y; }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js index 0a228a04f71..d6b93addbd3 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers3.js @@ -83,25 +83,21 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { - }; + Base.prototype.b = function (a) { }; Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Base.s = function (a) { - }; + Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -121,8 +117,7 @@ var Derived2 = (function (_super) { function Derived2(a) { _super.call(this, a); } - Derived2.prototype.b = function (a) { - }; + Derived2.prototype.b = function (a) { }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -145,8 +140,7 @@ var Derived4 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived4.prototype, "c", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -171,8 +165,7 @@ var Derived7 = (function (_super) { function Derived7(a) { _super.call(this, a); } - Derived7.s = function (a) { - }; + Derived7.s = function (a) { }; return Derived7; })(Base); var Derived8 = (function (_super) { @@ -195,8 +188,7 @@ var Derived9 = (function (_super) { _super.call(this, a); } Object.defineProperty(Derived9, "t", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.js b/tests/baselines/reference/derivedClassOverridesPublicMembers.js index f673d9ab856..a1df28586d9 100644 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.js +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.js @@ -74,25 +74,21 @@ var y; var Base = (function () { function Base(a) { } - Base.prototype.b = function (a) { - }; + Base.prototype.b = function (a) { }; Object.defineProperty(Base.prototype, "c", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Base.s = function (a) { - }; + Base.s = function (a) { }; Object.defineProperty(Base, "t", { get: function () { return x; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -103,25 +99,21 @@ var Derived = (function (_super) { function Derived(a) { _super.call(this, x); } - Derived.prototype.b = function (a) { - }; + Derived.prototype.b = function (a) { }; Object.defineProperty(Derived.prototype, "c", { get: function () { return y; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); - Derived.s = function (a) { - }; + Derived.s = function (a) { }; Object.defineProperty(Derived, "t", { get: function () { return y; }, - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassTransitivity.js b/tests/baselines/reference/derivedClassTransitivity.js index 53749861549..2088fc1122b 100644 --- a/tests/baselines/reference/derivedClassTransitivity.js +++ b/tests/baselines/reference/derivedClassTransitivity.js @@ -31,8 +31,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); var D = (function (_super) { @@ -40,8 +39,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function () { - }; // ok to drop parameters + D.prototype.foo = function () { }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -49,8 +47,7 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x) { - }; // ok to add optional parameters + E.prototype.foo = function (x) { }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity2.js b/tests/baselines/reference/derivedClassTransitivity2.js index 1b4bd58923c..458aede164c 100644 --- a/tests/baselines/reference/derivedClassTransitivity2.js +++ b/tests/baselines/reference/derivedClassTransitivity2.js @@ -31,8 +31,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { - }; + C.prototype.foo = function (x, y) { }; return C; })(); var D = (function (_super) { @@ -40,8 +39,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { - }; // ok to drop parameters + D.prototype.foo = function (x) { }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -49,8 +47,7 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x, y) { - }; // ok to add optional parameters + E.prototype.foo = function (x, y) { }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity3.js b/tests/baselines/reference/derivedClassTransitivity3.js index 3e548f5276e..9768a8f5fa3 100644 --- a/tests/baselines/reference/derivedClassTransitivity3.js +++ b/tests/baselines/reference/derivedClassTransitivity3.js @@ -31,8 +31,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { - }; + C.prototype.foo = function (x, y) { }; return C; })(); var D = (function (_super) { @@ -40,8 +39,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function (x) { - }; // ok to drop parameters + D.prototype.foo = function (x) { }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -49,8 +47,7 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x, y) { - }; // ok to add optional parameters + E.prototype.foo = function (x, y) { }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassTransitivity4.js b/tests/baselines/reference/derivedClassTransitivity4.js index 5249c6aad2e..abf1a3b5bd0 100644 --- a/tests/baselines/reference/derivedClassTransitivity4.js +++ b/tests/baselines/reference/derivedClassTransitivity4.js @@ -31,8 +31,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); var D = (function (_super) { @@ -40,8 +39,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function () { - }; // ok to drop parameters + D.prototype.foo = function () { }; // ok to drop parameters return D; })(C); var E = (function (_super) { @@ -49,8 +47,7 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo = function (x) { - }; // ok to add optional parameters + E.prototype.foo = function (x) { }; // ok to add optional parameters return E; })(D); var c; diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js index f802a225088..63c33f87836 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingProtectedInstance.js @@ -39,8 +39,7 @@ var Base = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -59,8 +58,7 @@ var Derived = (function (_super) { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js index fb0dee3e57b..692ae1569ec 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.js @@ -49,8 +49,7 @@ var Base = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -69,8 +68,7 @@ var Derived = (function (_super) { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js index 558e2309757..56ce444de0b 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingProtectedStatic.js @@ -38,8 +38,7 @@ var Base = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -58,8 +57,7 @@ var Derived = (function (_super) { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js index b2468f62d81..7ae518eeedf 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.js @@ -50,8 +50,7 @@ var Base = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -71,8 +70,7 @@ var Derived = (function (_super) { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/doWhileBreakStatements.js b/tests/baselines/reference/doWhileBreakStatements.js index 9162c629898..a2bc0d3c549 100644 --- a/tests/baselines/reference/doWhileBreakStatements.js +++ b/tests/baselines/reference/doWhileBreakStatements.js @@ -66,7 +66,6 @@ SEVEN: do while (true); while (true); EIGHT: do { - var fn = function () { - }; + var fn = function () { }; break EIGHT; } while (true); diff --git a/tests/baselines/reference/doWhileContinueStatements.js b/tests/baselines/reference/doWhileContinueStatements.js index a39495e162e..7f73157fd99 100644 --- a/tests/baselines/reference/doWhileContinueStatements.js +++ b/tests/baselines/reference/doWhileContinueStatements.js @@ -66,7 +66,6 @@ SEVEN: do while (true); while (true); EIGHT: do { - var fn = function () { - }; + var fn = function () { }; continue EIGHT; } while (true); diff --git a/tests/baselines/reference/doWhileLoop.js b/tests/baselines/reference/doWhileLoop.js index 0c1abd7aed9..6581bba09e1 100644 --- a/tests/baselines/reference/doWhileLoop.js +++ b/tests/baselines/reference/doWhileLoop.js @@ -3,6 +3,5 @@ do { } while (false); var n; //// [doWhileLoop.js] -do { -} while (false); +do { } while (false); var n; diff --git a/tests/baselines/reference/dottedSymbolResolution1.js b/tests/baselines/reference/dottedSymbolResolution1.js index d5bdb6006d5..a0ac7a38b88 100644 --- a/tests/baselines/reference/dottedSymbolResolution1.js +++ b/tests/baselines/reference/dottedSymbolResolution1.js @@ -29,8 +29,7 @@ function _setBarAndText(): void { var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); function each(collection, callback) { diff --git a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js index 6d43b888f48..e440c06073a 100644 --- a/tests/baselines/reference/duplicateIdentifierInCatchBlock.js +++ b/tests/baselines/reference/duplicateIdentifierInCatchBlock.js @@ -19,27 +19,20 @@ try { } catch (e) { //// [duplicateIdentifierInCatchBlock.js] var v; -try { -} +try { } catch (e) { - function v() { - } -} -function w() { -} -try { + function v() { } } +function w() { } +try { } catch (e) { var w; } -try { -} +try { } catch (e) { var x; - function x() { - } // error - function e() { - } // error + function x() { } // error + function e() { } // error var p; var p; // error } diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js index 018d148f9c3..6a567018d1f 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.js @@ -64,8 +64,7 @@ var M; })(M || (M = {})); var M; (function (M) { - function f() { - } + function f() { } M.f = f; })(M || (M = {})); var M; @@ -79,8 +78,7 @@ var M; })(M || (M = {})); var M; (function (M) { - function g() { - } + function g() { } })(M || (M = {})); var M; (function (M) { @@ -102,8 +100,7 @@ var M; })(M || (M = {})); var M; (function (M) { - function C() { - } // no error + function C() { } // no error })(M || (M = {})); var M; (function (M) { diff --git a/tests/baselines/reference/duplicateObjectLiteralProperty.js b/tests/baselines/reference/duplicateObjectLiteralProperty.js index 5bbeb433a0c..5fd2d1177f8 100644 --- a/tests/baselines/reference/duplicateObjectLiteralProperty.js +++ b/tests/baselines/reference/duplicateObjectLiteralProperty.js @@ -33,8 +33,7 @@ var y = { get a() { return 0; }, - set a(v) { - }, + set a(v) { }, get a() { return 0; } diff --git a/tests/baselines/reference/duplicatePropertyNames.js b/tests/baselines/reference/duplicatePropertyNames.js index c5da2a1f39f..c3cde82e2cc 100644 --- a/tests/baselines/reference/duplicatePropertyNames.js +++ b/tests/baselines/reference/duplicatePropertyNames.js @@ -52,23 +52,17 @@ var b = { // duplicate property names are an error in all types var C = (function () { function C() { - this.baz = function () { - }; - this.baz = function () { - }; + this.baz = function () { }; + this.baz = function () { }; } - C.prototype.bar = function (x) { - }; - C.prototype.bar = function (x) { - }; + C.prototype.bar = function (x) { }; + C.prototype.bar = function (x) { }; return C; })(); var a; var b = { foo: '', foo: '', - bar: function () { - }, - bar: function () { - } + bar: function () { }, + bar: function () { } }; diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.js b/tests/baselines/reference/duplicateSymbolsExportMatching.js index e34ed7c8d02..89b5a210ec4 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.js +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.js @@ -93,8 +93,7 @@ define(["require", "exports"], function (require, exports) { (function (F) { var t; })(F || (F = {})); - function F() { - } + function F() { } M.F = F; // Only one error for duplicate identifier (don't consider visibility) })(M || (M = {})); var M; diff --git a/tests/baselines/reference/duplicateTypeParameters1.js b/tests/baselines/reference/duplicateTypeParameters1.js index 167688719ab..990048a25d7 100644 --- a/tests/baselines/reference/duplicateTypeParameters1.js +++ b/tests/baselines/reference/duplicateTypeParameters1.js @@ -3,5 +3,4 @@ function A() { } //// [duplicateTypeParameters1.js] -function A() { -} +function A() { } diff --git a/tests/baselines/reference/duplicateTypeParameters2.js b/tests/baselines/reference/duplicateTypeParameters2.js index c89f0d15fe3..65dce28ad3f 100644 --- a/tests/baselines/reference/duplicateTypeParameters2.js +++ b/tests/baselines/reference/duplicateTypeParameters2.js @@ -8,14 +8,12 @@ interface I {} var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { - }; + B.prototype.bar = function () { }; return B; })(); diff --git a/tests/baselines/reference/elaboratedErrors.js b/tests/baselines/reference/elaboratedErrors.js index c245c1a8562..ae5877b2dd6 100644 --- a/tests/baselines/reference/elaboratedErrors.js +++ b/tests/baselines/reference/elaboratedErrors.js @@ -27,8 +27,7 @@ y = x; //// [elaboratedErrors.js] -function fn(s) { -} +function fn(s) { } // This should issue a large error, not a small one var WorkerFS = (function () { function WorkerFS() { diff --git a/tests/baselines/reference/emitArrowFunction.js b/tests/baselines/reference/emitArrowFunction.js index 1c00a7579b6..41c52cbfefc 100644 --- a/tests/baselines/reference/emitArrowFunction.js +++ b/tests/baselines/reference/emitArrowFunction.js @@ -8,21 +8,11 @@ foo(() => true); foo(() => { return false; }); //// [emitArrowFunction.js] -var f1 = function () { -}; -var f2 = function (x, y) { -}; -var f3 = function (x, y) { - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -}; -var f4 = function (x, y, z) { - if (z === void 0) { z = 10; } -}; -function foo(func) { -} +var f1 = function () { }; +var f2 = function (x, y) { }; +var f3 = function (x, y) { }; +var f4 = function (x, y, z) { }; +function foo(func) { } foo(function () { return true; }); foo(function () { return false; diff --git a/tests/baselines/reference/emitArrowFunctionAsIs.js b/tests/baselines/reference/emitArrowFunctionAsIs.js index 11df7903ad8..c6586ee95a1 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIs.js +++ b/tests/baselines/reference/emitArrowFunctionAsIs.js @@ -5,9 +5,6 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIs.js] -var arrow1 = function (a) { -}; -var arrow2 = function (a) { -}; -var arrow3 = function (a, b) { -}; +var arrow1 = function (a) { }; +var arrow2 = function (a) { }; +var arrow3 = function (a, b) { }; diff --git a/tests/baselines/reference/emitArrowFunctionAsIsES6.js b/tests/baselines/reference/emitArrowFunctionAsIsES6.js index 9941434ae10..9876abdafcd 100644 --- a/tests/baselines/reference/emitArrowFunctionAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionAsIsES6.js @@ -5,9 +5,6 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionAsIsES6.js] -var arrow1 = a => { -}; -var arrow2 = (a) => { -}; -var arrow3 = (a, b) => { -}; +var arrow1 = a => { }; +var arrow2 = (a) => { }; +var arrow3 = (a, b) => { }; diff --git a/tests/baselines/reference/emitArrowFunctionES6.js b/tests/baselines/reference/emitArrowFunctionES6.js index c518a52f629..39d69cc1f0e 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.js +++ b/tests/baselines/reference/emitArrowFunctionES6.js @@ -9,16 +9,11 @@ foo(() => { return false; }); //// [emitArrowFunctionES6.js] -var f1 = () => { -}; -var f2 = (x, y) => { -}; -var f3 = (x, y, ...rest) => { -}; -var f4 = (x, y, z = 10) => { -}; -function foo(func) { -} +var f1 = () => { }; +var f2 = (x, y) => { }; +var f3 = (x, y, ...rest) => { }; +var f4 = (x, y, z = 10) => { }; +function foo(func) { } foo(() => { return true; }); foo(() => { return false; diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturing.js b/tests/baselines/reference/emitArrowFunctionThisCapturing.js index 25d9f7f100b..ac4326ea508 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturing.js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturing.js @@ -22,8 +22,7 @@ var f1 = function () { var f2 = function (x) { _this.name = x; }; -function foo(func) { -} +function foo(func) { } foo(function () { _this.age = 100; return true; diff --git a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js index bf235bc0eef..2a82ef9c800 100644 --- a/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js +++ b/tests/baselines/reference/emitArrowFunctionThisCapturingES6.js @@ -21,8 +21,7 @@ var f1 = () => { var f2 = (x) => { this.name = x; }; -function foo(func) { -} +function foo(func) { } foo(() => { this.age = 100; return true; diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js index 00a4c7aa051..589449fad62 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments.js @@ -45,8 +45,7 @@ function baz() { var arg = arguments[0]; }); } -function foo(inputFunc) { -} +function foo(inputFunc) { } foo(() => { var arg = arguments[0]; // error }); diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js b/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js index 0deacd409df..2f84d0843de 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArgumentsES6.js @@ -45,8 +45,7 @@ function baz() { var arg = arguments[0]; }); } -function foo(inputFunc) { -} +function foo(inputFunc) { } foo(() => { var arg = arguments[0]; // error }); diff --git a/tests/baselines/reference/emitArrowFunctionsAsIs.js b/tests/baselines/reference/emitArrowFunctionsAsIs.js index ee8347dda3e..cf773efb8b7 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIs.js +++ b/tests/baselines/reference/emitArrowFunctionsAsIs.js @@ -5,9 +5,6 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIs.js] -var arrow1 = function (a) { -}; -var arrow2 = function (a) { -}; -var arrow3 = function (a, b) { -}; +var arrow1 = function (a) { }; +var arrow2 = function (a) { }; +var arrow3 = function (a, b) { }; diff --git a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js index 021e048ed88..32323a6597b 100644 --- a/tests/baselines/reference/emitArrowFunctionsAsIsES6.js +++ b/tests/baselines/reference/emitArrowFunctionsAsIsES6.js @@ -5,9 +5,6 @@ var arrow2 = (a) => { }; var arrow3 = (a, b) => { }; //// [emitArrowFunctionsAsIsES6.js] -var arrow1 = a => { -}; -var arrow2 = (a) => { -}; -var arrow3 = (a, b) => { -}; +var arrow1 = a => { }; +var arrow2 = (a) => { }; +var arrow3 = (a, b) => { }; diff --git a/tests/baselines/reference/emitDefaultParametersFunction.js b/tests/baselines/reference/emitDefaultParametersFunction.js index 6be7ae9dbfe..5808de5a5db 100644 --- a/tests/baselines/reference/emitDefaultParametersFunction.js +++ b/tests/baselines/reference/emitDefaultParametersFunction.js @@ -5,23 +5,7 @@ function bar(y = 10) { } function bar1(y = 10, ...rest) { } //// [emitDefaultParametersFunction.js] -function foo(x, y) { - if (y === void 0) { y = 10; } -} -function baz(x, y) { - if (y === void 0) { y = 5; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -} -function bar(y) { - if (y === void 0) { y = 10; } -} -function bar1(y) { - if (y === void 0) { y = 10; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } -} +function foo(x, y) { } +function baz(x, y) { } +function bar(y) { } +function bar1(y) { } diff --git a/tests/baselines/reference/emitDefaultParametersFunctionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionES6.js index f4084a16f6f..0d1c9460fed 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionES6.js @@ -5,11 +5,7 @@ function bar(y = 10) { } function bar1(y = 10, ...rest) { } //// [emitDefaultParametersFunctionES6.js] -function foo(x, y = 10) { -} -function baz(x, y = 5, ...rest) { -} -function bar(y = 10) { -} -function bar1(y = 10, ...rest) { -} +function foo(x, y = 10) { } +function baz(x, y = 5, ...rest) { } +function bar(y = 10) { } +function bar1(y = 10, ...rest) { } diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpression.js b/tests/baselines/reference/emitDefaultParametersFunctionExpression.js index bcfe5b240f2..5fc2d0794e6 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpression.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpression.js @@ -10,45 +10,10 @@ var z = (function (num: number, boo = false, ...rest) { })(10) //// [emitDefaultParametersFunctionExpression.js] -var lambda1 = function (y) { - if (y === void 0) { y = "hello"; } -}; -var lambda2 = function (x, y) { - if (y === void 0) { y = "hello"; } -}; -var lambda3 = function (x, y) { - if (y === void 0) { y = "hello"; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -}; -var lambda4 = function (y) { - if (y === void 0) { y = "hello"; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } -}; -var x = function (str) { - if (str === void 0) { str = "hello"; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } -}; -var y = (function (num, boo) { - if (num === void 0) { num = 10; } - if (boo === void 0) { boo = false; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -})(); -var z = (function (num, boo) { - if (boo === void 0) { boo = false; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -})(10); +var lambda1 = function (y) { }; +var lambda2 = function (x, y) { }; +var lambda3 = function (x, y) { }; +var lambda4 = function (y) { }; +var x = function (str) { }; +var y = (function (num, boo) { })(); +var z = (function (num, boo) { })(10); diff --git a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js index 5a49a200c6b..f72c245b175 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionExpressionES6.js @@ -9,17 +9,10 @@ var y = (function (num = 10, boo = false, ...rest) { })() var z = (function (num: number, boo = false, ...rest) { })(10) //// [emitDefaultParametersFunctionExpressionES6.js] -var lambda1 = (y = "hello") => { -}; -var lambda2 = (x, y = "hello") => { -}; -var lambda3 = (x, y = "hello", ...rest) => { -}; -var lambda4 = (y = "hello", ...rest) => { -}; -var x = function (str = "hello", ...rest) { -}; -var y = (function (num = 10, boo = false, ...rest) { -})(); -var z = (function (num, boo = false, ...rest) { -})(10); +var lambda1 = (y = "hello") => { }; +var lambda2 = (x, y = "hello") => { }; +var lambda3 = (x, y = "hello", ...rest) => { }; +var lambda4 = (y = "hello", ...rest) => { }; +var x = function (str = "hello", ...rest) { }; +var y = (function (num = 10, boo = false, ...rest) { })(); +var z = (function (num, boo = false, ...rest) { })(10); diff --git a/tests/baselines/reference/emitDefaultParametersFunctionProperty.js b/tests/baselines/reference/emitDefaultParametersFunctionProperty.js index 16cac41a4ce..ba0e8d5e14e 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionProperty.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionProperty.js @@ -9,24 +9,8 @@ var obj2 = { //// [emitDefaultParametersFunctionProperty.js] var obj2 = { - func1: function (y) { - if (y === void 0) { y = 10; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - }, - func2: function (x) { - if (x === void 0) { x = "hello"; } - }, - func3: function (x, z, y) { - if (y === void 0) { y = "hello"; } - }, - func4: function (x, z, y) { - if (y === void 0) { y = "hello"; } - var rest = []; - for (var _i = 3; _i < arguments.length; _i++) { - rest[_i - 3] = arguments[_i]; - } - }, + func1: function (y) { }, + func2: function (x) { }, + func3: function (x, z, y) { }, + func4: function (x, z, y) { }, }; diff --git a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js index fce694a453a..4a85f4a34b0 100644 --- a/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitDefaultParametersFunctionPropertyES6.js @@ -8,12 +8,8 @@ var obj2 = { //// [emitDefaultParametersFunctionPropertyES6.js] var obj2 = { - func1(y = 10, ...rest) { - }, - func2(x = "hello") { - }, - func3(x, z, y = "hello") { - }, - func4(x, z, y = "hello", ...rest) { - }, + func1(y = 10, ...rest) { }, + func2(x = "hello") { }, + func3(x, z, y = "hello") { }, + func4(x, z, y = "hello", ...rest) { }, }; diff --git a/tests/baselines/reference/emitDefaultParametersMethod.js b/tests/baselines/reference/emitDefaultParametersMethod.js index 126c19305b3..5a6aede9e75 100644 --- a/tests/baselines/reference/emitDefaultParametersMethod.js +++ b/tests/baselines/reference/emitDefaultParametersMethod.js @@ -22,26 +22,10 @@ var C = (function () { function C(t, z, x, y) { if (y === void 0) { y = "hello"; } } - C.prototype.foo = function (x, t) { - if (t === void 0) { t = false; } - }; - C.prototype.foo1 = function (x, t) { - if (t === void 0) { t = false; } - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } - }; - C.prototype.bar = function (t) { - if (t === void 0) { t = false; } - }; - C.prototype.boo = function (t) { - if (t === void 0) { t = false; } - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - }; + C.prototype.foo = function (x, t) { }; + C.prototype.foo1 = function (x, t) { }; + C.prototype.bar = function (t) { }; + C.prototype.boo = function (t) { }; return C; })(); var D = (function () { diff --git a/tests/baselines/reference/emitDefaultParametersMethodES6.js b/tests/baselines/reference/emitDefaultParametersMethodES6.js index bf96e00e375..8489b5708f1 100644 --- a/tests/baselines/reference/emitDefaultParametersMethodES6.js +++ b/tests/baselines/reference/emitDefaultParametersMethodES6.js @@ -20,14 +20,10 @@ class E { var C = (function () { function C(t, z, x, y = "hello") { } - C.prototype.foo = function (x, t = false) { - }; - C.prototype.foo1 = function (x, t = false, ...rest) { - }; - C.prototype.bar = function (t = false) { - }; - C.prototype.boo = function (t = false, ...rest) { - }; + C.prototype.foo = function (x, t = false) { }; + C.prototype.foo1 = function (x, t = false, ...rest) { }; + C.prototype.bar = function (t = false) { }; + C.prototype.boo = function (t = false, ...rest) { }; return C; })(); var D = (function () { diff --git a/tests/baselines/reference/emitRestParametersFunction.js b/tests/baselines/reference/emitRestParametersFunction.js index 01116f2ac92..4ee4ff06df9 100644 --- a/tests/baselines/reference/emitRestParametersFunction.js +++ b/tests/baselines/reference/emitRestParametersFunction.js @@ -3,15 +3,5 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunction.js] -function bar() { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i - 0] = arguments[_i]; - } -} -function foo(x, y) { - var rest = []; - for (var _i = 2; _i < arguments.length; _i++) { - rest[_i - 2] = arguments[_i]; - } -} +function bar() { } +function foo(x, y) { } diff --git a/tests/baselines/reference/emitRestParametersFunctionES6.js b/tests/baselines/reference/emitRestParametersFunctionES6.js index 242c40f252d..a07b3a13174 100644 --- a/tests/baselines/reference/emitRestParametersFunctionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionES6.js @@ -3,7 +3,5 @@ function bar(...rest) { } function foo(x: number, y: string, ...rest) { } //// [emitRestParametersFunctionES6.js] -function bar(...rest) { -} -function foo(x, y, ...rest) { -} +function bar(...rest) { } +function foo(x, y, ...rest) { } diff --git a/tests/baselines/reference/emitRestParametersFunctionExpression.js b/tests/baselines/reference/emitRestParametersFunctionExpression.js index da87cc79f2d..6229c1e8d64 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpression.js +++ b/tests/baselines/reference/emitRestParametersFunctionExpression.js @@ -6,27 +6,7 @@ var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpression.js] -var funcExp = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i - 0] = arguments[_i]; - } -}; -var funcExp1 = function (X) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } -}; -var funcExp2 = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i - 0] = arguments[_i]; - } -}; -var funcExp3 = (function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i - 0] = arguments[_i]; - } -})(); +var funcExp = function () { }; +var funcExp1 = function (X) { }; +var funcExp2 = function () { }; +var funcExp3 = (function () { })(); diff --git a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js index c7851db5e78..aa52a29b138 100644 --- a/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionExpressionES6.js @@ -5,11 +5,7 @@ var funcExp2 = function (...rest) { } var funcExp3 = (function (...rest) { })() //// [emitRestParametersFunctionExpressionES6.js] -var funcExp = (...rest) => { -}; -var funcExp1 = (X, ...rest) => { -}; -var funcExp2 = function (...rest) { -}; -var funcExp3 = (function (...rest) { -})(); +var funcExp = (...rest) => { }; +var funcExp1 = (X, ...rest) => { }; +var funcExp2 = function (...rest) { }; +var funcExp3 = (function (...rest) { })(); diff --git a/tests/baselines/reference/emitRestParametersFunctionProperty.js b/tests/baselines/reference/emitRestParametersFunctionProperty.js index 4fd60a9269d..eec67fb880a 100644 --- a/tests/baselines/reference/emitRestParametersFunctionProperty.js +++ b/tests/baselines/reference/emitRestParametersFunctionProperty.js @@ -10,10 +10,5 @@ var obj2 = { //// [emitRestParametersFunctionProperty.js] var obj; var obj2 = { - func: function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i - 0] = arguments[_i]; - } - } + func: function () { } }; diff --git a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js index 87aa489ecf3..122a1f6ed52 100644 --- a/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js +++ b/tests/baselines/reference/emitRestParametersFunctionPropertyES6.js @@ -10,6 +10,5 @@ var obj2 = { //// [emitRestParametersFunctionPropertyES6.js] var obj; var obj2 = { - func(...rest) { - } + func(...rest) { } }; diff --git a/tests/baselines/reference/emitRestParametersMethod.js b/tests/baselines/reference/emitRestParametersMethod.js index 5ceb6d768f8..4e4c62dc47b 100644 --- a/tests/baselines/reference/emitRestParametersMethod.js +++ b/tests/baselines/reference/emitRestParametersMethod.js @@ -21,18 +21,8 @@ var C = (function () { rest[_i - 1] = arguments[_i]; } } - C.prototype.bar = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i - 0] = arguments[_i]; - } - }; - C.prototype.foo = function (x) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - }; + C.prototype.bar = function () { }; + C.prototype.foo = function (x) { }; return C; })(); var D = (function () { @@ -42,17 +32,7 @@ var D = (function () { rest[_i - 0] = arguments[_i]; } } - D.prototype.bar = function () { - var rest = []; - for (var _i = 0; _i < arguments.length; _i++) { - rest[_i - 0] = arguments[_i]; - } - }; - D.prototype.foo = function (x) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - }; + D.prototype.bar = function () { }; + D.prototype.foo = function (x) { }; return D; })(); diff --git a/tests/baselines/reference/emitRestParametersMethodES6.js b/tests/baselines/reference/emitRestParametersMethodES6.js index d0a0e2a120c..ff8e040be9c 100644 --- a/tests/baselines/reference/emitRestParametersMethodES6.js +++ b/tests/baselines/reference/emitRestParametersMethodES6.js @@ -18,18 +18,14 @@ class D { var C = (function () { function C(name, ...rest) { } - C.prototype.bar = function (...rest) { - }; - C.prototype.foo = function (x, ...rest) { - }; + C.prototype.bar = function (...rest) { }; + C.prototype.foo = function (x, ...rest) { }; return C; })(); var D = (function () { function D(...rest) { } - D.prototype.bar = function (...rest) { - }; - D.prototype.foo = function (x, ...rest) { - }; + D.prototype.bar = function (...rest) { }; + D.prototype.foo = function (x, ...rest) { }; return D; })(); diff --git a/tests/baselines/reference/emptyTypeArgumentList.js b/tests/baselines/reference/emptyTypeArgumentList.js index 91fce396289..30093113be4 100644 --- a/tests/baselines/reference/emptyTypeArgumentList.js +++ b/tests/baselines/reference/emptyTypeArgumentList.js @@ -3,6 +3,5 @@ function foo() { } foo<>(); //// [emptyTypeArgumentList.js] -function foo() { -} +function foo() { } foo(); diff --git a/tests/baselines/reference/enumAssignabilityInInheritance.js b/tests/baselines/reference/enumAssignabilityInInheritance.js index bec59a3d0de..a26bd0670f8 100644 --- a/tests/baselines/reference/enumAssignabilityInInheritance.js +++ b/tests/baselines/reference/enumAssignabilityInInheritance.js @@ -144,8 +144,7 @@ var E2; E2[E2["A"] = 0] = "A"; })(E2 || (E2 = {})); var r4 = foo13(0 /* A */); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js index f9ac7661e3d..d932985ad7d 100644 --- a/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js +++ b/tests/baselines/reference/enumIsNotASubtypeOfAnythingButNumber.js @@ -150,8 +150,7 @@ var E2; (function (E2) { E2[E2["A"] = 0] = "A"; })(E2 || (E2 = {})); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js index 2a49ccd2b67..9e0c26b6be7 100644 --- a/tests/baselines/reference/errorOnContextuallyTypedReturnType.js +++ b/tests/baselines/reference/errorOnContextuallyTypedReturnType.js @@ -4,7 +4,5 @@ var n2: () => boolean = function ():boolean { }; // expect an error here //// [errorOnContextuallyTypedReturnType.js] -var n1 = function () { -}; // expect an error here -var n2 = function () { -}; // expect an error here +var n1 = function () { }; // expect an error here +var n2 = function () { }; // expect an error here diff --git a/tests/baselines/reference/errorSuperPropertyAccess.js b/tests/baselines/reference/errorSuperPropertyAccess.js index 26c66a1222c..845bc9834f7 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.js +++ b/tests/baselines/reference/errorSuperPropertyAccess.js @@ -172,14 +172,10 @@ var SomeBase = (function () { this.privateMember = 0; this.publicMember = 0; } - SomeBase.prototype.privateFunc = function () { - }; - SomeBase.prototype.publicFunc = function () { - }; - SomeBase.privateStaticFunc = function () { - }; - SomeBase.publicStaticFunc = function () { - }; + SomeBase.prototype.privateFunc = function () { }; + SomeBase.prototype.publicFunc = function () { }; + SomeBase.privateStaticFunc = function () { }; + SomeBase.publicStaticFunc = function () { }; SomeBase.privateStaticMember = 0; SomeBase.publicStaticMember = 0; return SomeBase; diff --git a/tests/baselines/reference/errorsInGenericTypeReference.js b/tests/baselines/reference/errorsInGenericTypeReference.js index 6a9f62c5e49..1a27a681e59 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.js +++ b/tests/baselines/reference/errorsInGenericTypeReference.js @@ -88,8 +88,7 @@ var Foo = (function () { var testClass1 = (function () { function testClass1() { } - testClass1.prototype.method = function () { - }; + testClass1.prototype.method = function () { }; return testClass1; })(); var tc1 = new testClass1(); @@ -112,8 +111,7 @@ var testClass3 = (function () { return null; }; // error: could not find symbol V Object.defineProperty(testClass3.prototype, "a", { - set: function (value) { - } // error: could not find symbol V + set: function (value) { } // error: could not find symbol V , enumerable: true, configurable: true @@ -125,8 +123,7 @@ function testFunction1() { return null; } // error: could not find symbol V // in paramter types -function testFunction2(p) { -} // error: could not find symbol V +function testFunction2(p) { } // error: could not find symbol V // in var type annotation var f; // error: could not find symbol V // in constraints @@ -138,8 +135,7 @@ var testClass4 = (function () { var testClass6 = (function () { function testClass6() { } - testClass6.prototype.method = function () { - }; // error: could not find symbol V + testClass6.prototype.method = function () { }; // error: could not find symbol V return testClass6; })(); // in extends clause diff --git a/tests/baselines/reference/es6ClassTest2.js b/tests/baselines/reference/es6ClassTest2.js index 8ef7a2fa379..f4854644079 100644 --- a/tests/baselines/reference/es6ClassTest2.js +++ b/tests/baselines/reference/es6ClassTest2.js @@ -240,12 +240,7 @@ var SplatMonster = (function () { args[_i - 0] = arguments[_i]; } } - SplatMonster.prototype.roar = function (name) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - }; + SplatMonster.prototype.roar = function (name) { }; return SplatMonster; })(); function foo() { @@ -302,10 +297,8 @@ var Visibility = (function () { this.x = 1; this.y = 2; } - Visibility.prototype.foo = function () { - }; - Visibility.prototype.bar = function () { - }; + Visibility.prototype.foo = function () { }; + Visibility.prototype.bar = function () { }; return Visibility; })(); var BaseClassWithConstructor = (function () { diff --git a/tests/baselines/reference/es6ClassTest3.js b/tests/baselines/reference/es6ClassTest3.js index 371a983d152..dc9f1c67154 100644 --- a/tests/baselines/reference/es6ClassTest3.js +++ b/tests/baselines/reference/es6ClassTest3.js @@ -22,10 +22,8 @@ var M; this.x = 1; this.y = 2; } - Visibility.prototype.foo = function () { - }; - Visibility.prototype.bar = function () { - }; + Visibility.prototype.foo = function () { }; + Visibility.prototype.bar = function () { }; return Visibility; })(); })(M || (M = {})); diff --git a/tests/baselines/reference/es6ClassTest9.js b/tests/baselines/reference/es6ClassTest9.js index d45c99d3b04..538fec5a2ab 100644 --- a/tests/baselines/reference/es6ClassTest9.js +++ b/tests/baselines/reference/es6ClassTest9.js @@ -5,5 +5,4 @@ function foo() {} //// [es6ClassTest9.js] (); -function foo() { -} +function foo() { } diff --git a/tests/baselines/reference/exportAlreadySeen.js b/tests/baselines/reference/exportAlreadySeen.js index e18c0bbf7f6..68d30a697fd 100644 --- a/tests/baselines/reference/exportAlreadySeen.js +++ b/tests/baselines/reference/exportAlreadySeen.js @@ -23,8 +23,7 @@ declare module A { var M; (function (M) { M.x = 1; - function f() { - } + function f() { } M.f = f; var N; (function (N) { diff --git a/tests/baselines/reference/exportAssignmentMergedInterface.js b/tests/baselines/reference/exportAssignmentMergedInterface.js index 3f0c0cfde29..f99d7f3a465 100644 --- a/tests/baselines/reference/exportAssignmentMergedInterface.js +++ b/tests/baselines/reference/exportAssignmentMergedInterface.js @@ -31,8 +31,7 @@ define(["require", "exports"], function (require, exports) { x("test"); x(42); var y = x.b; - if (!!x.c) { - } + if (!!x.c) { } var z = { x: 1, y: 2 }; z = x.d; }); diff --git a/tests/baselines/reference/exportCodeGen.js b/tests/baselines/reference/exportCodeGen.js index 1b1f934b2f9..30ed0b07ae9 100644 --- a/tests/baselines/reference/exportCodeGen.js +++ b/tests/baselines/reference/exportCodeGen.js @@ -94,8 +94,7 @@ var E; Color[Color["Red"] = 0] = "Red"; })(E.Color || (E.Color = {})); var Color = E.Color; - function fn() { - } + function fn() { } E.fn = fn; var C = (function () { function C() { @@ -116,8 +115,7 @@ var F; (function (Color) { Color[Color["Red"] = 0] = "Red"; })(Color || (Color = {})); - function fn() { - } + function fn() { } var C = (function () { function C() { } diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType.js b/tests/baselines/reference/extendAndImplementTheSameBaseType.js index 836db4dc362..23c9127175e 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType.js @@ -23,8 +23,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.bar = function () { - }; + C.prototype.bar = function () { }; return C; })(); var D = (function (_super) { @@ -32,8 +31,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { - }; + D.prototype.baz = function () { }; return D; })(C); var c; diff --git a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js index 8311f4d6ce6..234cc59ff70 100644 --- a/tests/baselines/reference/extendAndImplementTheSameBaseType2.js +++ b/tests/baselines/reference/extendAndImplementTheSameBaseType2.js @@ -36,8 +36,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { - }; + D.prototype.baz = function () { }; return D; })(C); var d = new D(); diff --git a/tests/baselines/reference/extendArray.js b/tests/baselines/reference/extendArray.js index 876bf1358d9..6d5c0262209 100644 --- a/tests/baselines/reference/extendArray.js +++ b/tests/baselines/reference/extendArray.js @@ -25,8 +25,7 @@ arr.collect = function (fn) { //// [extendArray.js] var a = [1, 2]; -a.forEach(function (v, i, a) { -}); +a.forEach(function (v, i, a) { }); var arr = Array.prototype; arr.collect = function (fn) { var res = []; diff --git a/tests/baselines/reference/extendNonClassSymbol1.js b/tests/baselines/reference/extendNonClassSymbol1.js index 47a602aefaf..26f0c776dd8 100644 --- a/tests/baselines/reference/extendNonClassSymbol1.js +++ b/tests/baselines/reference/extendNonClassSymbol1.js @@ -13,8 +13,7 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var x = A; diff --git a/tests/baselines/reference/extendsClauseAlreadySeen.js b/tests/baselines/reference/extendsClauseAlreadySeen.js index 5c328e39131..820a6910962 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen.js @@ -23,7 +23,6 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { - }; + D.prototype.baz = function () { }; return D; })(C); diff --git a/tests/baselines/reference/extendsClauseAlreadySeen2.js b/tests/baselines/reference/extendsClauseAlreadySeen2.js index 3f3b7049311..ad88446c4c4 100644 --- a/tests/baselines/reference/extendsClauseAlreadySeen2.js +++ b/tests/baselines/reference/extendsClauseAlreadySeen2.js @@ -23,7 +23,6 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.baz = function () { - }; + D.prototype.baz = function () { }; return D; })(C); diff --git a/tests/baselines/reference/externModule.js b/tests/baselines/reference/externModule.js index 0dc3d8e84cd..719b68451ae 100644 --- a/tests/baselines/reference/externModule.js +++ b/tests/baselines/reference/externModule.js @@ -42,8 +42,7 @@ n=XDate.UTC(1964,2,1); //// [externModule.js] declare; module; -{ -} +{ } var XDate = (function () { function XDate() { } diff --git a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js index 73ef9b6b296..f9c83c83cf0 100644 --- a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js +++ b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js @@ -10,8 +10,7 @@ file1.foo(); //// [externalModuleReferenceOfImportDeclarationWithExportModifier_0.js] define(["require", "exports"], function (require, exports) { - function foo() { - } + function foo() { } exports.foo = foo; ; }); diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js index edbdf6b90a5..f1d1d9fb561 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js @@ -19,8 +19,7 @@ file1.bar(); //// [externalModuleRefernceResolutionOrderInImportDeclaration_file2.js] //// [externalModuleRefernceResolutionOrderInImportDeclaration_file1.js] -function foo() { -} +function foo() { } exports.foo = foo; ; //// [externalModuleRefernceResolutionOrderInImportDeclaration_file3.js] diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index fd47f60b6a0..cdcd812c113 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -33,15 +33,7 @@ var y = x, number; x * x; false ? (function () { return null; }) : null; // missing fatarrow -var x1 = function () { -}; -var x2 = function (a) { -}; -var x3 = function (a) { -}; -var x4 = function () { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i - 0] = arguments[_i]; - } -}; +var x1 = function () { }; +var x2 = function (a) { }; +var x3 = function (a) { }; +var x4 = function () { }; diff --git a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js index 0b816cc9e09..6d6e3013fbb 100644 --- a/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js +++ b/tests/baselines/reference/fatarrowfunctionsOptionalArgs.js @@ -361,12 +361,7 @@ false ? null : function () { return 108; }); // Function Parameters -function foo() { - var arg = []; - for (var _i = 0; _i < arguments.length; _i++) { - arg[_i - 0] = arguments[_i]; - } -} +function foo() { } foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { return 112; }, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { diff --git a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js index d8521e56a14..dea003057c4 100644 --- a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js +++ b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.js @@ -3,6 +3,5 @@ function bar(item1: T, item2: T) { } bar(1, ""); // Should be ok //// [fixTypeParameterInSignatureWithRestParameters.js] -function bar(item1, item2) { -} +function bar(item1, item2) { } bar(1, ""); // Should be ok diff --git a/tests/baselines/reference/for-inStatements.js b/tests/baselines/reference/for-inStatements.js index ca0a7a2e4c5..00f1a64a8d6 100644 --- a/tests/baselines/reference/for-inStatements.js +++ b/tests/baselines/reference/for-inStatements.js @@ -88,63 +88,40 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; var aString; -for (aString in {}) { -} +for (aString in {}) { } var anAny; -for (anAny in {}) { -} -for (var x in {}) { -} -for (var x in []) { -} -for (var x in [1, 2, 3, 4, 5]) { -} -function fn() { -} -for (var x in fn()) { -} -for (var x in /[a-z]/) { -} -for (var x in new Date()) { -} +for (anAny in {}) { } +for (var x in {}) { } +for (var x in []) { } +for (var x in [1, 2, 3, 4, 5]) { } +function fn() { } +for (var x in fn()) { } +for (var x in /[a-z]/) { } +for (var x in new Date()) { } var c, d, e; -for (var x in c || d) { -} -for (var x in e ? c : d) { -} -for (var x in 42 ? c : d) { -} -for (var x in '' ? c : d) { -} -for (var x in 42 ? d[x] : c[x]) { -} -for (var x in c[d]) { -} -for (var x in (function (x) { return x; })) { -} +for (var x in c || d) { } +for (var x in e ? c : d) { } +for (var x in 42 ? c : d) { } +for (var x in '' ? c : d) { } +for (var x in 42 ? d[x] : c[x]) { } +for (var x in c[d]) { } +for (var x in (function (x) { return x; })) { } for (var x in function (x, y) { return x + y; -}) { -} +}) { } var A = (function () { function A() { } A.prototype.biz = function () { - for (var x in this.biz()) { - } - for (var x in this.biz) { - } - for (var x in this) { - } + for (var x in this.biz()) { } + for (var x in this.biz) { } + for (var x in this) { } return null; }; A.baz = function () { - for (var x in this) { - } - for (var x in this.baz) { - } - for (var x in this.baz()) { - } + for (var x in this) { } + for (var x in this.baz) { } + for (var x in this.baz()) { } return null; }; return A; @@ -155,23 +132,17 @@ var B = (function (_super) { _super.apply(this, arguments); } B.prototype.boz = function () { - for (var x in this.biz()) { - } - for (var x in this.biz) { - } - for (var x in this) { - } - for (var x in _super.prototype.biz) { - } - for (var x in _super.prototype.biz.call(this)) { - } + for (var x in this.biz()) { } + for (var x in this.biz) { } + for (var x in this) { } + for (var x in _super.prototype.biz) { } + for (var x in _super.prototype.biz.call(this)) { } return null; }; return B; })(A); var i; -for (var x in i[42]) { -} +for (var x in i[42]) { } var M; (function (M) { var X = (function () { @@ -181,16 +152,12 @@ var M; })(); M.X = X; })(M || (M = {})); -for (var x in M) { -} -for (var x in M.X) { -} +for (var x in M) { } +for (var x in M.X) { } var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Blue"] = 1] = "Blue"; })(Color || (Color = {})); -for (var x in Color) { -} -for (var x in 1 /* Blue */) { -} +for (var x in Color) { } +for (var x in 1 /* Blue */) { } diff --git a/tests/baselines/reference/for-inStatementsInvalid.js b/tests/baselines/reference/for-inStatementsInvalid.js index ce6350ab67c..fc43665e99e 100644 --- a/tests/baselines/reference/for-inStatementsInvalid.js +++ b/tests/baselines/reference/for-inStatementsInvalid.js @@ -71,58 +71,38 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; var aNumber; -for (aNumber in {}) { -} +for (aNumber in {}) { } var aBoolean; -for (aBoolean in {}) { -} +for (aBoolean in {}) { } var aRegExp; -for (aRegExp in {}) { -} -for (var idx in {}) { -} -function fn() { -} -for (var x in fn()) { -} +for (aRegExp in {}) { } +for (var idx in {}) { } +function fn() { } +for (var x in fn()) { } var c, d, e; -for (var x in c || d) { -} -for (var x in e ? c : d) { -} -for (var x in 42 ? c : d) { -} -for (var x in '' ? c : d) { -} -for (var x in 42 ? d[x] : c[x]) { -} -for (var x in c[23]) { -} -for (var x in (function (x) { return x; })) { -} +for (var x in c || d) { } +for (var x in e ? c : d) { } +for (var x in 42 ? c : d) { } +for (var x in '' ? c : d) { } +for (var x in 42 ? d[x] : c[x]) { } +for (var x in c[23]) { } +for (var x in (function (x) { return x; })) { } for (var x in function (x, y) { return x + y; -}) { -} +}) { } var A = (function () { function A() { } A.prototype.biz = function () { - for (var x in this.biz()) { - } - for (var x in this.biz) { - } - for (var x in this) { - } + for (var x in this.biz()) { } + for (var x in this.biz) { } + for (var x in this) { } return null; }; A.baz = function () { - for (var x in this) { - } - for (var x in this.baz) { - } - for (var x in this.baz()) { - } + for (var x in this) { } + for (var x in this.baz) { } + for (var x in this.baz()) { } return null; }; return A; @@ -133,20 +113,14 @@ var B = (function (_super) { _super.apply(this, arguments); } B.prototype.boz = function () { - for (var x in this.biz()) { - } - for (var x in this.biz) { - } - for (var x in this) { - } - for (var x in _super.prototype.biz) { - } - for (var x in _super.prototype.biz.call(this)) { - } + for (var x in this.biz()) { } + for (var x in this.biz) { } + for (var x in this) { } + for (var x in _super.prototype.biz) { } + for (var x in _super.prototype.biz.call(this)) { } return null; }; return B; })(A); var i; -for (var x in i[42]) { -} +for (var x in i[42]) { } diff --git a/tests/baselines/reference/forBreakStatements.js b/tests/baselines/reference/forBreakStatements.js index 017837cded4..9ed65627c9c 100644 --- a/tests/baselines/reference/forBreakStatements.js +++ b/tests/baselines/reference/forBreakStatements.js @@ -61,7 +61,6 @@ SEVEN: for (;;) for (;;) break SEVEN; EIGHT: for (;;) { - var fn = function () { - }; + var fn = function () { }; break EIGHT; } diff --git a/tests/baselines/reference/forContinueStatements.js b/tests/baselines/reference/forContinueStatements.js index b1ace24f4b1..34f70bb1fc1 100644 --- a/tests/baselines/reference/forContinueStatements.js +++ b/tests/baselines/reference/forContinueStatements.js @@ -61,7 +61,6 @@ SEVEN: for (;;) for (;;) continue SEVEN; EIGHT: for (;;) { - var fn = function () { - }; + var fn = function () { }; continue EIGHT; } diff --git a/tests/baselines/reference/forInBreakStatements.js b/tests/baselines/reference/forInBreakStatements.js index 09f0071d4bf..24b7cc57b8d 100644 --- a/tests/baselines/reference/forInBreakStatements.js +++ b/tests/baselines/reference/forInBreakStatements.js @@ -61,7 +61,6 @@ SEVEN: for (var x in {}) for (var x in {}) break SEVEN; EIGHT: for (var x in {}) { - var fn = function () { - }; + var fn = function () { }; break EIGHT; } diff --git a/tests/baselines/reference/forInContinueStatements.js b/tests/baselines/reference/forInContinueStatements.js index 68cac5221ae..8b036c59721 100644 --- a/tests/baselines/reference/forInContinueStatements.js +++ b/tests/baselines/reference/forInContinueStatements.js @@ -61,7 +61,6 @@ SEVEN: for (var x in {}) for (var x in {}) continue SEVEN; EIGHT: for (var x in {}) { - var fn = function () { - }; + var fn = function () { }; continue EIGHT; } diff --git a/tests/baselines/reference/forStatements.js b/tests/baselines/reference/forStatements.js index 0988e9613a9..1755ff51fdc 100644 --- a/tests/baselines/reference/forStatements.js +++ b/tests/baselines/reference/forStatements.js @@ -73,39 +73,21 @@ var M; } M.F2 = F2; })(M || (M = {})); -for (var aNumber = 9.9;;) { -} -for (var aString = 'this is a string';;) { -} -for (var aDate = new Date(12);;) { -} -for (var anObject = new Object();;) { -} -for (var anAny = null;;) { -} -for (var aSecondAny = undefined;;) { -} -for (var aVoid = undefined;;) { -} -for (var anInterface = new C();;) { -} -for (var aClass = new C();;) { -} -for (var aGenericClass = new D();;) { -} -for (var anObjectLiteral = { id: 12 };;) { -} -for (var anOtherObjectLiteral = new C();;) { -} -for (var aFunction = F;;) { -} -for (var anOtherFunction = F;;) { -} -for (var aLambda = function (x) { return 2; };;) { -} -for (var aModule = M;;) { -} -for (var aClassInModule = new M.A();;) { -} -for (var aFunctionInModule = function (x) { return 'this is a string'; };;) { -} +for (var aNumber = 9.9;;) { } +for (var aString = 'this is a string';;) { } +for (var aDate = new Date(12);;) { } +for (var anObject = new Object();;) { } +for (var anAny = null;;) { } +for (var aSecondAny = undefined;;) { } +for (var aVoid = undefined;;) { } +for (var anInterface = new C();;) { } +for (var aClass = new C();;) { } +for (var aGenericClass = new D();;) { } +for (var anObjectLiteral = { id: 12 };;) { } +for (var anOtherObjectLiteral = new C();;) { } +for (var aFunction = F;;) { } +for (var anOtherFunction = F;;) { } +for (var aLambda = function (x) { return 2; };;) { } +for (var aModule = M;;) { } +for (var aClassInModule = new M.A();;) { } +for (var aFunctionInModule = function (x) { return 'this is a string'; };;) { } diff --git a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js index 4dbfe7e62bc..5c856398be2 100644 --- a/tests/baselines/reference/forStatementsMultipleInvalidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleInvalidDecl.js @@ -94,39 +94,21 @@ var M; M.F2 = F2; })(M || (M = {})); // all of these are errors -for (var a;;) { -} -for (var a = 1;;) { -} -for (var a = 'a string';;) { -} -for (var a = new C();;) { -} -for (var a = new D();;) { -} -for (var a = M;;) { -} -for (var b;;) { -} -for (var b = new C();;) { -} -for (var b = new C2();;) { -} -for (var f = F;;) { -} -for (var f = function (x) { return ''; };;) { -} -for (var arr;;) { -} -for (var arr = [1, 2, 3, 4];;) { -} -for (var arr = [new C(), new C2(), new D()];;) { -} -for (var arr2 = [new D()];;) { -} -for (var arr2 = new Array();;) { -} -for (var m;;) { -} -for (var m = M.A;;) { -} +for (var a;;) { } +for (var a = 1;;) { } +for (var a = 'a string';;) { } +for (var a = new C();;) { } +for (var a = new D();;) { } +for (var a = M;;) { } +for (var b;;) { } +for (var b = new C();;) { } +for (var b = new C2();;) { } +for (var f = F;;) { } +for (var f = function (x) { return ''; };;) { } +for (var arr;;) { } +for (var arr = [1, 2, 3, 4];;) { } +for (var arr = [new C(), new C2(), new D()];;) { } +for (var arr2 = [new D()];;) { } +for (var arr2 = new Array();;) { } +for (var m;;) { } +for (var m = M.A;;) { } diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.js b/tests/baselines/reference/forStatementsMultipleValidDecl.js index 5cc9bf3cd7d..76571ce1ff4 100644 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.js +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.js @@ -35,54 +35,31 @@ for (var a: typeof a; ;) { } //// [forStatementsMultipleValidDecl.js] // all expected to be valid -for (var x;;) { -} -for (var x = 2;;) { -} -for (var x = undefined;;) { -} +for (var x;;) { } +for (var x = 2;;) { } +for (var x = undefined;;) { } // new declaration space, making redeclaring x as a string valid function declSpace() { - for (var x = 'this is a string';;) { - } -} -for (var p;;) { -} -for (var p = { x: 1, y: 2 };;) { -} -for (var p = { x: 0, y: undefined };;) { -} -for (var p = { x: 1, y: undefined };;) { -} -for (var p = { x: 1, y: 2 };;) { -} -for (var p = { x: 0, y: undefined };;) { -} -for (var p;;) { + for (var x = 'this is a string';;) { } } +for (var p;;) { } +for (var p = { x: 1, y: 2 };;) { } +for (var p = { x: 0, y: undefined };;) { } +for (var p = { x: 1, y: undefined };;) { } +for (var p = { x: 1, y: 2 };;) { } +for (var p = { x: 0, y: undefined };;) { } +for (var p;;) { } for (var fn = function (s) { return 42; -};;) { -} -for (var fn = function (s) { return 3; };;) { -} -for (var fn;;) { -} -for (var fn;;) { -} -for (var fn = null;;) { -} -for (var fn;;) { -} -for (var a;;) { -} -for (var a = ['a', 'b'];;) { -} -for (var a = [];;) { -} -for (var a = [];;) { -} -for (var a = new Array();;) { -} -for (var a;;) { -} +};;) { } +for (var fn = function (s) { return 3; };;) { } +for (var fn;;) { } +for (var fn;;) { } +for (var fn = null;;) { } +for (var fn;;) { } +for (var a;;) { } +for (var a = ['a', 'b'];;) { } +for (var a = [];;) { } +for (var a = [];;) { } +for (var a = new Array();;) { } +for (var a;;) { } diff --git a/tests/baselines/reference/funClodule.js b/tests/baselines/reference/funClodule.js index 8629ed63055..cc7dba7e476 100644 --- a/tests/baselines/reference/funClodule.js +++ b/tests/baselines/reference/funClodule.js @@ -20,12 +20,10 @@ module foo3 { class foo3 { } // Should error //// [funClodule.js] -function foo3() { -} +function foo3() { } var foo3; (function (foo3) { - function x() { - } + function x() { } foo3.x = x; })(foo3 || (foo3 = {})); var foo3 = (function () { diff --git a/tests/baselines/reference/funcdecl.js b/tests/baselines/reference/funcdecl.js index de080873b9f..348d25bd670 100644 --- a/tests/baselines/reference/funcdecl.js +++ b/tests/baselines/reference/funcdecl.js @@ -115,8 +115,7 @@ function overload1(ns) { return ns.toString(); } var withOverloadSignature = overload1; -function f(n) { -} +function f(n) { } var m2; (function (m2) { function foo(n) { diff --git a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js index 004e65d92af..d59cff501ed 100644 --- a/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js +++ b/tests/baselines/reference/functionAndInterfaceWithSeparateErrors.js @@ -8,5 +8,4 @@ interface Foo { } //// [functionAndInterfaceWithSeparateErrors.js] -function Foo(n) { -} +function Foo(n) { } diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.js b/tests/baselines/reference/functionAndPropertyNameConflict.js index 1368f8241d5..28a2cd54c9e 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.js +++ b/tests/baselines/reference/functionAndPropertyNameConflict.js @@ -10,8 +10,7 @@ class C65 { var C65 = (function () { function C65() { } - C65.prototype.aaaaa = function () { - }; + C65.prototype.aaaaa = function () { }; Object.defineProperty(C65.prototype, "aaaaa", { get: function () { return 1; diff --git a/tests/baselines/reference/functionArgShadowing.js b/tests/baselines/reference/functionArgShadowing.js index c74570902ed..451e46536e0 100644 --- a/tests/baselines/reference/functionArgShadowing.js +++ b/tests/baselines/reference/functionArgShadowing.js @@ -18,15 +18,13 @@ class C { var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { - }; + B.prototype.bar = function () { }; return B; })(); function foo(x) { diff --git a/tests/baselines/reference/functionAssignment.js b/tests/baselines/reference/functionAssignment.js index ce47f0a04b8..5a3e07c9e8d 100644 --- a/tests/baselines/reference/functionAssignment.js +++ b/tests/baselines/reference/functionAssignment.js @@ -38,27 +38,21 @@ callb((a) =>{ a.length; }); //// [functionAssignment.js] -function f(n) { -} -f(function () { -}); +function f(n) { } +f(function () { }); var barbaz; var test; test.get(function (param) { - var x = barbaz.get(function () { - }); + var x = barbaz.get(function () { }); }); -function f2(n) { -} +function f2(n) { } f2(function () { var n = ''; n = 4; }); -function f3(a) { -} +function f3(a) { } f3({ a: 0, b: 0 }); -function callb(a) { -} +function callb(a) { } callb(function (a) { a.length; }); diff --git a/tests/baselines/reference/functionCall10.js b/tests/baselines/reference/functionCall10.js index 9d5cb33a56a..299d73ee24a 100644 --- a/tests/baselines/reference/functionCall10.js +++ b/tests/baselines/reference/functionCall10.js @@ -7,12 +7,7 @@ foo(1, 'bar'); //// [functionCall10.js] -function foo() { - var a = []; - for (var _i = 0; _i < arguments.length; _i++) { - a[_i - 0] = arguments[_i]; - } -} +function foo() { } ; foo(0, 1); foo('foo'); diff --git a/tests/baselines/reference/functionCall11.js b/tests/baselines/reference/functionCall11.js index 9c36dedba36..019ea213dbc 100644 --- a/tests/baselines/reference/functionCall11.js +++ b/tests/baselines/reference/functionCall11.js @@ -8,8 +8,7 @@ foo('foo', 1, 'bar'); //// [functionCall11.js] -function foo(a, b) { -} +function foo(a, b) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall12.js b/tests/baselines/reference/functionCall12.js index ca71c25a172..2c3396c209a 100644 --- a/tests/baselines/reference/functionCall12.js +++ b/tests/baselines/reference/functionCall12.js @@ -9,8 +9,7 @@ foo('foo', 1, 3); //// [functionCall12.js] -function foo(a, b, c) { -} +function foo(a, b, c) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall13.js b/tests/baselines/reference/functionCall13.js index ce57f43215e..a66ecafc8b4 100644 --- a/tests/baselines/reference/functionCall13.js +++ b/tests/baselines/reference/functionCall13.js @@ -8,12 +8,7 @@ foo('foo', 1, 3); //// [functionCall13.js] -function foo(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo(a) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall14.js b/tests/baselines/reference/functionCall14.js index 47447f46db5..f3af9f65436 100644 --- a/tests/baselines/reference/functionCall14.js +++ b/tests/baselines/reference/functionCall14.js @@ -8,12 +8,7 @@ foo('foo', 1, 3); //// [functionCall14.js] -function foo(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo(a) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall15.js b/tests/baselines/reference/functionCall15.js index 28fa4c917c8..baef02be27d 100644 --- a/tests/baselines/reference/functionCall15.js +++ b/tests/baselines/reference/functionCall15.js @@ -2,9 +2,4 @@ function foo(a?:string, b?:number, ...b:number[]){} //// [functionCall15.js] -function foo(a, b) { - var b = []; - for (var _i = 2; _i < arguments.length; _i++) { - b[_i - 2] = arguments[_i]; - } -} +function foo(a, b) { } diff --git a/tests/baselines/reference/functionCall16.js b/tests/baselines/reference/functionCall16.js index 187572a9a7e..d9b416581a7 100644 --- a/tests/baselines/reference/functionCall16.js +++ b/tests/baselines/reference/functionCall16.js @@ -9,12 +9,7 @@ foo('foo', 'bar', 3); //// [functionCall16.js] -function foo(a, b) { - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } -} +function foo(a, b) { } foo('foo', 1); foo('foo'); foo('foo', 'bar'); diff --git a/tests/baselines/reference/functionCall17.js b/tests/baselines/reference/functionCall17.js index 73f7fd6070b..62495358210 100644 --- a/tests/baselines/reference/functionCall17.js +++ b/tests/baselines/reference/functionCall17.js @@ -9,12 +9,7 @@ foo('foo', 'bar', 3, 4); //// [functionCall17.js] -function foo(a, b, c) { - var d = []; - for (var _i = 3; _i < arguments.length; _i++) { - d[_i - 3] = arguments[_i]; - } -} +function foo(a, b, c) { } foo('foo', 1); foo('foo'); foo(); diff --git a/tests/baselines/reference/functionCall6.js b/tests/baselines/reference/functionCall6.js index 21582666b94..01197a5fd8d 100644 --- a/tests/baselines/reference/functionCall6.js +++ b/tests/baselines/reference/functionCall6.js @@ -7,8 +7,7 @@ foo(); //// [functionCall6.js] -function foo(a) { -} +function foo(a) { } ; foo('bar'); foo(2); diff --git a/tests/baselines/reference/functionCall8.js b/tests/baselines/reference/functionCall8.js index 7eb5a9f60d9..5859fdfb375 100644 --- a/tests/baselines/reference/functionCall8.js +++ b/tests/baselines/reference/functionCall8.js @@ -7,8 +7,7 @@ foo(); //// [functionCall8.js] -function foo(a) { -} +function foo(a) { } foo('foo'); foo('foo', 'bar'); foo(4); diff --git a/tests/baselines/reference/functionCall9.js b/tests/baselines/reference/functionCall9.js index d2d81a3ca04..bc7e112f0c8 100644 --- a/tests/baselines/reference/functionCall9.js +++ b/tests/baselines/reference/functionCall9.js @@ -7,8 +7,7 @@ foo('foo', 1, 'bar'); foo(); //// [functionCall9.js] -function foo(a, b) { -} +function foo(a, b) { } ; foo('foo', 1); foo('foo'); diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.js b/tests/baselines/reference/functionConstraintSatisfaction2.js index e204b6c0adb..982dcb37a49 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.js +++ b/tests/baselines/reference/functionConstraintSatisfaction2.js @@ -46,10 +46,8 @@ function foo(x) { return x; } foo(1); -foo(function () { -}, 1); -foo(1, function () { -}); +foo(function () { }, 1); +foo(1, function () { }); function foo2(x) { return x; } diff --git a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js index 358b8509ceb..fe10f96f7bb 100644 --- a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js +++ b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.js @@ -15,8 +15,7 @@ var CDoc = (function () { function doSomething(a) { } doSomething(function () { return undefined; }); - doSomething(function () { - }); + doSomething(function () { }); } return CDoc; })(); diff --git a/tests/baselines/reference/functionImplementations.js b/tests/baselines/reference/functionImplementations.js index 7c7b753a880..c478f892fd5 100644 --- a/tests/baselines/reference/functionImplementations.js +++ b/tests/baselines/reference/functionImplementations.js @@ -164,8 +164,7 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // FunctionExpression with no return type annotation and no return statement returns void -var v = function () { -}(); +var v = function () { }(); // FunctionExpression f with no return type annotation and directly references f in its body returns any var a = function f() { return f; diff --git a/tests/baselines/reference/functionNameConflicts.js b/tests/baselines/reference/functionNameConflicts.js index 99ede14dfde..87b61e3733d 100644 --- a/tests/baselines/reference/functionNameConflicts.js +++ b/tests/baselines/reference/functionNameConflicts.js @@ -32,22 +32,17 @@ function overrr() { //Function overload with different name from implementation signature var M; (function (M) { - function fn1() { - } + function fn1() { } var fn1; var fn2; - function fn2() { - } + function fn2() { } })(M || (M = {})); -function fn3() { -} +function fn3() { } var fn3; function func() { var fn4; - function fn4() { - } - function fn5() { - } + function fn4() { } + function fn5() { } var fn5; } function overrr() { diff --git a/tests/baselines/reference/functionOverloadAmbiguity1.js b/tests/baselines/reference/functionOverloadAmbiguity1.js index d53ec68c9d9..f2fa78e1c14 100644 --- a/tests/baselines/reference/functionOverloadAmbiguity1.js +++ b/tests/baselines/reference/functionOverloadAmbiguity1.js @@ -11,13 +11,11 @@ callb2((a) => { a.length; } ); // ok, chose first overload //// [functionOverloadAmbiguity1.js] -function callb(a) { -} +function callb(a) { } callb(function (a) { a.length; }); // error, chose first overload -function callb2(a) { -} +function callb2(a) { } callb2(function (a) { a.length; }); // ok, chose first overload diff --git a/tests/baselines/reference/functionOverloadErrors.js b/tests/baselines/reference/functionOverloadErrors.js index 623b0e6f4dc..b0c0f449456 100644 --- a/tests/baselines/reference/functionOverloadErrors.js +++ b/tests/baselines/reference/functionOverloadErrors.js @@ -119,8 +119,7 @@ function initExpr() { } //// [functionOverloadErrors.js] -function fn1() { -} +function fn1() { } function fn2a() { } function fn2b() { @@ -128,52 +127,37 @@ function fn2b() { function fn3() { return null; } -function fn6() { -} -function fn7() { -} -function fn8() { -} -function fn9() { -} -function fn10() { -} -function fn11() { -} -function fn12() { -} +function fn6() { } +function fn7() { } +function fn8() { } +function fn9() { } +function fn10() { } +function fn11() { } +function fn12() { } //Function overloads that differ by accessibility var cls = (function () { function cls() { } - cls.prototype.f = function () { - }; - cls.prototype.g = function () { - }; + cls.prototype.f = function () { }; + cls.prototype.g = function () { }; return cls; })(); //Function overloads with differing export var M; (function (M) { - function fn1() { - } - function fn2() { - } + function fn1() { } + function fn2() { } M.fn2 = fn2; })(M || (M = {})); -function dfn1() { -} -function dfn2() { -} +function dfn1() { } +function dfn2() { } function fewerParams(n) { } -function fn13(n) { -} +function fn13(n) { } function fn14() { return 3; } function fn15() { return undefined; } -function initExpr() { -} +function initExpr() { } diff --git a/tests/baselines/reference/functionOverloadErrorsSyntax.js b/tests/baselines/reference/functionOverloadErrorsSyntax.js index 3706f4da744..1a5537d2de2 100644 --- a/tests/baselines/reference/functionOverloadErrorsSyntax.js +++ b/tests/baselines/reference/functionOverloadErrorsSyntax.js @@ -12,9 +12,6 @@ function fn5() { } //// [functionOverloadErrorsSyntax.js] -function fn4a() { -} -function fn4b() { -} -function fn5() { -} +function fn4a() { } +function fn4b() { } +function fn5() { } diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js index 6b66bc89ffa..465753f1040 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName.js @@ -4,5 +4,4 @@ function foo(x, y); function bar() { } //// [functionOverloadImplementationOfWrongName.js] -function bar() { -} +function bar() { } diff --git a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js index c3008e7a6c2..34cf73d3239 100644 --- a/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js +++ b/tests/baselines/reference/functionOverloadImplementationOfWrongName2.js @@ -4,5 +4,4 @@ function bar() { } function foo(x, y); //// [functionOverloadImplementationOfWrongName2.js] -function bar() { -} +function bar() { } diff --git a/tests/baselines/reference/functionOverloads10.js b/tests/baselines/reference/functionOverloads10.js index 2cd24bcd1cb..08b71698dce 100644 --- a/tests/baselines/reference/functionOverloads10.js +++ b/tests/baselines/reference/functionOverloads10.js @@ -5,5 +5,4 @@ function foo(foo:any){ } //// [functionOverloads10.js] -function foo(foo) { -} +function foo(foo) { } diff --git a/tests/baselines/reference/functionOverloads24.js b/tests/baselines/reference/functionOverloads24.js index 5ff4e248c0a..c7255063174 100644 --- a/tests/baselines/reference/functionOverloads24.js +++ b/tests/baselines/reference/functionOverloads24.js @@ -6,6 +6,5 @@ function foo(bar:any):(a)=>void { return function(){} } //// [functionOverloads24.js] function foo(bar) { - return function () { - }; + return function () { }; } diff --git a/tests/baselines/reference/functionOverloads5.js b/tests/baselines/reference/functionOverloads5.js index 15507a9fb61..b59154d2417 100644 --- a/tests/baselines/reference/functionOverloads5.js +++ b/tests/baselines/reference/functionOverloads5.js @@ -9,7 +9,6 @@ class baz { var baz = (function () { function baz() { } - baz.prototype.foo = function (bar) { - }; + baz.prototype.foo = function (bar) { }; return baz; })(); diff --git a/tests/baselines/reference/functionOverloads6.js b/tests/baselines/reference/functionOverloads6.js index b7f9fd8c1f2..2c19b376dc8 100644 --- a/tests/baselines/reference/functionOverloads6.js +++ b/tests/baselines/reference/functionOverloads6.js @@ -10,7 +10,6 @@ class foo { var foo = (function () { function foo() { } - foo.fnOverload = function (foo) { - }; + foo.fnOverload = function (foo) { }; return foo; })(); diff --git a/tests/baselines/reference/functionReturn.js b/tests/baselines/reference/functionReturn.js index bfcd12e2b95..fbb889589a0 100644 --- a/tests/baselines/reference/functionReturn.js +++ b/tests/baselines/reference/functionReturn.js @@ -15,13 +15,11 @@ function f5(): string { } //// [functionReturn.js] -function f0() { -} +function f0() { } function f1() { var n = f0(); } -function f2() { -} +function f2() { } function f3() { return; } diff --git a/tests/baselines/reference/functionType.js b/tests/baselines/reference/functionType.js index c2d6eea784c..6e3edc7347e 100644 --- a/tests/baselines/reference/functionType.js +++ b/tests/baselines/reference/functionType.js @@ -7,7 +7,6 @@ salt.apply("hello", []); //// [functionType.js] -function salt() { -} +function salt() { } salt.apply("hello", []); (new Function("return 5"))(); diff --git a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js index 6bca14b063b..dae960bad68 100644 --- a/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js +++ b/tests/baselines/reference/functionWithAnyReturnTypeAndNoReturnExpression.js @@ -6,9 +6,6 @@ var f3 = (): any => { }; //// [functionWithAnyReturnTypeAndNoReturnExpression.js] // All should be allowed -function f() { -} -var f2 = function () { -}; -var f3 = function () { -}; +function f() { } +var f2 = function () { }; +var f3 = function () { }; diff --git a/tests/baselines/reference/functionWithMultipleReturnStatements2.js b/tests/baselines/reference/functionWithMultipleReturnStatements2.js index 396c4a8d9c0..4674c6db953 100644 --- a/tests/baselines/reference/functionWithMultipleReturnStatements2.js +++ b/tests/baselines/reference/functionWithMultipleReturnStatements2.js @@ -166,22 +166,18 @@ function f10() { // returns number => void function f11() { if (true) { - return function (x) { - }; + return function (x) { }; } else { - return function (x) { - }; + return function (x) { }; } } // returns Object => void function f12() { if (true) { - return function (x) { - }; + return function (x) { }; } else { - return function (x) { - }; + return function (x) { }; } } diff --git a/tests/baselines/reference/functionsWithModifiersInBlocks1.js b/tests/baselines/reference/functionsWithModifiersInBlocks1.js index 1d381bccfe1..757fe509747 100644 --- a/tests/baselines/reference/functionsWithModifiersInBlocks1.js +++ b/tests/baselines/reference/functionsWithModifiersInBlocks1.js @@ -7,7 +7,6 @@ //// [functionsWithModifiersInBlocks1.js] { - function f() { - } + function f() { } exports.f = f; } diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.js b/tests/baselines/reference/funduleSplitAcrossFiles.js index 330fbcdec74..bb59338a630 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.js +++ b/tests/baselines/reference/funduleSplitAcrossFiles.js @@ -10,8 +10,7 @@ module D { D.y; //// [funduleSplitAcrossFiles_function.js] -function D() { -} +function D() { } //// [funduleSplitAcrossFiles_module.js] var D; (function (D) { diff --git a/tests/baselines/reference/generatedContextualTyping.js b/tests/baselines/reference/generatedContextualTyping.js index ddba62543b5..68cc22ff45e 100644 --- a/tests/baselines/reference/generatedContextualTyping.js +++ b/tests/baselines/reference/generatedContextualTyping.js @@ -1195,55 +1195,18 @@ var x120 = (function () { } return x120; })(); -function x121(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } -} -function x122(parm) { - if (parm === void 0) { parm = function () { - return [d1, d2]; - }; } -} -function x123(parm) { - if (parm === void 0) { parm = function named() { - return [d1, d2]; - }; } -} -function x124(parm) { - if (parm === void 0) { parm = function () { return [d1, d2]; }; } -} -function x125(parm) { - if (parm === void 0) { parm = function () { - return [d1, d2]; - }; } -} -function x126(parm) { - if (parm === void 0) { parm = function named() { - return [d1, d2]; - }; } -} -function x127(parm) { - if (parm === void 0) { parm = [d1, d2]; } -} -function x128(parm) { - if (parm === void 0) { parm = [d1, d2]; } -} -function x129(parm) { - if (parm === void 0) { parm = [d1, d2]; } -} -function x130(parm) { - if (parm === void 0) { parm = { n: [d1, d2] }; } -} -function x131(parm) { - if (parm === void 0) { parm = function (n) { - var n; - return null; - }; } -} -function x132(parm) { - if (parm === void 0) { parm = { func: function (n) { - return [d1, d2]; - } }; } -} +function x121(parm) { } +function x122(parm) { } +function x123(parm) { } +function x124(parm) { } +function x125(parm) { } +function x126(parm) { } +function x127(parm) { } +function x128(parm) { } +function x129(parm) { } +function x130(parm) { } +function x131(parm) { } +function x132(parm) { } function x133() { return function () { return [d1, d2]; }; } @@ -1842,63 +1805,51 @@ var x319 = true ? function (n) { var x320 = true ? { func: function (n) { return [d1, d2]; } } : undefined; -function x321(n) { -} +function x321(n) { } ; x321(function () { return [d1, d2]; }); -function x322(n) { -} +function x322(n) { } ; x322(function () { return [d1, d2]; }); -function x323(n) { -} +function x323(n) { } ; x323(function named() { return [d1, d2]; }); -function x324(n) { -} +function x324(n) { } ; x324(function () { return [d1, d2]; }); -function x325(n) { -} +function x325(n) { } ; x325(function () { return [d1, d2]; }); -function x326(n) { -} +function x326(n) { } ; x326(function named() { return [d1, d2]; }); -function x327(n) { -} +function x327(n) { } ; x327([d1, d2]); -function x328(n) { -} +function x328(n) { } ; x328([d1, d2]); -function x329(n) { -} +function x329(n) { } ; x329([d1, d2]); -function x330(n) { -} +function x330(n) { } ; x330({ n: [d1, d2] }); -function x331(n) { -} +function x331(n) { } ; x331(function (n) { var n; return null; }); -function x332(n) { -} +function x332(n) { } ; x332({ func: function (n) { return [d1, d2]; @@ -1940,52 +1891,40 @@ var x344 = function (n) { return n; }; x344({ func: function (n) { return [d1, d2]; } }); -var x345 = function (n) { -}; +var x345 = function (n) { }; x345(function () { return [d1, d2]; }); -var x346 = function (n) { -}; +var x346 = function (n) { }; x346(function () { return [d1, d2]; }); -var x347 = function (n) { -}; +var x347 = function (n) { }; x347(function named() { return [d1, d2]; }); -var x348 = function (n) { -}; +var x348 = function (n) { }; x348(function () { return [d1, d2]; }); -var x349 = function (n) { -}; +var x349 = function (n) { }; x349(function () { return [d1, d2]; }); -var x350 = function (n) { -}; +var x350 = function (n) { }; x350(function named() { return [d1, d2]; }); -var x351 = function (n) { -}; +var x351 = function (n) { }; x351([d1, d2]); -var x352 = function (n) { -}; +var x352 = function (n) { }; x352([d1, d2]); -var x353 = function (n) { -}; +var x353 = function (n) { }; x353([d1, d2]); -var x354 = function (n) { -}; +var x354 = function (n) { }; x354({ n: [d1, d2] }); -var x355 = function (n) { -}; +var x355 = function (n) { }; x355(function (n) { var n; return null; }); -var x356 = function (n) { -}; +var x356 = function (n) { }; x356({ func: function (n) { return [d1, d2]; } }); diff --git a/tests/baselines/reference/generativeRecursionWithTypeOf.js b/tests/baselines/reference/generativeRecursionWithTypeOf.js index 599751ebde7..2b7eebfd11c 100644 --- a/tests/baselines/reference/generativeRecursionWithTypeOf.js +++ b/tests/baselines/reference/generativeRecursionWithTypeOf.js @@ -14,8 +14,7 @@ module M { var C = (function () { function C() { } - C.foo = function (x) { - }; + C.foo = function (x) { }; return C; })(); var M; diff --git a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js index 6f1928a2601..9b7d5b713e9 100644 --- a/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js +++ b/tests/baselines/reference/genericAssignmentCompatOfFunctionSignatures1.js @@ -6,9 +6,7 @@ x1 = x2; x2 = x1; //// [genericAssignmentCompatOfFunctionSignatures1.js] -var x1 = function foo3(x, z) { -}; -var x2 = function foo3(x, z) { -}; +var x1 = function foo3(x, z) { }; +var x2 = function foo3(x, z) { }; x1 = x2; x2 = x1; diff --git a/tests/baselines/reference/genericCallWithFixedArguments.js b/tests/baselines/reference/genericCallWithFixedArguments.js index 10c0e2b496b..e588c0d113d 100644 --- a/tests/baselines/reference/genericCallWithFixedArguments.js +++ b/tests/baselines/reference/genericCallWithFixedArguments.js @@ -11,17 +11,14 @@ g(7) // the parameter list is fixed, so this should not error var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { - }; + B.prototype.bar = function () { }; return B; })(); -function g(x) { -} +function g(x) { } g(7); // the parameter list is fixed, so this should not error diff --git a/tests/baselines/reference/genericCallWithNonGenericArgs1.js b/tests/baselines/reference/genericCallWithNonGenericArgs1.js index 2282c64e851..4f5239630ae 100644 --- a/tests/baselines/reference/genericCallWithNonGenericArgs1.js +++ b/tests/baselines/reference/genericCallWithNonGenericArgs1.js @@ -4,6 +4,5 @@ f(null) //// [genericCallWithNonGenericArgs1.js] -function f(x) { -} +function f(x) { } f(null); diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js index 513a0317cf3..10d32ddeae7 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.js @@ -57,11 +57,8 @@ var r4 = foo(null, null); var r5 = foo({}, null); var r6 = foo(null, {}); var r7 = foo({}, {}); -var r8 = foo(function () { -}, function () { -}); -var r9 = foo(function () { -}, function () { return 1; }); +var r8 = foo(function () { }, function () { }); +var r9 = foo(function () { }, function () { return 1; }); function other() { var r4 = foo(c, d); var r5 = foo(c, d); // error diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js index b2cda6e2d81..95b98767a09 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.js @@ -42,8 +42,7 @@ function foo(t, t2) { var c; var d; var r2 = foo(d, c); // the constraints are self-referencing, no downstream error -var r9 = foo(function () { return 1; }, function () { -}); // the constraints are self-referencing, no downstream error +var r9 = foo(function () { return 1; }, function () { }); // the constraints are self-referencing, no downstream error function other() { var r5 = foo(c, d); // error } diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js index ae104470b76..dffd3641079 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.js @@ -19,18 +19,8 @@ function foo2(x) { if (x === void 0) { x = undefined; } return x; } // ok -function foo3(x) { - if (x === void 0) { x = 1; } -} // error -function foo4(x, y) { - if (y === void 0) { y = x; } -} // error -function foo5(x, y) { - if (y === void 0) { y = x; } -} // ok -function foo6(x, y, z) { - if (z === void 0) { z = y; } -} // error -function foo7(x, y) { - if (y === void 0) { y = x; } -} // should be ok +function foo3(x) { } // error +function foo4(x, y) { } // error +function foo5(x, y) { } // ok +function foo6(x, y, z) { } // error +function foo7(x, y) { } // should be ok diff --git a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js index 682cd6010f1..e63c7a98272 100644 --- a/tests/baselines/reference/genericCallbacksAndClassHierarchy.js +++ b/tests/baselines/reference/genericCallbacksAndClassHierarchy.js @@ -56,13 +56,11 @@ var M; function D() { } D.prototype._subscribe = function (viewModel) { - var f = function (newValue) { - }; + var f = function (newValue) { }; var v = viewModel.value; // both of these should work v.subscribe(f); - v.subscribe(function (newValue) { - }); + v.subscribe(function (newValue) { }); }; return D; })(); diff --git a/tests/baselines/reference/genericCallsWithoutParens.js b/tests/baselines/reference/genericCallsWithoutParens.js index e51ed55224c..a479fbab375 100644 --- a/tests/baselines/reference/genericCallsWithoutParens.js +++ b/tests/baselines/reference/genericCallsWithoutParens.js @@ -10,8 +10,7 @@ var c = new C; // parse error //// [genericCallsWithoutParens.js] -function f() { -} +function f() { } var r = f(); // parse error var C = (function () { function C() { diff --git a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js index 8d1e87cb495..5aa2c716986 100644 --- a/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js +++ b/tests/baselines/reference/genericClassPropertyInheritanceSpecialization.js @@ -91,8 +91,7 @@ var Portal; var Validator = (function () { function Validator(message) { } - Validator.prototype.destroy = function () { - }; + Validator.prototype.destroy = function () { }; Validator.prototype._validate = function (value) { return 0; }; diff --git a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js index 57d33a35990..2fd410756b6 100644 --- a/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js +++ b/tests/baselines/reference/genericClassWithStaticsUsingTypeArguments.js @@ -25,8 +25,7 @@ var Foo = (function () { Foo.f = function (xs) { return xs.reverse(); }; - Foo.a = function (n) { - }; + Foo.a = function (n) { }; Foo.c = []; Foo.d = false || (function (x) { return x || undefined; })(null); Foo.e = function (x) { diff --git a/tests/baselines/reference/genericCloduleInModule.js b/tests/baselines/reference/genericCloduleInModule.js index f3938735695..92c519aa012 100644 --- a/tests/baselines/reference/genericCloduleInModule.js +++ b/tests/baselines/reference/genericCloduleInModule.js @@ -18,10 +18,8 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { - }; - B.bar = function () { - }; + B.prototype.foo = function () { }; + B.bar = function () { }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/genericCloduleInModule2.js b/tests/baselines/reference/genericCloduleInModule2.js index 1cb3bd66403..bb8021ffe8c 100644 --- a/tests/baselines/reference/genericCloduleInModule2.js +++ b/tests/baselines/reference/genericCloduleInModule2.js @@ -21,10 +21,8 @@ var A; var B = (function () { function B() { } - B.prototype.foo = function () { - }; - B.bar = function () { - }; + B.prototype.foo = function () { }; + B.bar = function () { }; return B; })(); A.B = B; diff --git a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js index b8b52179c71..30d57403aec 100644 --- a/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js +++ b/tests/baselines/reference/genericFunctionHasFreshTypeArgs.js @@ -3,7 +3,6 @@ function f(p: (x: T) => void) { }; f(x => f(y => x = y)); //// [genericFunctionHasFreshTypeArgs.js] -function f(p) { -} +function f(p) { } ; f(function (x) { return f(function (y) { return x = y; }); }); diff --git a/tests/baselines/reference/genericFunctionSpecializations1.js b/tests/baselines/reference/genericFunctionSpecializations1.js index 2935959b69e..c1043f792b6 100644 --- a/tests/baselines/reference/genericFunctionSpecializations1.js +++ b/tests/baselines/reference/genericFunctionSpecializations1.js @@ -6,7 +6,5 @@ function foo4(test: string); // valid function foo4(test: T) { } //// [genericFunctionSpecializations1.js] -function foo3(test) { -} -function foo4(test) { -} +function foo3(test) { } +function foo4(test) { } diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js index 2a5ce0a333c..d2e1a5ecc37 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.js @@ -19,8 +19,7 @@ var r5 = utils.mapReduce(c, f1, f2); var Collection = (function () { function Collection() { } - Collection.prototype.add = function (x) { - }; + Collection.prototype.add = function (x) { }; return Collection; })(); var utils; diff --git a/tests/baselines/reference/genericOfACloduleType1.js b/tests/baselines/reference/genericOfACloduleType1.js index 435575b0152..85629db765b 100644 --- a/tests/baselines/reference/genericOfACloduleType1.js +++ b/tests/baselines/reference/genericOfACloduleType1.js @@ -26,8 +26,7 @@ var M; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/genericOfACloduleType2.js b/tests/baselines/reference/genericOfACloduleType2.js index 4c73addcf72..0b10451bf2c 100644 --- a/tests/baselines/reference/genericOfACloduleType2.js +++ b/tests/baselines/reference/genericOfACloduleType2.js @@ -29,8 +29,7 @@ var M; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/genericOverloadSignatures.js b/tests/baselines/reference/genericOverloadSignatures.js index ec4c9ba74dc..45a21d5a334 100644 --- a/tests/baselines/reference/genericOverloadSignatures.js +++ b/tests/baselines/reference/genericOverloadSignatures.js @@ -31,8 +31,7 @@ interface D { } //// [genericOverloadSignatures.js] -function f(a) { -} +function f(a) { } var C2 = (function () { function C2() { } diff --git a/tests/baselines/reference/genericTypeAssertions1.js b/tests/baselines/reference/genericTypeAssertions1.js index 02a22aa5c81..54637007d99 100644 --- a/tests/baselines/reference/genericTypeAssertions1.js +++ b/tests/baselines/reference/genericTypeAssertions1.js @@ -8,8 +8,7 @@ var r2: A = >>foo; // error var A = (function () { function A() { } - A.prototype.foo = function (x) { - }; + A.prototype.foo = function (x) { }; return A; })(); var foo = new A(); diff --git a/tests/baselines/reference/genericTypeAssertions2.js b/tests/baselines/reference/genericTypeAssertions2.js index c7acecb5e43..3c904c7a30e 100644 --- a/tests/baselines/reference/genericTypeAssertions2.js +++ b/tests/baselines/reference/genericTypeAssertions2.js @@ -23,8 +23,7 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.foo = function (x) { - }; + A.prototype.foo = function (x) { }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js index dbda6074830..1b41116732a 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument.js @@ -95,9 +95,7 @@ var D3 = (function () { } return D3; })(); -function h(x) { -} -function i(x) { -} +function h(x) { } +function i(x) { } var j = null; var k = null; diff --git a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js index f6a22073702..f96e25301be 100644 --- a/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js +++ b/tests/baselines/reference/genericTypeReferenceWithoutTypeArgument2.js @@ -76,9 +76,7 @@ var D2 = (function (_super) { } return D2; })(M.C); -function h(x) { -} -function i(x) { -} +function h(x) { } +function i(x) { } var j = null; var k = null; diff --git a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js index 4cd7eb4165b..1a57b866d99 100644 --- a/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js +++ b/tests/baselines/reference/genericTypeWithNonGenericBaseMisMatch.js @@ -13,8 +13,7 @@ var i: I = x; // Should not be allowed -- type of 'f' is incompatible with 'I' var X = (function () { function X() { } - X.prototype.f = function (a) { - }; + X.prototype.f = function (a) { }; return X; })(); var x = new X(); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index f0a57430546..fdd2e470a55 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -33,8 +33,7 @@ define(["require", "exports"], function (require, exports) { function List() { _super.apply(this, arguments); } - List.prototype.Bar = function () { - }; + List.prototype.Bar = function () { }; return List; })(Collection); exports.List = List; diff --git a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js index f7f638f10e0..f01f01dbf21 100644 --- a/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js +++ b/tests/baselines/reference/genericsWithDuplicateTypeParameters1.js @@ -17,24 +17,21 @@ var m = { } //// [genericsWithDuplicateTypeParameters1.js] -function f() { -} +function f() { } function f2(a, b) { return null; } var C = (function () { function C() { } - C.prototype.f = function () { - }; + C.prototype.f = function () { }; C.prototype.f2 = function (a, b) { return null; }; return C; })(); var m = { - a: function f() { - }, + a: function f() { }, b: function f2(a, b) { return null; } diff --git a/tests/baselines/reference/genericsWithoutTypeParameters1.js b/tests/baselines/reference/genericsWithoutTypeParameters1.js index c06dfff13d1..8446d40cb11 100644 --- a/tests/baselines/reference/genericsWithoutTypeParameters1.js +++ b/tests/baselines/reference/genericsWithoutTypeParameters1.js @@ -46,10 +46,8 @@ var c1; var i1; var c2; var i2; -function foo(x, y) { -} -function foo2(x, y) { -} +function foo(x, y) { } +function foo2(x, y) { } var x = { a: new C() }; var x2 = { a: { bar: function () { return 1; diff --git a/tests/baselines/reference/getAndSetAsMemberNames.js b/tests/baselines/reference/getAndSetAsMemberNames.js index 22f99920fb1..41a89e6ec37 100644 --- a/tests/baselines/reference/getAndSetAsMemberNames.js +++ b/tests/baselines/reference/getAndSetAsMemberNames.js @@ -57,8 +57,7 @@ var C5 = (function () { return true; }; Object.defineProperty(C5.prototype, "t", { - set: function (x) { - }, + set: function (x) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/getAndSetNotIdenticalType.js b/tests/baselines/reference/getAndSetNotIdenticalType.js index 7e77fc25d0b..e6eb7fecc86 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType.js +++ b/tests/baselines/reference/getAndSetNotIdenticalType.js @@ -14,8 +14,7 @@ var C = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/getterSetterNonAccessor.js b/tests/baselines/reference/getterSetterNonAccessor.js index e234574d734..e32c62c497e 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.js +++ b/tests/baselines/reference/getterSetterNonAccessor.js @@ -13,8 +13,7 @@ Object.defineProperty({}, "0", ({ function getFunc() { return 0; } -function setFunc(v) { -} +function setFunc(v) { } Object.defineProperty({}, "0", ({ get: getFunc, set: setFunc, diff --git a/tests/baselines/reference/gettersAndSetters.js b/tests/baselines/reference/gettersAndSetters.js index 4c94cbc43db..6fb9518cfdb 100644 --- a/tests/baselines/reference/gettersAndSetters.js +++ b/tests/baselines/reference/gettersAndSetters.js @@ -46,10 +46,8 @@ var C = (function () { function C() { this.fooBack = ""; this.bazBack = ""; - this.get = function () { - }; // ok - this.set = function () { - }; // ok + this.get = function () { }; // ok + this.set = function () { }; // ok } Object.defineProperty(C.prototype, "Foo", { get: function () { diff --git a/tests/baselines/reference/gettersAndSettersAccessibility.js b/tests/baselines/reference/gettersAndSettersAccessibility.js index 9a7564ec96d..f472fa36a98 100644 --- a/tests/baselines/reference/gettersAndSettersAccessibility.js +++ b/tests/baselines/reference/gettersAndSettersAccessibility.js @@ -13,8 +13,7 @@ var C99 = (function () { get: function () { return 0; }, - set: function (n) { - } // error - accessors do not agree in visibility + set: function (n) { } // error - accessors do not agree in visibility , enumerable: true, configurable: true diff --git a/tests/baselines/reference/gettersAndSettersErrors.js b/tests/baselines/reference/gettersAndSettersErrors.js index 514a69b2513..545517facea 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.js +++ b/tests/baselines/reference/gettersAndSettersErrors.js @@ -26,8 +26,7 @@ var C = (function () { return "foo"; } // ok , - set: function (foo) { - } // ok + set: function (foo) { } // ok , enumerable: true, configurable: true @@ -37,8 +36,7 @@ var C = (function () { return null; } // error - getters must not have a parameter , - set: function (v) { - } // error - setters must not specify a return type + set: function (v) { } // error - setters must not specify a return type , enumerable: true, configurable: true @@ -52,8 +50,7 @@ var E = (function () { get: function () { return 0; }, - set: function (n) { - } // error - accessors do not agree in visibility + set: function (n) { } // error - accessors do not agree in visibility , enumerable: true, configurable: true diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.js b/tests/baselines/reference/gettersAndSettersTypesAgree.js index 48c0ac1500c..c291c457613 100644 --- a/tests/baselines/reference/gettersAndSettersTypesAgree.js +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.js @@ -19,8 +19,7 @@ var C = (function () { return "foo"; } // ok , - set: function (foo) { - } // ok - type inferred from getter return statement + set: function (foo) { } // ok - type inferred from getter return statement , enumerable: true, configurable: true @@ -30,8 +29,7 @@ var C = (function () { return "foo"; } // ok , - set: function (bar) { - } // ok - type must be declared + set: function (bar) { } // ok - type must be declared , enumerable: true, configurable: true @@ -40,9 +38,7 @@ var C = (function () { })(); var o1 = { get Foo() { return 0; -}, set Foo(val) { -} }; // ok - types agree (inference) +}, set Foo(val) { } }; // ok - types agree (inference) var o2 = { get Foo() { return 0; -}, set Foo(val) { -} }; // ok - types agree +}, set Foo(val) { } }; // ok - types agree diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index b16d0f5231c..7f2c2453b0f 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -697,60 +697,50 @@ define(["require", "exports"], function (require, exports) { MAX DEPTH 3 LEVELS */ var V; - function F() { - } + function F() { } ; var C = (function () { function C() { } - C.prototype.pF = function () { - }; - C.prototype.rF = function () { - }; - C.prototype.pgF = function () { - }; + C.prototype.pF = function () { }; + C.prototype.rF = function () { }; + C.prototype.pgF = function () { }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { - }; + C.prototype.psF = function (param) { }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { - }; + C.prototype.rgF = function () { }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { - }; + C.prototype.rsF = function (param) { }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { - }; - C.tsF = function (param) { - }; + C.tF = function () { }; + C.tsF = function (param) { }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { - }; + C.tgF = function () { }; Object.defineProperty(C, "tgF", { get: function () { }, @@ -762,60 +752,50 @@ define(["require", "exports"], function (require, exports) { var M; (function (_M) { var V; - function F() { - } + function F() { } ; var C = (function () { function C() { } - C.prototype.pF = function () { - }; - C.prototype.rF = function () { - }; - C.prototype.pgF = function () { - }; + C.prototype.pF = function () { }; + C.prototype.rF = function () { }; + C.prototype.pgF = function () { }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { - }; + C.prototype.psF = function (param) { }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { - }; + C.prototype.rgF = function () { }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { - }; + C.prototype.rsF = function (param) { }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { - }; - C.tsF = function (param) { - }; + C.tF = function () { }; + C.tsF = function (param) { }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { - }; + C.tgF = function () { }; Object.defineProperty(C, "tgF", { get: function () { }, @@ -827,8 +807,7 @@ define(["require", "exports"], function (require, exports) { var M; (function (M) { var V; - function F() { - } + function F() { } ; var C = (function () { function C() { @@ -839,8 +818,7 @@ define(["require", "exports"], function (require, exports) { ; ; M.eV; - function eF() { - } + function eF() { } M.eF = eF; ; var eC = (function () { @@ -857,61 +835,51 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); _M.eV; - function eF() { - } + function eF() { } _M.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { - }; - eC.prototype.rF = function () { - }; - eC.prototype.pgF = function () { - }; + eC.prototype.pF = function () { }; + eC.prototype.rF = function () { }; + eC.prototype.pgF = function () { }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { - }; + eC.prototype.psF = function (param) { }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { - }; + eC.prototype.rgF = function () { }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { - }; + eC.prototype.rsF = function (param) { }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { - }; - eC.tsF = function (param) { - }; + eC.tF = function () { }; + eC.tsF = function (param) { }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { - }; + eC.tgF = function () { }; Object.defineProperty(eC, "tgF", { get: function () { }, @@ -924,8 +892,7 @@ define(["require", "exports"], function (require, exports) { var eM; (function (eM) { var V; - function F() { - } + function F() { } ; var C = (function () { function C() { @@ -936,8 +903,7 @@ define(["require", "exports"], function (require, exports) { ; ; eM.eV; - function eF() { - } + function eF() { } eM.eF = eF; ; var eC = (function () { @@ -956,61 +922,51 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); exports.eV; - function eF() { - } + function eF() { } exports.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { - }; - eC.prototype.rF = function () { - }; - eC.prototype.pgF = function () { - }; + eC.prototype.pF = function () { }; + eC.prototype.rF = function () { }; + eC.prototype.pgF = function () { }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { - }; + eC.prototype.psF = function (param) { }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { - }; + eC.prototype.rgF = function () { }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { - }; + eC.prototype.rsF = function (param) { }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { - }; - eC.tsF = function (param) { - }; + eC.tF = function () { }; + eC.tsF = function (param) { }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { - }; + eC.tgF = function () { }; Object.defineProperty(eC, "tgF", { get: function () { }, @@ -1023,60 +979,50 @@ define(["require", "exports"], function (require, exports) { var eM; (function (_eM) { var V; - function F() { - } + function F() { } ; var C = (function () { function C() { } - C.prototype.pF = function () { - }; - C.prototype.rF = function () { - }; - C.prototype.pgF = function () { - }; + C.prototype.pF = function () { }; + C.prototype.rF = function () { }; + C.prototype.pgF = function () { }; Object.defineProperty(C.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.psF = function (param) { - }; + C.prototype.psF = function (param) { }; Object.defineProperty(C.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - C.prototype.rgF = function () { - }; + C.prototype.rgF = function () { }; Object.defineProperty(C.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - C.prototype.rsF = function (param) { - }; + C.prototype.rsF = function (param) { }; Object.defineProperty(C.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tF = function () { - }; - C.tsF = function (param) { - }; + C.tF = function () { }; + C.tsF = function (param) { }; Object.defineProperty(C, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - C.tgF = function () { - }; + C.tgF = function () { }; Object.defineProperty(C, "tgF", { get: function () { }, @@ -1088,8 +1034,7 @@ define(["require", "exports"], function (require, exports) { var M; (function (M) { var V; - function F() { - } + function F() { } ; var C = (function () { function C() { @@ -1100,8 +1045,7 @@ define(["require", "exports"], function (require, exports) { ; ; M.eV; - function eF() { - } + function eF() { } M.eF = eF; ; var eC = (function () { @@ -1118,61 +1062,51 @@ define(["require", "exports"], function (require, exports) { ; })(M || (M = {})); _eM.eV; - function eF() { - } + function eF() { } _eM.eF = eF; ; var eC = (function () { function eC() { } - eC.prototype.pF = function () { - }; - eC.prototype.rF = function () { - }; - eC.prototype.pgF = function () { - }; + eC.prototype.pF = function () { }; + eC.prototype.rF = function () { }; + eC.prototype.pgF = function () { }; Object.defineProperty(eC.prototype, "pgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.psF = function (param) { - }; + eC.prototype.psF = function (param) { }; Object.defineProperty(eC.prototype, "psF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.prototype.rgF = function () { - }; + eC.prototype.rgF = function () { }; Object.defineProperty(eC.prototype, "rgF", { get: function () { }, enumerable: true, configurable: true }); - eC.prototype.rsF = function (param) { - }; + eC.prototype.rsF = function (param) { }; Object.defineProperty(eC.prototype, "rsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tF = function () { - }; - eC.tsF = function (param) { - }; + eC.tF = function () { }; + eC.tsF = function (param) { }; Object.defineProperty(eC, "tsF", { set: function (param) { }, enumerable: true, configurable: true }); - eC.tgF = function () { - }; + eC.tgF = function () { }; Object.defineProperty(eC, "tgF", { get: function () { }, @@ -1185,8 +1119,7 @@ define(["require", "exports"], function (require, exports) { var eM; (function (eM) { var V; - function F() { - } + function F() { } ; var C = (function () { function C() { @@ -1197,8 +1130,7 @@ define(["require", "exports"], function (require, exports) { ; ; eM.eV; - function eF() { - } + function eF() { } eM.eF = eF; ; var eC = (function () { diff --git a/tests/baselines/reference/grammarAmbiguities1.js b/tests/baselines/reference/grammarAmbiguities1.js index cb6e4b75473..6ee64527bcc 100644 --- a/tests/baselines/reference/grammarAmbiguities1.js +++ b/tests/baselines/reference/grammarAmbiguities1.js @@ -14,15 +14,13 @@ f(g < A, B > +(7)); var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var B = (function () { function B() { } - B.prototype.bar = function () { - }; + B.prototype.bar = function () { }; return B; })(); function f(x) { diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.js b/tests/baselines/reference/heterogeneousArrayAndOverloads.js index c44a0921bc6..b816b87e3d1 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.js +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.js @@ -15,8 +15,7 @@ class arrTest { var arrTest = (function () { function arrTest() { } - arrTest.prototype.test = function (arg1) { - }; + arrTest.prototype.test = function (arg1) { }; arrTest.prototype.callTest = function () { this.test([1, 2, 3, 5]); this.test(["hi"]); diff --git a/tests/baselines/reference/ifDoWhileStatements.js b/tests/baselines/reference/ifDoWhileStatements.js index 613cbf6f4ec..c7f6ead6b28 100644 --- a/tests/baselines/reference/ifDoWhileStatements.js +++ b/tests/baselines/reference/ifDoWhileStatements.js @@ -219,180 +219,99 @@ var N; N.F2 = F2; })(N || (N = {})); // literals -if (true) { -} -while (true) { -} -do { -} while (true); -if (null) { -} -while (null) { -} -do { -} while (null); -if (undefined) { -} -while (undefined) { -} -do { -} while (undefined); -if (0.0) { -} -while (0.0) { -} -do { -} while (0.0); -if ('a string') { -} -while ('a string') { -} -do { -} while ('a string'); -if ('') { -} -while ('') { -} -do { -} while (''); -if (/[a-z]/) { -} -while (/[a-z]/) { -} -do { -} while (/[a-z]/); -if ([]) { -} -while ([]) { -} -do { -} while ([]); -if ([1, 2]) { -} -while ([1, 2]) { -} -do { -} while ([1, 2]); -if ({}) { -} -while ({}) { -} -do { -} while ({}); -if ({ x: 1, y: 'a' }) { -} -while ({ x: 1, y: 'a' }) { -} -do { -} while ({ x: 1, y: 'a' }); -if (function () { return 43; }) { -} -while (function () { return 43; }) { -} -do { -} while (function () { return 43; }); -if (new C()) { -} -while (new C()) { -} -do { -} while (new C()); -if (new D()) { -} -while (new D()) { -} -do { -} while (new D()); +if (true) { } +while (true) { } +do { } while (true); +if (null) { } +while (null) { } +do { } while (null); +if (undefined) { } +while (undefined) { } +do { } while (undefined); +if (0.0) { } +while (0.0) { } +do { } while (0.0); +if ('a string') { } +while ('a string') { } +do { } while ('a string'); +if ('') { } +while ('') { } +do { } while (''); +if (/[a-z]/) { } +while (/[a-z]/) { } +do { } while (/[a-z]/); +if ([]) { } +while ([]) { } +do { } while ([]); +if ([1, 2]) { } +while ([1, 2]) { } +do { } while ([1, 2]); +if ({}) { } +while ({}) { } +do { } while ({}); +if ({ x: 1, y: 'a' }) { } +while ({ x: 1, y: 'a' }) { } +do { } while ({ x: 1, y: 'a' }); +if (function () { return 43; }) { } +while (function () { return 43; }) { } +do { } while (function () { return 43; }); +if (new C()) { } +while (new C()) { } +do { } while (new C()); +if (new D()) { } +while (new D()) { } +do { } while (new D()); // references var a = true; -if (a) { -} -while (a) { -} -do { -} while (a); +if (a) { } +while (a) { } +do { } while (a); var b = null; -if (b) { -} -while (b) { -} -do { -} while (b); +if (b) { } +while (b) { } +do { } while (b); var c = undefined; -if (c) { -} -while (c) { -} -do { -} while (c); +if (c) { } +while (c) { } +do { } while (c); var d = 0.0; -if (d) { -} -while (d) { -} -do { -} while (d); +if (d) { } +while (d) { } +do { } while (d); var e = 'a string'; -if (e) { -} -while (e) { -} -do { -} while (e); +if (e) { } +while (e) { } +do { } while (e); var f = ''; -if (f) { -} -while (f) { -} -do { -} while (f); +if (f) { } +while (f) { } +do { } while (f); var g = /[a-z]/; -if (g) { -} -while (g) { -} -do { -} while (g); +if (g) { } +while (g) { } +do { } while (g); var h = []; -if (h) { -} -while (h) { -} -do { -} while (h); +if (h) { } +while (h) { } +do { } while (h); var i = [1, 2]; -if (i) { -} -while (i) { -} -do { -} while (i); +if (i) { } +while (i) { } +do { } while (i); var j = {}; -if (j) { -} -while (j) { -} -do { -} while (j); +if (j) { } +while (j) { } +do { } while (j); var k = { x: 1, y: 'a' }; -if (k) { -} -while (k) { -} -do { -} while (k); +if (k) { } +while (k) { } +do { } while (k); function fn(x) { return null; } -if (fn()) { -} -while (fn()) { -} -do { -} while (fn()); -if (fn) { -} -while (fn) { -} -do { -} while (fn); +if (fn()) { } +while (fn()) { } +do { } while (fn()); +if (fn) { } +while (fn) { } +do { } while (fn); diff --git a/tests/baselines/reference/implementsClauseAlreadySeen.js b/tests/baselines/reference/implementsClauseAlreadySeen.js index 84823c13fa8..abb28886615 100644 --- a/tests/baselines/reference/implementsClauseAlreadySeen.js +++ b/tests/baselines/reference/implementsClauseAlreadySeen.js @@ -15,7 +15,6 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.baz = function () { - }; + D.prototype.baz = function () { }; return D; })(); diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js index cba7602d049..df1c4d51e74 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionExprWithoutFormalType.js @@ -19,12 +19,9 @@ var lambda10 = function temp1() { return 5; } //// [implicitAnyDeclareFunctionExprWithoutFormalType.js] // these should be errors for implicit any parameter -var lambda = function (l1) { -}; // Error at "l1" -var lambd2 = function (ll1, ll2) { -}; // Error at "ll1" -var lamda3 = function myLambda3(myParam) { -}; +var lambda = function (l1) { }; // Error at "l1" +var lambd2 = function (ll1, ll2) { }; // Error at "ll1" +var lamda3 = function myLambda3(myParam) { }; var lamda4 = function () { return null; }; diff --git a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js index 6332f444487..c9c74594760 100644 --- a/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js +++ b/tests/baselines/reference/implicitAnyDeclareFunctionWithoutFormalType.js @@ -13,33 +13,18 @@ function noError2(x: number, y: string) { }; //// [implicitAnyDeclareFunctionWithoutFormalType.js] // these should be errors -function foo(x) { -} +function foo(x) { } ; -function bar(x, y) { -} +function bar(x, y) { } ; // error at "y"; no error at "x" -function func2(a, b, c) { -} +function func2(a, b, c) { } ; // error at "a,b,c" -function func3() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i - 0] = arguments[_i]; - } -} +function func3() { } ; // error at "args" -function func4(z, w) { - if (z === void 0) { z = null; } - if (w === void 0) { w = undefined; } -} +function func4(z, w) { } ; // error at "z,w" // these shouldn't be errors -function noError1(x, y) { - if (x === void 0) { x = 3; } - if (y === void 0) { y = 2; } -} +function noError1(x, y) { } ; -function noError2(x, y) { -} +function noError2(x, y) { } ; diff --git a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js index 1a49449529e..59d625fff4a 100644 --- a/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js +++ b/tests/baselines/reference/implicitAnyDeclareMemberWithoutType2.js @@ -15,7 +15,6 @@ var C = (function () { function C(c1, c2, c3) { this.x = null; // error at "x" } // error at "c1, c2" - C.prototype.funcOfC = function (f1, f2, f3) { - }; // error at "f1,f2" + C.prototype.funcOfC = function (f1, f2, f3) { }; // error at "f1,f2" return C; })(); diff --git a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js index ae09bf2e40e..e3c44e9b783 100644 --- a/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js +++ b/tests/baselines/reference/implicitAnyDeclareVariablesWithoutTypeAndInit.js @@ -14,8 +14,7 @@ var x1: any; var y1 = new x1; //// [implicitAnyDeclareVariablesWithoutTypeAndInit.js] // this should be an error var x; // error at "x" -function func(k) { -} +function func(k) { } ; //error at "k" func(x); // this shouldn't be an error diff --git a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js index e7642fd8420..bc5b9453665 100644 --- a/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js +++ b/tests/baselines/reference/implicitAnyFunctionInvocationWithAnyArguements.js @@ -41,18 +41,13 @@ var arg0 = null; // error at "arg0" var anyArray = [null, undefined]; // error at array literal var objL; // error at "y,z" var funcL; -function temp1(arg1) { -} // error at "temp1" -function testFunctionExprC(subReplace) { -} -function testFunctionExprC2(eq) { -} +function temp1(arg1) { } // error at "temp1" +function testFunctionExprC(subReplace) { } +function testFunctionExprC2(eq) { } ; -function testObjLiteral(objLit) { -} +function testObjLiteral(objLit) { } ; -function testFuncLiteral(funcLit) { -} +function testFuncLiteral(funcLit) { } ; // this should not be an error testFunctionExprC2(function (v1, v2) { return 1; }); @@ -61,8 +56,7 @@ testFuncLiteral(funcL); var k = temp1(null); var result = temp1(arg0); var result1 = temp1(anyArray); -function noError(variable, array) { -} +function noError(variable, array) { } noError(null, []); noError(undefined, []); noError(null, [null, undefined]); diff --git a/tests/baselines/reference/implicitAnyInCatch.js b/tests/baselines/reference/implicitAnyInCatch.js index 29a2e03a130..c35e92372e3 100644 --- a/tests/baselines/reference/implicitAnyInCatch.js +++ b/tests/baselines/reference/implicitAnyInCatch.js @@ -16,14 +16,11 @@ class C { //// [implicitAnyInCatch.js] // this should not be an error -try { -} +try { } catch (error) { - if (error.number === -2147024809) { - } -} -for (var key in this) { + if (error.number === -2147024809) { } } +for (var key in this) { } var C = (function () { function C() { } diff --git a/tests/baselines/reference/implicitAnyWidenToAny.js b/tests/baselines/reference/implicitAnyWidenToAny.js index 9f380df1cf0..838593a88ef 100644 --- a/tests/baselines/reference/implicitAnyWidenToAny.js +++ b/tests/baselines/reference/implicitAnyWidenToAny.js @@ -51,7 +51,6 @@ var array3 = [null, undefined]; var array4 = [null, undefined]; var array5 = [null, undefined]; var objLit; -function anyReturnFunc() { -} +function anyReturnFunc() { } var obj0 = new objLit(1); var obj1 = anyReturnFunc(); diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js index 35992b86fec..3329fb810a7 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js @@ -17,8 +17,7 @@ module m_private { //// [importAliasAnExternalModuleInsideAnInternalModule_file0.js] var m; (function (m) { - function foo() { - } + function foo() { } m.foo = foo; })(m = exports.m || (exports.m = {})); //// [importAliasAnExternalModuleInsideAnInternalModule_file1.js] diff --git a/tests/baselines/reference/inOperator.js b/tests/baselines/reference/inOperator.js index 1407ef9d59c..10059bcf2b7 100644 --- a/tests/baselines/reference/inOperator.js +++ b/tests/baselines/reference/inOperator.js @@ -14,12 +14,9 @@ if (y in c) { } //// [inOperator.js] var a = []; -for (var x in a) { -} -if (3 in a) { -} +for (var x in a) { } +if (3 in a) { } var b = '' in 0; var c; var y; -if (y in c) { -} +if (y in c) { } diff --git a/tests/baselines/reference/incompatibleTypes.js b/tests/baselines/reference/incompatibleTypes.js index 38664e514c7..2f804f2efa1 100644 --- a/tests/baselines/reference/incompatibleTypes.js +++ b/tests/baselines/reference/incompatibleTypes.js @@ -102,8 +102,7 @@ var C4 = (function () { } return C4; })(); -function if1(a) { -} +function if1(a) { } var c1; var c2; if1(c1); diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js index 9fb1c4e616e..6f76fba6d8c 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -74,8 +74,7 @@ ANY2++; var ANY1; var ANY2 = [1, 2]; var obj; -var obj1 = { x: "", y: function () { -} }; +var obj1 = { x: "", y: function () { } }; function foo() { var a; return a; diff --git a/tests/baselines/reference/inferSecondaryParameter.js b/tests/baselines/reference/inferSecondaryParameter.js index 9b32b33b52c..24689aa9495 100644 --- a/tests/baselines/reference/inferSecondaryParameter.js +++ b/tests/baselines/reference/inferSecondaryParameter.js @@ -11,8 +11,7 @@ b.m("test", function (bug) { //// [inferSecondaryParameter.js] // type inference on 'bug' should give 'any' -var b = { m: function (test, fn) { -} }; +var b = { m: function (test, fn) { } }; b.m("test", function (bug) { var a = bug; }); diff --git a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js index 1cc86829a6b..de0c107e561 100644 --- a/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js +++ b/tests/baselines/reference/inferTypeArgumentsInSignatureWithRestParameters.js @@ -12,26 +12,10 @@ i(a); // OK //// [inferTypeArgumentsInSignatureWithRestParameters.js] -function f(array) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } -} -function g(array) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } -} -function h(nonarray) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } -} -function i(array, opt) { -} +function f(array) { } +function g(array) { } +function h(nonarray) { } +function i(array, opt) { } var a = [1, 2, 3, 4, 5]; f(a); // OK g(a); // OK diff --git a/tests/baselines/reference/inferenceFromParameterlessLambda.js b/tests/baselines/reference/inferenceFromParameterlessLambda.js index ad9a18b7549..40c18c9afe8 100644 --- a/tests/baselines/reference/inferenceFromParameterlessLambda.js +++ b/tests/baselines/reference/inferenceFromParameterlessLambda.js @@ -11,7 +11,6 @@ foo(n => n.length, () => 'hi'); //// [inferenceFromParameterlessLambda.js] -function foo(o, i) { -} +function foo(o, i) { } // Infer string from second argument because it isn't context sensitive foo(function (n) { return n.length; }, function () { return 'hi'; }); diff --git a/tests/baselines/reference/inheritance1.js b/tests/baselines/reference/inheritance1.js index e6dbd35e0df..f00a46922bf 100644 --- a/tests/baselines/reference/inheritance1.js +++ b/tests/baselines/reference/inheritance1.js @@ -78,8 +78,7 @@ var Button = (function (_super) { function Button() { _super.apply(this, arguments); } - Button.prototype.select = function () { - }; + Button.prototype.select = function () { }; return Button; })(Control); var TextBox = (function (_super) { @@ -87,8 +86,7 @@ var TextBox = (function (_super) { function TextBox() { _super.apply(this, arguments); } - TextBox.prototype.select = function () { - }; + TextBox.prototype.select = function () { }; return TextBox; })(Control); var ImageBase = (function (_super) { @@ -108,15 +106,13 @@ var Image1 = (function (_super) { var Locations = (function () { function Locations() { } - Locations.prototype.select = function () { - }; + Locations.prototype.select = function () { }; return Locations; })(); var Locations1 = (function () { function Locations1() { } - Locations1.prototype.select = function () { - }; + Locations1.prototype.select = function () { }; return Locations1; })(); var sc; diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js index 45293ec3021..4544df2dcf2 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollision.js @@ -20,8 +20,7 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { - }; + A.prototype.myMethod = function () { }; return A; })(); var B = (function (_super) { @@ -36,7 +35,6 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { - }; + C.prototype.myMethod = function () { }; return C; })(B); diff --git a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js index 339511df6ba..df6e5943173 100644 --- a/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js @@ -20,8 +20,7 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { - }; + A.prototype.myMethod = function () { }; return A; })(); var B = (function (_super) { @@ -36,7 +35,6 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { - }; + C.prototype.myMethod = function () { }; return C; })(B); diff --git a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js index f69a4962db6..682a8ab4402 100644 --- a/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +++ b/tests/baselines/reference/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js @@ -20,8 +20,7 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.myMethod = function () { - }; + A.prototype.myMethod = function () { }; return A; })(); var B = (function (_super) { @@ -36,7 +35,6 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.myMethod = function () { - }; + C.prototype.myMethod = function () { }; return C; })(B); diff --git a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js index 570a07ee7f6..3ea0e6e1594 100644 --- a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js +++ b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.js @@ -9,8 +9,7 @@ fn(function (a, b) { return true; }) //// [inheritedFunctionAssignmentCompatibility.js] -function fn(cb) { -} +function fn(cb) { } fn(function (a, b) { return true; }); fn(function (a, b) { return true; diff --git a/tests/baselines/reference/innerBoundLambdaEmit.js b/tests/baselines/reference/innerBoundLambdaEmit.js index 2921cad55d0..c09cc8e5a66 100644 --- a/tests/baselines/reference/innerBoundLambdaEmit.js +++ b/tests/baselines/reference/innerBoundLambdaEmit.js @@ -18,6 +18,5 @@ var M; return Foo; })(); M.Foo = Foo; - var bar = function () { - }; + var bar = function () { }; })(M || (M = {})); diff --git a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js index 79535360b7a..51c38282a72 100644 --- a/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js +++ b/tests/baselines/reference/instanceMemberAssignsToClassPrototype.js @@ -17,12 +17,10 @@ var C = (function () { function C() { } C.prototype.foo = function () { - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; }; C.prototype.bar = function (x) { - C.prototype.bar = function () { - }; // error + C.prototype.bar = function () { }; // error C.prototype.bar = function (x) { return x; }; // ok C.prototype.bar = function (x) { return 1; }; // ok return 1; diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js index eca12f7b1ae..32507e8209e 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.js @@ -60,8 +60,7 @@ var NonGeneric; get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -95,8 +94,7 @@ var Generic; get: function () { return null; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/instancePropertyInClassType.js b/tests/baselines/reference/instancePropertyInClassType.js index b2df44db6f0..ac89621b7b9 100644 --- a/tests/baselines/reference/instancePropertyInClassType.js +++ b/tests/baselines/reference/instancePropertyInClassType.js @@ -50,8 +50,7 @@ var NonGeneric; get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -78,8 +77,7 @@ var Generic; get: function () { return null; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js index 8309b7e7c01..9f83181a146 100644 --- a/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js +++ b/tests/baselines/reference/instanceofOperatorWithInvalidOperands.js @@ -50,8 +50,7 @@ var rc1 = '' instanceof {}; var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); var x; diff --git a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js index 15e4239eb0a..3d7d2a7d017 100644 --- a/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js +++ b/tests/baselines/reference/instantiateNonGenericTypeWithTypeArguments.js @@ -27,8 +27,7 @@ var C = (function () { return C; })(); var c = new C(); -function Foo() { -} +function Foo() { } var r = new Foo(); var f; var r2 = new f(); diff --git a/tests/baselines/reference/intTypeCheck.js b/tests/baselines/reference/intTypeCheck.js index 41f648610b5..ab62168007e 100644 --- a/tests/baselines/reference/intTypeCheck.js +++ b/tests/baselines/reference/intTypeCheck.js @@ -209,8 +209,7 @@ var obj87: i8 = new {}; var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); var anyVar; @@ -234,8 +233,7 @@ var obj2 = new Object(); var obj3 = new obj0; var obj4 = new Base; var obj5 = null; -var obj6 = function () { -}; +var obj6 = function () { }; //var obj7: i1 = function foo() { }; var obj8 = anyVar; var obj9 = new < i1 > anyVar; @@ -265,8 +263,7 @@ var obj24 = new Object(); var obj25 = new obj22; var obj26 = new Base; var obj27 = null; -var obj28 = function () { -}; +var obj28 = function () { }; //var obj29: i3 = function foo() { }; var obj30 = anyVar; var obj31 = new < i3 > anyVar; @@ -280,8 +277,7 @@ var obj35 = new Object(); var obj36 = new obj33; var obj37 = new Base; var obj38 = null; -var obj39 = function () { -}; +var obj39 = function () { }; //var obj40: i4 = function foo() { }; var obj41 = anyVar; var obj42 = new < i4 > anyVar; @@ -295,8 +291,7 @@ var obj46 = new Object(); var obj47 = new obj44; var obj48 = new Base; var obj49 = null; -var obj50 = function () { -}; +var obj50 = function () { }; //var obj51: i5 = function foo() { }; var obj52 = anyVar; var obj53 = new < i5 > anyVar; @@ -310,8 +305,7 @@ var obj57 = new Object(); var obj58 = new obj55; var obj59 = new Base; var obj60 = null; -var obj61 = function () { -}; +var obj61 = function () { }; //var obj62: i6 = function foo() { }; var obj63 = anyVar; var obj64 = new < i6 > anyVar; @@ -325,8 +319,7 @@ var obj68 = new Object(); var obj69 = new obj66; var obj70 = new Base; var obj71 = null; -var obj72 = function () { -}; +var obj72 = function () { }; //var obj73: i7 = function foo() { }; var obj74 = anyVar; var obj75 = new < i7 > anyVar; @@ -340,8 +333,7 @@ var obj79 = new Object(); var obj80 = new obj77; var obj81 = new Base; var obj82 = null; -var obj83 = function () { -}; +var obj83 = function () { }; //var obj84: i8 = function foo() { }; var obj85 = anyVar; var obj86 = new < i8 > anyVar; diff --git a/tests/baselines/reference/interfaceDeclaration2.js b/tests/baselines/reference/interfaceDeclaration2.js index 0bd59c065e0..30f9df0fac7 100644 --- a/tests/baselines/reference/interfaceDeclaration2.js +++ b/tests/baselines/reference/interfaceDeclaration2.js @@ -19,6 +19,5 @@ var I2 = (function () { } return I2; })(); -function I3() { -} +function I3() { } var I4; diff --git a/tests/baselines/reference/interfaceDeclaration4.js b/tests/baselines/reference/interfaceDeclaration4.js index 576479c2beb..728ef7156e9 100644 --- a/tests/baselines/reference/interfaceDeclaration4.js +++ b/tests/baselines/reference/interfaceDeclaration4.js @@ -69,5 +69,4 @@ var C3 = (function () { return C3; })(); I1; -{ -} +{ } diff --git a/tests/baselines/reference/interfaceExtendingClass.js b/tests/baselines/reference/interfaceExtendingClass.js index 39db7460915..f1232d78245 100644 --- a/tests/baselines/reference/interfaceExtendingClass.js +++ b/tests/baselines/reference/interfaceExtendingClass.js @@ -23,8 +23,7 @@ i = f; var Foo = (function () { function Foo() { } - Foo.prototype.y = function () { - }; + Foo.prototype.y = function () { }; Object.defineProperty(Foo.prototype, "Z", { get: function () { return 1; diff --git a/tests/baselines/reference/interfaceExtendingClass2.js b/tests/baselines/reference/interfaceExtendingClass2.js index b0958717aa8..6e6605e2459 100644 --- a/tests/baselines/reference/interfaceExtendingClass2.js +++ b/tests/baselines/reference/interfaceExtendingClass2.js @@ -19,8 +19,7 @@ interface I2 extends Foo { // error var Foo = (function () { function Foo() { } - Foo.prototype.y = function () { - }; + Foo.prototype.y = function () { }; Object.defineProperty(Foo.prototype, "Z", { get: function () { return 1; diff --git a/tests/baselines/reference/interfaceExtendsClass1.js b/tests/baselines/reference/interfaceExtendsClass1.js index 5903726c05d..d376f2dca98 100644 --- a/tests/baselines/reference/interfaceExtendsClass1.js +++ b/tests/baselines/reference/interfaceExtendsClass1.js @@ -35,8 +35,7 @@ var Button = (function (_super) { function Button() { _super.apply(this, arguments); } - Button.prototype.select = function () { - }; + Button.prototype.select = function () { }; return Button; })(Control); var TextBox = (function (_super) { @@ -44,8 +43,7 @@ var TextBox = (function (_super) { function TextBox() { _super.apply(this, arguments); } - TextBox.prototype.select = function () { - }; + TextBox.prototype.select = function () { }; return TextBox; })(Control); var Image = (function (_super) { @@ -58,7 +56,6 @@ var Image = (function (_super) { var Location = (function () { function Location() { } - Location.prototype.select = function () { - }; + Location.prototype.select = function () { }; return Location; })(); diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js index 4cf0281ac7a..a230318dcc9 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate1.js @@ -54,8 +54,7 @@ var D = (function (_super) { D.prototype.other = function (x) { return x; }; - D.prototype.bar = function () { - }; + D.prototype.bar = function () { }; return D; })(C); var c; diff --git a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js index 5805302d7d7..b55c6207661 100644 --- a/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js +++ b/tests/baselines/reference/interfaceExtendsClassWithPrivate2.js @@ -52,8 +52,7 @@ var D = (function (_super) { D.prototype.other = function (x) { return x; }; - D.prototype.bar = function () { - }; + D.prototype.bar = function () { }; return D; })(C); var D2 = (function (_super) { @@ -68,7 +67,6 @@ var D2 = (function (_super) { D2.prototype.other = function (x) { return x; }; - D2.prototype.bar = function () { - }; + D2.prototype.bar = function () { }; return D2; })(C); diff --git a/tests/baselines/reference/interfaceImplementation1.js b/tests/baselines/reference/interfaceImplementation1.js index ce82a24f63d..8f02596682d 100644 --- a/tests/baselines/reference/interfaceImplementation1.js +++ b/tests/baselines/reference/interfaceImplementation1.js @@ -50,8 +50,7 @@ c["foo"]; var C1 = (function () { function C1() { } - C1.prototype.iFn = function (n, s) { - }; + C1.prototype.iFn = function (n, s) { }; return C1; })(); var C2 = (function () { diff --git a/tests/baselines/reference/interfaceImplementation3.js b/tests/baselines/reference/interfaceImplementation3.js index 626c92e83d1..da85de545cd 100644 --- a/tests/baselines/reference/interfaceImplementation3.js +++ b/tests/baselines/reference/interfaceImplementation3.js @@ -19,7 +19,6 @@ class C4 implements I1 { var C4 = (function () { function C4() { } - C4.prototype.iFn = function () { - }; + C4.prototype.iFn = function () { }; return C4; })(); diff --git a/tests/baselines/reference/interfaceImplementation4.js b/tests/baselines/reference/interfaceImplementation4.js index 94565d1b22f..4a093381b5d 100644 --- a/tests/baselines/reference/interfaceImplementation4.js +++ b/tests/baselines/reference/interfaceImplementation4.js @@ -17,7 +17,6 @@ class C5 implements I1 { var C5 = (function () { function C5() { } - C5.prototype.iFn = function () { - }; + C5.prototype.iFn = function () { }; return C5; })(); diff --git a/tests/baselines/reference/interfaceImplementation5.js b/tests/baselines/reference/interfaceImplementation5.js index 667c5f045ec..1edfdeb8294 100644 --- a/tests/baselines/reference/interfaceImplementation5.js +++ b/tests/baselines/reference/interfaceImplementation5.js @@ -48,8 +48,7 @@ var C2 = (function () { function C2() { } Object.defineProperty(C2.prototype, "getset1", { - set: function (baz) { - }, + set: function (baz) { }, enumerable: true, configurable: true }); @@ -62,8 +61,7 @@ var C3 = (function () { get: function () { return 1; }, - set: function (baz) { - }, + set: function (baz) { }, enumerable: true, configurable: true }); @@ -86,8 +84,7 @@ var C5 = (function () { function C5() { } Object.defineProperty(C5.prototype, "getset1", { - set: function (baz) { - }, + set: function (baz) { }, enumerable: true, configurable: true }); @@ -101,8 +98,7 @@ var C6 = (function () { var x; return x; }, - set: function (baz) { - }, + set: function (baz) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/interfaceNaming1.js b/tests/baselines/reference/interfaceNaming1.js index e16f186379b..2abd2106b2f 100644 --- a/tests/baselines/reference/interfaceNaming1.js +++ b/tests/baselines/reference/interfaceNaming1.js @@ -6,6 +6,5 @@ interface & { } //// [interfaceNaming1.js] interface; -{ -} +{ } interface & {}; diff --git a/tests/baselines/reference/interfaceWithPropertyOfEveryType.js b/tests/baselines/reference/interfaceWithPropertyOfEveryType.js index 10d7c641380..a7605dd52bc 100644 --- a/tests/baselines/reference/interfaceWithPropertyOfEveryType.js +++ b/tests/baselines/reference/interfaceWithPropertyOfEveryType.js @@ -48,8 +48,7 @@ var C = (function () { } return C; })(); -function f1() { -} +function f1() { } var M; (function (M) { M.y = 1; diff --git a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js index 01907f410e3..d53ec04c183 100644 --- a/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js +++ b/tests/baselines/reference/interfaceWithPropertyThatIsPrivateInBaseType2.js @@ -19,14 +19,12 @@ interface Foo2 extends Base2 { // error var Base = (function () { function Base() { } - Base.prototype.x = function () { - }; + Base.prototype.x = function () { }; return Base; })(); var Base2 = (function () { function Base2() { } - Base2.prototype.x = function () { - }; + Base2.prototype.x = function () { }; return Base2; })(); diff --git a/tests/baselines/reference/invalidDoWhileBreakStatements.js b/tests/baselines/reference/invalidDoWhileBreakStatements.js index e6617ef98cd..807d58a8fea 100644 --- a/tests/baselines/reference/invalidDoWhileBreakStatements.js +++ b/tests/baselines/reference/invalidDoWhileBreakStatements.js @@ -60,8 +60,7 @@ THREE: do { // break forward do { break FIVE; - FIVE: do { - } while (true); + FIVE: do { } while (true); } while (true); // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidDoWhileContinueStatements.js b/tests/baselines/reference/invalidDoWhileContinueStatements.js index d32ccfe0074..21a10a3451b 100644 --- a/tests/baselines/reference/invalidDoWhileContinueStatements.js +++ b/tests/baselines/reference/invalidDoWhileContinueStatements.js @@ -60,8 +60,7 @@ THREE: do { // continue forward do { continue FIVE; - FIVE: do { - } while (true); + FIVE: do { } while (true); } while (true); // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForBreakStatements.js b/tests/baselines/reference/invalidForBreakStatements.js index abcd078ff2d..5e3430ecb41 100644 --- a/tests/baselines/reference/invalidForBreakStatements.js +++ b/tests/baselines/reference/invalidForBreakStatements.js @@ -58,8 +58,7 @@ THREE: for (;;) { // break forward for (;;) { break FIVE; - FIVE: for (;;) { - } + FIVE: for (;;) { } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForContinueStatements.js b/tests/baselines/reference/invalidForContinueStatements.js index af0eba2a59a..2db1ce69ede 100644 --- a/tests/baselines/reference/invalidForContinueStatements.js +++ b/tests/baselines/reference/invalidForContinueStatements.js @@ -58,8 +58,7 @@ THREE: for (;;) { // continue forward for (;;) { continue FIVE; - FIVE: for (;;) { - } + FIVE: for (;;) { } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForInBreakStatements.js b/tests/baselines/reference/invalidForInBreakStatements.js index bf383613c3b..1784b9a57a6 100644 --- a/tests/baselines/reference/invalidForInBreakStatements.js +++ b/tests/baselines/reference/invalidForInBreakStatements.js @@ -59,8 +59,7 @@ THREE: for (var x in {}) { // break forward for (var x in {}) { break FIVE; - FIVE: for (var x in {}) { - } + FIVE: for (var x in {}) { } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidForInContinueStatements.js b/tests/baselines/reference/invalidForInContinueStatements.js index d40dbd80ca0..94020d00f2b 100644 --- a/tests/baselines/reference/invalidForInContinueStatements.js +++ b/tests/baselines/reference/invalidForInContinueStatements.js @@ -59,8 +59,7 @@ THREE: for (var x in {}) { // continue forward for (var x in {}) { continue FIVE; - FIVE: for (var x in {}) { - } + FIVE: for (var x in {}) { } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidModuleWithVarStatements.js b/tests/baselines/reference/invalidModuleWithVarStatements.js index 4014709d361..caa6b24f00f 100644 --- a/tests/baselines/reference/invalidModuleWithVarStatements.js +++ b/tests/baselines/reference/invalidModuleWithVarStatements.js @@ -35,8 +35,7 @@ var Y; })(Y || (Y = {})); var Y2; (function (Y2) { - function fn(x) { - } + function fn(x) { } })(Y2 || (Y2 = {})); var Y4; (function (Y4) { @@ -44,8 +43,7 @@ var Y4; })(Y4 || (Y4 = {})); var YY; (function (YY) { - function fn(x) { - } + function fn(x) { } })(YY || (YY = {})); var YY2; (function (YY2) { @@ -53,6 +51,5 @@ var YY2; })(YY2 || (YY2 = {})); var YY3; (function (YY3) { - function fn(x) { - } + function fn(x) { } })(YY3 || (YY3 = {})); diff --git a/tests/baselines/reference/invalidReturnStatements.js b/tests/baselines/reference/invalidReturnStatements.js index d452a1280f5..9dc30431326 100644 --- a/tests/baselines/reference/invalidReturnStatements.js +++ b/tests/baselines/reference/invalidReturnStatements.js @@ -28,21 +28,15 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // all the following should be error -function fn1() { -} -function fn2() { -} -function fn3() { -} -function fn4() { -} -function fn7() { -} // should be valid: any includes void +function fn1() { } +function fn2() { } +function fn3() { } +function fn4() { } +function fn7() { } // should be valid: any includes void var C = (function () { function C() { } - C.prototype.dispose = function () { - }; + C.prototype.dispose = function () { }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/invalidTryStatements.js b/tests/baselines/reference/invalidTryStatements.js index 8afadf41b4d..343ad6e0584 100644 --- a/tests/baselines/reference/invalidTryStatements.js +++ b/tests/baselines/reference/invalidTryStatements.js @@ -21,16 +21,10 @@ function fn() { var x; // ensure x is 'Any' } // no type annotation allowed - try { - } - catch (z) { - } - try { - } - catch (a) { - } - try { - } - catch (y) { - } + try { } + catch (z) { } + try { } + catch (a) { } + try { } + catch (y) { } } diff --git a/tests/baselines/reference/invalidTryStatements2.js b/tests/baselines/reference/invalidTryStatements2.js index d2ef92ac831..1b2976dc4e7 100644 --- a/tests/baselines/reference/invalidTryStatements2.js +++ b/tests/baselines/reference/invalidTryStatements2.js @@ -36,20 +36,16 @@ function fn() { } try { } - catch (x) { - } // error missing try - finally { - } // potential error; can be absorbed by the 'catch' + catch (x) { } // error missing try + finally { } // potential error; can be absorbed by the 'catch' } function fn2() { try { } - finally { - } // error missing try + finally { } // error missing try try { } // error missing try - catch (x) { - } // error missing try + catch (x) { } // error missing try // no error try { } diff --git a/tests/baselines/reference/invalidTypeOfTarget.js b/tests/baselines/reference/invalidTypeOfTarget.js index 88128d15e85..52b39f3c76a 100644 --- a/tests/baselines/reference/invalidTypeOfTarget.js +++ b/tests/baselines/reference/invalidTypeOfTarget.js @@ -15,6 +15,5 @@ var x3 = 1; var x4 = ''; var x5; var x6 = null; -var x7 = function f() { -}; +var x7 = function f() { }; var x8 = /123/; diff --git a/tests/baselines/reference/invalidUndefinedAssignments.js b/tests/baselines/reference/invalidUndefinedAssignments.js index 0b37316e085..1feba71212d 100644 --- a/tests/baselines/reference/invalidUndefinedAssignments.js +++ b/tests/baselines/reference/invalidUndefinedAssignments.js @@ -44,7 +44,6 @@ var M; M.x = 1; })(M || (M = {})); M = x; -function i(a) { -} +function i(a) { } // BUG 767030 i = x; diff --git a/tests/baselines/reference/invalidUndefinedValues.js b/tests/baselines/reference/invalidUndefinedValues.js index 16ff454d8da..819bf114cec 100644 --- a/tests/baselines/reference/invalidUndefinedValues.js +++ b/tests/baselines/reference/invalidUndefinedValues.js @@ -54,8 +54,7 @@ var M; M.x = 1; })(M || (M = {})); x = M; -x = { f: function () { -} }; +x = { f: function () { } }; function f(a) { x = a; } diff --git a/tests/baselines/reference/invalidVoidAssignments.js b/tests/baselines/reference/invalidVoidAssignments.js index 980789cb949..40b83d329c1 100644 --- a/tests/baselines/reference/invalidVoidAssignments.js +++ b/tests/baselines/reference/invalidVoidAssignments.js @@ -59,5 +59,4 @@ var E; })(E || (E = {})); x = E; x = 0 /* A */; -x = { f: function () { -} }; +x = { f: function () { } }; diff --git a/tests/baselines/reference/invalidVoidValues.js b/tests/baselines/reference/invalidVoidValues.js index 9a626b687bb..658ebc7e1ca 100644 --- a/tests/baselines/reference/invalidVoidValues.js +++ b/tests/baselines/reference/invalidVoidValues.js @@ -46,8 +46,7 @@ var a; x = a; var b; x = b; -x = { f: function () { -} }; +x = { f: function () { } }; var M; (function (M) { M.x = 1; diff --git a/tests/baselines/reference/invalidWhileBreakStatements.js b/tests/baselines/reference/invalidWhileBreakStatements.js index a8e261f036c..7f10a08d65c 100644 --- a/tests/baselines/reference/invalidWhileBreakStatements.js +++ b/tests/baselines/reference/invalidWhileBreakStatements.js @@ -59,8 +59,7 @@ THREE: while (true) { // break forward while (true) { break FIVE; - FIVE: while (true) { - } + FIVE: while (true) { } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/invalidWhileContinueStatements.js b/tests/baselines/reference/invalidWhileContinueStatements.js index 544314bf68d..b8234bf9604 100644 --- a/tests/baselines/reference/invalidWhileContinueStatements.js +++ b/tests/baselines/reference/invalidWhileContinueStatements.js @@ -59,8 +59,7 @@ THREE: while (true) { // continue forward while (true) { continue FIVE; - FIVE: while (true) { - } + FIVE: while (true) { } } // label on non-loop statement NINE: var y = 12; diff --git a/tests/baselines/reference/ipromise4.js b/tests/baselines/reference/ipromise4.js index 5b65e0818c2..bb8a3f12e0b 100644 --- a/tests/baselines/reference/ipromise4.js +++ b/tests/baselines/reference/ipromise4.js @@ -18,8 +18,7 @@ p.then(function (x) { return "hello"; } ).then(function (x) { return x } ); // s //// [ipromise4.js] var p = null; -p.then(function (x) { -}); // should not error +p.then(function (x) { }); // should not error p.then(function (x) { return "hello"; }).then(function (x) { diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.js b/tests/baselines/reference/lastPropertyInLiteralWins.js index 19ec4e21000..999fe45841b 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.js +++ b/tests/baselines/reference/lastPropertyInLiteralWins.js @@ -21,14 +21,10 @@ function test(thing) { thing.thunk("str"); } test({ - thunk: function (str) { - }, - thunk: function (num) { - } + thunk: function (str) { }, + thunk: function (num) { } }); test({ - thunk: function (num) { - }, - thunk: function (str) { - } + thunk: function (num) { }, + thunk: function (str) { } }); diff --git a/tests/baselines/reference/letDeclarations-access.js b/tests/baselines/reference/letDeclarations-access.js index 404c2876310..6ae289d220f 100644 --- a/tests/baselines/reference/letDeclarations-access.js +++ b/tests/baselines/reference/letDeclarations-access.js @@ -58,11 +58,9 @@ x--; ++x; --x; var a = x + 1; -function f(v) { -} +function f(v) { } f(x); -if (x) { -} +if (x) { } x; (x); -x; diff --git a/tests/baselines/reference/letDeclarations-es5.js b/tests/baselines/reference/letDeclarations-es5.js index d5d1d96d350..4d2f5423ee0 100644 --- a/tests/baselines/reference/letDeclarations-es5.js +++ b/tests/baselines/reference/letDeclarations-es5.js @@ -20,7 +20,5 @@ let l3, l4, l5, l6; let l7 = false; let l8 = 23; let l9 = 0, l10 = "", l11 = null; -for (let l11 in {}) { -} -for (let l12 = 0; l12 < 9; l12++) { -} +for (let l11 in {}) { } +for (let l12 = 0; l12 < 9; l12++) { } diff --git a/tests/baselines/reference/letDeclarations.js b/tests/baselines/reference/letDeclarations.js index bc186b732f5..8acb82204e3 100644 --- a/tests/baselines/reference/letDeclarations.js +++ b/tests/baselines/reference/letDeclarations.js @@ -20,10 +20,8 @@ let l3, l4, l5, l6; let l7 = false; let l8 = 23; let l9 = 0, l10 = "", l11 = null; -for (let l11 in {}) { -} -for (let l12 = 0; l12 < 9; l12++) { -} +for (let l11 in {}) { } +for (let l12 = 0; l12 < 9; l12++) { } //// [letDeclarations.d.ts] diff --git a/tests/baselines/reference/literals-negative.js b/tests/baselines/reference/literals-negative.js index c0c9624e6f2..39fd4ea38a5 100644 --- a/tests/baselines/reference/literals-negative.js +++ b/tests/baselines/reference/literals-negative.js @@ -17,8 +17,6 @@ if(null === isVoid()) { } var n = (null); var s = (null); var b = (n); -function isVoid() { -} +function isVoid() { } // Expected error: Values of type null and void cannot be compared -if (null === isVoid()) { -} +if (null === isVoid()) { } diff --git a/tests/baselines/reference/localImportNameVsGlobalName.js b/tests/baselines/reference/localImportNameVsGlobalName.js index f27e7d648d1..6a4f1ceabc1 100644 --- a/tests/baselines/reference/localImportNameVsGlobalName.js +++ b/tests/baselines/reference/localImportNameVsGlobalName.js @@ -27,8 +27,7 @@ var Keyboard; var App; (function (App) { var Key = Keyboard.Key; - function foo(key) { - } + function foo(key) { } App.foo = foo; foo(0 /* UP */); foo(1 /* DOWN */); diff --git a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js index 04317151f86..28366739233 100644 --- a/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/logicalNotOperatorWithAnyOtherType.js @@ -65,8 +65,7 @@ var ANY; var ANY1; var ANY2 = ["", ""]; var obj; -var obj1 = { x: "", y: function () { -} }; +var obj1 = { x: "", y: function () { } }; function foo() { var a; return a; diff --git a/tests/baselines/reference/matchingOfObjectLiteralConstraints.js b/tests/baselines/reference/matchingOfObjectLiteralConstraints.js index cf70a4be51b..1d19359894d 100644 --- a/tests/baselines/reference/matchingOfObjectLiteralConstraints.js +++ b/tests/baselines/reference/matchingOfObjectLiteralConstraints.js @@ -5,6 +5,5 @@ foo2({ y: "foo" }, "foo"); //// [matchingOfObjectLiteralConstraints.js] -function foo2(x, z) { -} +function foo2(x, z) { } foo2({ y: "foo" }, "foo"); diff --git a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js index dc347e95580..584bafad6f6 100644 --- a/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPrivateOverloads.js @@ -53,27 +53,19 @@ var r4 = D.bar(''); // error var C = (function () { function C() { } - C.prototype.foo = function (x, y) { - }; - C.prototype.bar = function (x, y) { - }; - C.foo = function (x, y) { - }; - C.bar = function (x, y) { - }; + C.prototype.foo = function (x, y) { }; + C.prototype.bar = function (x, y) { }; + C.foo = function (x, y) { }; + C.bar = function (x, y) { }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { - }; - D.prototype.bar = function (x, y) { - }; - D.foo = function (x, y) { - }; - D.bar = function (x, y) { - }; + D.prototype.foo = function (x, y) { }; + D.prototype.bar = function (x, y) { }; + D.foo = function (x, y) { }; + D.bar = function (x, y) { }; return D; })(); var c; diff --git a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js index 5eaf894f549..efdd6efaffa 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicOverloads.js @@ -44,26 +44,18 @@ class D { var C = (function () { function C() { } - C.prototype.foo = function (x, y) { - }; - C.prototype.bar = function (x, y) { - }; - C.foo = function (x, y) { - }; - C.bar = function (x, y) { - }; + C.prototype.foo = function (x, y) { }; + C.prototype.bar = function (x, y) { }; + C.foo = function (x, y) { }; + C.bar = function (x, y) { }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { - }; - D.prototype.bar = function (x, y) { - }; - D.foo = function (x, y) { - }; - D.bar = function (x, y) { - }; + D.prototype.foo = function (x, y) { }; + D.prototype.bar = function (x, y) { }; + D.foo = function (x, y) { }; + D.bar = function (x, y) { }; return D; })(); diff --git a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js index 2726756c803..7738bf4fe4e 100644 --- a/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js +++ b/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.js @@ -66,35 +66,23 @@ var r2 = d.foo(2); // error var C = (function () { function C() { } - C.prototype.foo = function (x, y) { - }; - C.prototype.bar = function (x, y) { - }; - C.foo = function (x, y) { - }; - C.prototype.baz = function (x, y) { - }; - C.bar = function (x, y) { - }; - C.baz = function (x, y) { - }; + C.prototype.foo = function (x, y) { }; + C.prototype.bar = function (x, y) { }; + C.foo = function (x, y) { }; + C.prototype.baz = function (x, y) { }; + C.bar = function (x, y) { }; + C.baz = function (x, y) { }; return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (x, y) { - }; - D.prototype.bar = function (x, y) { - }; - D.prototype.baz = function (x, y) { - }; - D.foo = function (x, y) { - }; - D.bar = function (x, y) { - }; - D.baz = function (x, y) { - }; + D.prototype.foo = function (x, y) { }; + D.prototype.bar = function (x, y) { }; + D.prototype.baz = function (x, y) { }; + D.foo = function (x, y) { }; + D.bar = function (x, y) { }; + D.baz = function (x, y) { }; return D; })(); var c; diff --git a/tests/baselines/reference/mergedDeclarations4.js b/tests/baselines/reference/mergedDeclarations4.js index a3dab29ff75..64fad6bd598 100644 --- a/tests/baselines/reference/mergedDeclarations4.js +++ b/tests/baselines/reference/mergedDeclarations4.js @@ -21,8 +21,7 @@ M.f.hello; //// [mergedDeclarations4.js] var M; (function (M) { - function f() { - } + function f() { } M.f = f; f(); M.f(); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js index 457bd12b8f0..bb0e846d063 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen2.js @@ -15,8 +15,7 @@ var my; (function (data) { var foo; (function (foo) { - function buz() { - } + function buz() { } foo.buz = buz; })(foo = data.foo || (data.foo = {})); })(data = my.data || (my.data = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js index 0618346dd75..a03b418fcc9 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen3.js @@ -13,8 +13,7 @@ var my; (function (my) { var data; (function (data) { - function buz() { - } + function buz() { } data.buz = buz; })(data = my.data || (my.data = {})); })(my || (my = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js index 2463c9cae90..9efba74a27b 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen4.js @@ -27,8 +27,7 @@ var superContain; (function (buz) { var data; (function (data) { - function foo() { - } + function foo() { } data.foo = foo; })(data = buz.data || (buz.data = {})); })(buz = my.buz || (my.buz = {})); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js index 2c8e0bb79e4..ce453264f78 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js @@ -25,11 +25,9 @@ var M; (function (buz) { var plop; (function (plop) { - function doom() { - } + function doom() { } plop.doom = doom; - function M() { - } + function M() { } plop.M = M; })(plop = buz.plop || (buz.plop = {})); })(buz = _M.buz || (_M.buz = {})); @@ -40,10 +38,8 @@ var M; (function (_buz) { var plop; (function (_plop) { - function gunk() { - } - function buz() { - } + function gunk() { } + function buz() { } var fudge = (function () { function fudge() { } diff --git a/tests/baselines/reference/methodContainingLocalFunction.js b/tests/baselines/reference/methodContainingLocalFunction.js index 36487e3ad7c..f2f336d38b7 100644 --- a/tests/baselines/reference/methodContainingLocalFunction.js +++ b/tests/baselines/reference/methodContainingLocalFunction.js @@ -56,8 +56,7 @@ var BugExhibition = (function () { function BugExhibition() { } BugExhibition.prototype.exhibitBug = function () { - function localFunction() { - } + function localFunction() { } var x; x = localFunction; }; @@ -68,8 +67,7 @@ var BugExhibition2 = (function () { } Object.defineProperty(BugExhibition2, "exhibitBug", { get: function () { - function localFunction() { - } + function localFunction() { } var x; x = localFunction; return null; @@ -83,8 +81,7 @@ var BugExhibition3 = (function () { function BugExhibition3() { } BugExhibition3.prototype.exhibitBug = function () { - function localGenericFunction(u) { - } + function localGenericFunction(u) { } var x; x = localGenericFunction; }; @@ -94,8 +91,7 @@ var C = (function () { function C() { } C.prototype.exhibit = function () { - var funcExpr = function (u) { - }; + var funcExpr = function (u) { }; var x; x = funcExpr; }; @@ -104,8 +100,7 @@ var C = (function () { var M; (function (M) { function exhibitBug() { - function localFunction() { - } + function localFunction() { } var x; x = localFunction; } @@ -114,8 +109,7 @@ var M; var E; (function (E) { E[E["A"] = (function () { - function localFunction() { - } + function localFunction() { } var x; x = localFunction; return 0; diff --git a/tests/baselines/reference/missingSelf.js b/tests/baselines/reference/missingSelf.js index efcec0f03ec..c2c1e04ad5c 100644 --- a/tests/baselines/reference/missingSelf.js +++ b/tests/baselines/reference/missingSelf.js @@ -25,8 +25,7 @@ var CalcButton = (function () { CalcButton.prototype.a = function () { this.onClick(); }; - CalcButton.prototype.onClick = function () { - }; + CalcButton.prototype.onClick = function () { }; return CalcButton; })(); var CalcButton2 = (function () { @@ -36,8 +35,7 @@ var CalcButton2 = (function () { var _this = this; (function () { return _this.onClick(); }); }; - CalcButton2.prototype.onClick = function () { - }; + CalcButton2.prototype.onClick = function () { }; return CalcButton2; })(); var c = new CalcButton(); diff --git a/tests/baselines/reference/missingTypeArguments2.js b/tests/baselines/reference/missingTypeArguments2.js index 713023a3b6b..bc5c1d88f46 100644 --- a/tests/baselines/reference/missingTypeArguments2.js +++ b/tests/baselines/reference/missingTypeArguments2.js @@ -13,7 +13,6 @@ var A = (function () { return A; })(); var x; -(function (a) { -}); +(function (a) { }); var y; (function () { return null; }); diff --git a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js index 3105c923304..db1bc28a144 100644 --- a/tests/baselines/reference/mixingFunctionAndAmbientModule1.js +++ b/tests/baselines/reference/mixingFunctionAndAmbientModule1.js @@ -45,13 +45,11 @@ module E { //// [mixingFunctionAndAmbientModule1.js] var A; (function (A) { - function My(s) { - } + function My(s) { } })(A || (A = {})); var B; (function (B) { - function My(s) { - } + function My(s) { } })(B || (B = {})); var C; (function (C) { diff --git a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js index 59495280771..22367461c2c 100644 --- a/tests/baselines/reference/mixingStaticAndInstanceOverloads.js +++ b/tests/baselines/reference/mixingStaticAndInstanceOverloads.js @@ -39,37 +39,31 @@ class C5 { var C1 = (function () { function C1() { } - C1.foo1 = function (a) { - }; + C1.foo1 = function (a) { }; return C1; })(); var C2 = (function () { function C2() { } - C2.prototype.foo2 = function (a) { - }; + C2.prototype.foo2 = function (a) { }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo3 = function (a) { - }; + C3.prototype.foo3 = function (a) { }; return C3; })(); var C4 = (function () { function C4() { } - C4.foo4 = function (a) { - }; + C4.foo4 = function (a) { }; return C4; })(); var C5 = (function () { function C5() { } - C5.prototype.foo5 = function (a) { - }; - C5.foo5 = function (a) { - }; + C5.prototype.foo5 = function (a) { }; + C5.foo5 = function (a) { }; return C5; })(); diff --git a/tests/baselines/reference/moduleCodeGenTest5.js b/tests/baselines/reference/moduleCodeGenTest5.js index 6f5f0a4e912..a7580e97ef7 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.js +++ b/tests/baselines/reference/moduleCodeGenTest5.js @@ -24,17 +24,14 @@ var v = E2.B; //// [moduleCodeGenTest5.js] exports.x = 0; var y = 0; -function f1() { -} +function f1() { } exports.f1 = f1; -function f2() { -} +function f2() { } var C1 = (function () { function C1() { this.p1 = 0; } - C1.prototype.p2 = function () { - }; + C1.prototype.p2 = function () { }; return C1; })(); exports.C1 = C1; @@ -42,8 +39,7 @@ var C2 = (function () { function C2() { this.p1 = 0; } - C2.prototype.p2 = function () { - }; + C2.prototype.p2 = function () { }; return C2; })(); (function (E1) { diff --git a/tests/baselines/reference/moduleInTypePosition1.js b/tests/baselines/reference/moduleInTypePosition1.js index 92fcd5b16e2..972bbae63d1 100644 --- a/tests/baselines/reference/moduleInTypePosition1.js +++ b/tests/baselines/reference/moduleInTypePosition1.js @@ -19,5 +19,4 @@ var Promise = (function () { })(); exports.Promise = Promise; //// [moduleInTypePosition1_1.js] -var x = function (w1) { -}; +var x = function (w1) { }; diff --git a/tests/baselines/reference/moduleKeywordRepeatError.js b/tests/baselines/reference/moduleKeywordRepeatError.js index 8ec656f22ae..385bce001a2 100644 --- a/tests/baselines/reference/moduleKeywordRepeatError.js +++ b/tests/baselines/reference/moduleKeywordRepeatError.js @@ -6,5 +6,4 @@ module.module { } //// [moduleKeywordRepeatError.js] // "module.module { }" should raise a syntax error module.module; -{ -} +{ } diff --git a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js index 63ccf613a77..1467ec18b91 100644 --- a/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js +++ b/tests/baselines/reference/moduleMemberWithoutTypeAnnotation1.js @@ -102,8 +102,7 @@ var TypeScript; (function (TypeScript) { var Syntax; (function (Syntax) { - function childIndex() { - } + function childIndex() { } Syntax.childIndex = childIndex; var VariableWidthTokenWithTrailingTrivia = (function () { function VariableWidthTokenWithTrailingTrivia() { diff --git a/tests/baselines/reference/moduleNewExportBug.js b/tests/baselines/reference/moduleNewExportBug.js index 51e1bb24144..ce40915b2f6 100644 --- a/tests/baselines/reference/moduleNewExportBug.js +++ b/tests/baselines/reference/moduleNewExportBug.js @@ -19,8 +19,7 @@ var mod1; var C = (function () { function C() { } - C.prototype.moo = function () { - }; + C.prototype.moo = function () { }; return C; })(); })(mod1 || (mod1 = {})); diff --git a/tests/baselines/reference/multiCallOverloads.js b/tests/baselines/reference/multiCallOverloads.js index 85b008d52b7..d4e765c5514 100644 --- a/tests/baselines/reference/multiCallOverloads.js +++ b/tests/baselines/reference/multiCallOverloads.js @@ -14,15 +14,10 @@ load(function(z?) {}) // this shouldn't be an error //// [multiCallOverloads.js] -function load(f) { -} -var f1 = function (z) { -}; -var f2 = function (z) { -}; +function load(f) { } +var f1 = function (z) { }; +var f2 = function (z) { }; load(f1); // ok load(f2); // ok -load(function () { -}); // this shouldn’t be an error -load(function (z) { -}); // this shouldn't be an error +load(function () { }); // this shouldn’t be an error +load(function (z) { }); // this shouldn't be an error diff --git a/tests/baselines/reference/multiModuleClodule1.js b/tests/baselines/reference/multiModuleClodule1.js index a64abd81680..8fa142812cd 100644 --- a/tests/baselines/reference/multiModuleClodule1.js +++ b/tests/baselines/reference/multiModuleClodule1.js @@ -22,12 +22,9 @@ c.foo = C.foo; var C = (function () { function C(x) { } - C.prototype.foo = function () { - }; - C.prototype.bar = function () { - }; - C.boo = function () { - }; + C.prototype.foo = function () { }; + C.prototype.bar = function () { }; + C.boo = function () { }; return C; })(); var C; @@ -37,8 +34,7 @@ var C; })(C || (C = {})); var C; (function (C) { - function foo() { - } + function foo() { } C.foo = foo; function baz() { return ''; diff --git a/tests/baselines/reference/multiModuleFundule1.js b/tests/baselines/reference/multiModuleFundule1.js index f643ed5ee4d..6aa9cb959ba 100644 --- a/tests/baselines/reference/multiModuleFundule1.js +++ b/tests/baselines/reference/multiModuleFundule1.js @@ -13,16 +13,14 @@ var r2 = new C(2); // using void returning function as constructor var r3 = C.foo(); //// [multiModuleFundule1.js] -function C(x) { -} +function C(x) { } var C; (function (C) { C.x = 1; })(C || (C = {})); var C; (function (C) { - function foo() { - } + function foo() { } C.foo = foo; })(C || (C = {})); var r = C(2); diff --git a/tests/baselines/reference/nameCollisions.js b/tests/baselines/reference/nameCollisions.js index 51b66adcefe..2cfaba94993 100644 --- a/tests/baselines/reference/nameCollisions.js +++ b/tests/baselines/reference/nameCollisions.js @@ -76,10 +76,8 @@ var T; })(); // error var w; var f; - function f() { - } //error - function f2() { - } + function f() { } //error + function f2() { } var f2; // error var i; var C = (function () { @@ -87,17 +85,14 @@ var T; } return C; })(); - function C() { - } // error - function C2() { - } + function C() { } // error + function C2() { } var C2 = (function () { function C2() { } return C2; })(); // error - function fi() { - } + function fi() { } var cli = (function () { function cli() { } diff --git a/tests/baselines/reference/negateOperatorWithAnyOtherType.js b/tests/baselines/reference/negateOperatorWithAnyOtherType.js index 190d80eaba3..8418bbbe467 100644 --- a/tests/baselines/reference/negateOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/negateOperatorWithAnyOtherType.js @@ -59,8 +59,7 @@ var ANY; var ANY1; var ANY2 = ["", ""]; var obj; -var obj1 = { x: "", y: function () { -} }; +var obj1 = { x: "", y: function () { } }; function foo() { var a; return a; diff --git a/tests/baselines/reference/nestedClassDeclaration.js b/tests/baselines/reference/nestedClassDeclaration.js index c7f0ffe34fc..fa69ef5950e 100644 --- a/tests/baselines/reference/nestedClassDeclaration.js +++ b/tests/baselines/reference/nestedClassDeclaration.js @@ -30,8 +30,7 @@ var C2 = (function () { } return C2; })(); -function foo() { -} +function foo() { } var C3 = (function () { function C3() { } diff --git a/tests/baselines/reference/newExpressionWithCast.js b/tests/baselines/reference/newExpressionWithCast.js index 6ce025a4267..8743d9b83bc 100644 --- a/tests/baselines/reference/newExpressionWithCast.js +++ b/tests/baselines/reference/newExpressionWithCast.js @@ -15,15 +15,12 @@ var test3 = new (Test3)(); //// [newExpressionWithCast.js] -function Test() { -} +function Test() { } // valid but error with noImplicitAny var test = new Test(); -function Test2() { -} +function Test2() { } // parse error var test2 = new < any > Test2(); -function Test3() { -} +function Test3() { } // valid with noImplicitAny var test3 = new Test3(); diff --git a/tests/baselines/reference/newFunctionImplicitAny.js b/tests/baselines/reference/newFunctionImplicitAny.js index 9f8d303680b..459c7d581d8 100644 --- a/tests/baselines/reference/newFunctionImplicitAny.js +++ b/tests/baselines/reference/newFunctionImplicitAny.js @@ -6,6 +6,5 @@ var test = new Test(); //// [newFunctionImplicitAny.js] // No implicit any error given when newing a function (up for debate) -function Test() { -} +function Test() { } var test = new Test(); diff --git a/tests/baselines/reference/newOperatorConformance.js b/tests/baselines/reference/newOperatorConformance.js index 4e5c209bbff..a04b10dc8fe 100644 --- a/tests/baselines/reference/newOperatorConformance.js +++ b/tests/baselines/reference/newOperatorConformance.js @@ -104,8 +104,7 @@ function newFn2(s) { var p; } // Construct expression of void returning function -function fnVoid() { -} +function fnVoid() { } var t = new fnVoid(); var t; // Chained new expressions diff --git a/tests/baselines/reference/noImplicitAnyForMethodParameters.js b/tests/baselines/reference/noImplicitAnyForMethodParameters.js index 379cf85b5e2..fc5b94d4768 100644 --- a/tests/baselines/reference/noImplicitAnyForMethodParameters.js +++ b/tests/baselines/reference/noImplicitAnyForMethodParameters.js @@ -18,14 +18,12 @@ class D { var C = (function () { function C() { } - C.prototype.foo = function (a) { - }; // OK - non-ambient class and private method - error + C.prototype.foo = function (a) { }; // OK - non-ambient class and private method - error return C; })(); var D = (function () { function D() { } - D.prototype.foo = function (a) { - }; // OK - non-ambient class and public method - error + D.prototype.foo = function (a) { }; // OK - non-ambient class and public method - error return D; })(); diff --git a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js index 06848d7e89a..bfa7f4b868f 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js +++ b/tests/baselines/reference/noImplicitAnyParametersInBareFunctions.js @@ -46,36 +46,20 @@ var f14 = (x, ...r) => ""; //// [noImplicitAnyParametersInBareFunctions.js] // No implicit-'any' errors. -function f1() { -} +function f1() { } // Implicit-'any' error for x. -function f2(x) { -} +function f2(x) { } // No implicit-'any' errors. -function f3(x) { -} +function f3(x) { } // Implicit-'any' errors for x, y, and z. -function f4(x, y, z) { -} +function f4(x, y, z) { } // Implicit-'any' errors for x, and z. -function f5(x, y, z) { -} +function f5(x, y, z) { } // Implicit-'any[]' error for r. -function f6() { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i - 0] = arguments[_i]; - } -} +function f6() { } // Implicit-'any'/'any[]' errors for x, r. -function f7(x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } -} -function f8(x3, y3) { -} +function f7(x) { } +function f8(x3, y3) { } // No implicit-'any' errors. var f9 = function () { return ""; }; // Implicit-'any' errors for x. diff --git a/tests/baselines/reference/noImplicitAnyParametersInClass.js b/tests/baselines/reference/noImplicitAnyParametersInClass.js index 82164884b80..089680781b5 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInClass.js +++ b/tests/baselines/reference/noImplicitAnyParametersInClass.js @@ -145,67 +145,35 @@ var C = (function () { }; } // No implicit-'any' errors. - C.prototype.pub_f1 = function () { - }; + C.prototype.pub_f1 = function () { }; // Implicit-'any' errors for x. - C.prototype.pub_f2 = function (x) { - }; + C.prototype.pub_f2 = function (x) { }; // No implicit-'any' errors. - C.prototype.pub_f3 = function (x) { - }; + C.prototype.pub_f3 = function (x) { }; // Implicit-'any' errors for x, y, and z. - C.prototype.pub_f4 = function (x, y, z) { - }; + C.prototype.pub_f4 = function (x, y, z) { }; // Implicit-'any' errors for x, and z. - C.prototype.pub_f5 = function (x, y, z) { - }; + C.prototype.pub_f5 = function (x, y, z) { }; // Implicit-'any[]' errors for r. - C.prototype.pub_f6 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i - 0] = arguments[_i]; - } - }; + C.prototype.pub_f6 = function () { }; // Implicit-'any'/'any[]' errors for x, r. - C.prototype.pub_f7 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - }; - C.prototype.pub_f8 = function (x3, y3) { - }; + C.prototype.pub_f7 = function (x) { }; + C.prototype.pub_f8 = function (x3, y3) { }; /////////////////////////////////////////// // No implicit-'any' errors. - C.prototype.priv_f1 = function () { - }; + C.prototype.priv_f1 = function () { }; // Implicit-'any' errors for x. - C.prototype.priv_f2 = function (x) { - }; + C.prototype.priv_f2 = function (x) { }; // No implicit-'any' errors. - C.prototype.priv_f3 = function (x) { - }; + C.prototype.priv_f3 = function (x) { }; // Implicit-'any' errors for x, y, and z. - C.prototype.priv_f4 = function (x, y, z) { - }; + C.prototype.priv_f4 = function (x, y, z) { }; // Implicit-'any' errors for x, and z. - C.prototype.priv_f5 = function (x, y, z) { - }; + C.prototype.priv_f5 = function (x, y, z) { }; // Implicit-'any[]' errors for r. - C.prototype.priv_f6 = function () { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i - 0] = arguments[_i]; - } - }; + C.prototype.priv_f6 = function () { }; // Implicit-'any'/'any[]' errors for x, r. - C.prototype.priv_f7 = function (x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - }; - C.prototype.priv_f8 = function (x3, y3) { - }; + C.prototype.priv_f7 = function (x) { }; + C.prototype.priv_f8 = function (x3, y3) { }; return C; })(); diff --git a/tests/baselines/reference/noImplicitAnyParametersInModule.js b/tests/baselines/reference/noImplicitAnyParametersInModule.js index fccb16cefa7..7c31ccb8013 100644 --- a/tests/baselines/reference/noImplicitAnyParametersInModule.js +++ b/tests/baselines/reference/noImplicitAnyParametersInModule.js @@ -50,36 +50,20 @@ module M { var M; (function (M) { // No implicit-'any' errors. - function m_f1() { - } + function m_f1() { } // Implicit-'any' error for x. - function m_f2(x) { - } + function m_f2(x) { } // No implicit-'any' errors. - function m_f3(x) { - } + function m_f3(x) { } // Implicit-'any' errors for x, y, and z. - function m_f4(x, y, z) { - } + function m_f4(x, y, z) { } // Implicit-'any' errors for x and z. - function m_f5(x, y, z) { - } + function m_f5(x, y, z) { } // Implicit-'any[]' error for r. - function m_f6() { - var r = []; - for (var _i = 0; _i < arguments.length; _i++) { - r[_i - 0] = arguments[_i]; - } - } + function m_f6() { } // Implicit-'any'/'any[]' errors for x and r. - function m_f7(x) { - var r = []; - for (var _i = 1; _i < arguments.length; _i++) { - r[_i - 1] = arguments[_i]; - } - } - function m_f8(x3, y3) { - } + function m_f7(x) { } + function m_f8(x3, y3) { } // No implicit-'any' errors. var m_f9 = function () { return ""; }; // Implicit-'any' error for x. diff --git a/tests/baselines/reference/noImplicitAnyWithOverloads.js b/tests/baselines/reference/noImplicitAnyWithOverloads.js index 3bce6e18ba3..c2e9f174ada 100644 --- a/tests/baselines/reference/noImplicitAnyWithOverloads.js +++ b/tests/baselines/reference/noImplicitAnyWithOverloads.js @@ -10,8 +10,7 @@ function callb(a) { } callb((a) => { a.foo; }); // error, chose first overload //// [noImplicitAnyWithOverloads.js] -function callb(a) { -} +function callb(a) { } callb(function (a) { a.foo; }); // error, chose first overload diff --git a/tests/baselines/reference/noSelfOnVars.js b/tests/baselines/reference/noSelfOnVars.js index 2e1f5080c26..913e3a23ba2 100644 --- a/tests/baselines/reference/noSelfOnVars.js +++ b/tests/baselines/reference/noSelfOnVars.js @@ -9,7 +9,6 @@ function foo() { //// [noSelfOnVars.js] function foo() { - function bar() { - } + function bar() { } var x = bar; } diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js index 717c364d52c..8afbb0c6201 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.js @@ -110,10 +110,8 @@ var r5 = true ? /1/ : null; var r5 = true ? null : /1/; var r6 = true ? { foo: 1 } : null; var r6 = true ? null : { foo: 1 }; -var r7 = true ? function () { -} : null; -var r7 = true ? null : function () { -}; +var r7 = true ? function () { } : null; +var r7 = true ? null : function () { }; var r8 = true ? function (x) { return x; } : null; @@ -147,8 +145,7 @@ var r13 = true ? E : null; var r13 = true ? null : E; var r14 = true ? 0 /* A */ : null; var r14 = true ? null : 0 /* A */; -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js index 339f674b9da..cf08bb98217 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.js @@ -106,8 +106,7 @@ var C = (function () { get: function () { return ''; }, - set: function (v) { - } // ok + set: function (v) { } // ok , enumerable: true, configurable: true @@ -115,8 +114,7 @@ var C = (function () { C.prototype.foo = function () { return ''; }; - C.foo = function () { - }; // ok + C.foo = function () { }; // ok Object.defineProperty(C, "X", { get: function () { return 1; @@ -131,8 +129,7 @@ var a; var b = { a: '', b: 1, - c: function () { - }, + c: function () { }, "d": '', "e": 1, 1.0: '', @@ -143,8 +140,7 @@ var b = { get X() { return ''; }, - set X(v) { - }, + set X(v) { }, foo: function () { return ''; } diff --git a/tests/baselines/reference/numericIndexerConstraint1.js b/tests/baselines/reference/numericIndexerConstraint1.js index 9587863a035..ed51e3af066 100644 --- a/tests/baselines/reference/numericIndexerConstraint1.js +++ b/tests/baselines/reference/numericIndexerConstraint1.js @@ -8,8 +8,7 @@ var result: Foo = x["one"]; // error var Foo = (function () { function Foo() { } - Foo.prototype.foo = function () { - }; + Foo.prototype.foo = function () { }; return Foo; })(); var x; diff --git a/tests/baselines/reference/numericIndexerConstraint2.js b/tests/baselines/reference/numericIndexerConstraint2.js index edc9df36a13..4d8ce742e73 100644 --- a/tests/baselines/reference/numericIndexerConstraint2.js +++ b/tests/baselines/reference/numericIndexerConstraint2.js @@ -8,8 +8,7 @@ x = a; var Foo = (function () { function Foo() { } - Foo.prototype.foo = function () { - }; + Foo.prototype.foo = function () { }; return Foo; })(); var x; diff --git a/tests/baselines/reference/objectLiteralErrors.js b/tests/baselines/reference/objectLiteralErrors.js index 2a72e8a2a77..06158cb87c9 100644 --- a/tests/baselines/reference/objectLiteralErrors.js +++ b/tests/baselines/reference/objectLiteralErrors.js @@ -126,13 +126,10 @@ var f17 = { a: 0, get b() { // Get and set accessor with mismatched type annotations var g1 = { get a() { return 4; -}, set a(n) { -} }; +}, set a(n) { } }; var g2 = { get a() { return 4; -}, set a(n) { -} }; +}, set a(n) { } }; var g3 = { get a() { return undefined; -}, set a(n) { -} }; +}, set a(n) { } }; diff --git a/tests/baselines/reference/objectLiteralErrorsES3.js b/tests/baselines/reference/objectLiteralErrorsES3.js index 5b98da0039d..6543827d9f3 100644 --- a/tests/baselines/reference/objectLiteralErrorsES3.js +++ b/tests/baselines/reference/objectLiteralErrorsES3.js @@ -10,9 +10,7 @@ var e3 = { get a() { return ''; }, set a(n) { } }; var e1 = { get a() { return 4; } }; -var e2 = { set a(n) { -} }; +var e2 = { set a(n) { } }; var e3 = { get a() { return ''; -}, set a(n) { -} }; +}, set a(n) { } }; diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js index 0cd1626222b..7f9bdc5c54a 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.js @@ -14,8 +14,7 @@ f2({ toString: (s: string) => s }) // error, missing property value from ArgsStr f2({ value: '', toString: (s) => s.uhhh }) // error //// [objectLiteralFunctionArgContextualTyping.js] -function f2(args) { -} +function f2(args) { } f2({ hello: 1 }); // error f2({ value: '' }); // missing toString satisfied by Object's member f2({ value: '', what: 1 }); // missing toString satisfied by Object's member diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js index d7e9681791e..96d1106e1ff 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.js @@ -14,8 +14,7 @@ f2({ toString: (s: string) => s }) f2({ value: '', toString: (s) => s.uhhh }) //// [objectLiteralFunctionArgContextualTyping2.js] -function f2(args) { -} +function f2(args) { } f2({ hello: 1 }); f2({ value: '' }); f2({ value: '', what: 1 }); diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.js b/tests/baselines/reference/objectLiteralGettersAndSetters.js index b602650ef8d..bd261697d5f 100644 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.js +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.js @@ -143,35 +143,28 @@ var getter2 = { get x() { } }; var getter2; // Set accessor only, type of the property is the param type of the set accessor -var setter1 = { set x(n) { -} }; +var setter1 = { set x(n) { } }; var setter1; // Set accessor only, type of the property is Any for an unannotated set accessor -var setter2 = { set x(n) { -} }; +var setter2 = { set x(n) { } }; var setter2; var anyVar; // Get and set accessor with matching type annotations var sameType1 = { get x() { return undefined; -}, set x(n) { -} }; +}, set x(n) { } }; var sameType2 = { get x() { return undefined; -}, set x(n) { -} }; +}, set x(n) { } }; var sameType3 = { get x() { return undefined; -}, set x(n) { -} }; +}, set x(n) { } }; var sameType4 = { get x() { return undefined; -}, set x(n) { -} }; +}, set x(n) { } }; // Type of unannotated get accessor return type is the type annotation of the set accessor param var setParamType1 = { - set n(x) { - }, + set n(x) { }, get n() { return function (t) { var p; @@ -186,8 +179,7 @@ var setParamType2 = { var p = t; }; }, - set n(x) { - } + set n(x) { } }; // Type of unannotated set accessor parameter is the return type annotation of the get accessor var getParamType1 = { diff --git a/tests/baselines/reference/objectLiteralMemberWithModifiers1.js b/tests/baselines/reference/objectLiteralMemberWithModifiers1.js index 8b8c76be518..a4389d49bdf 100644 --- a/tests/baselines/reference/objectLiteralMemberWithModifiers1.js +++ b/tests/baselines/reference/objectLiteralMemberWithModifiers1.js @@ -2,5 +2,4 @@ var v = { public foo() { } } //// [objectLiteralMemberWithModifiers1.js] -var v = { foo: function () { -} }; +var v = { foo: function () { } }; diff --git a/tests/baselines/reference/objectLiteralMemberWithModifiers2.js b/tests/baselines/reference/objectLiteralMemberWithModifiers2.js index fd8e0a68430..ffe2b6678df 100644 --- a/tests/baselines/reference/objectLiteralMemberWithModifiers2.js +++ b/tests/baselines/reference/objectLiteralMemberWithModifiers2.js @@ -2,5 +2,4 @@ var v = { public get foo() { } } //// [objectLiteralMemberWithModifiers2.js] -var v = { get foo() { -} }; +var v = { get foo() { } }; diff --git a/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js b/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js index 7d646cfab8e..62f7a6eefe2 100644 --- a/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js +++ b/tests/baselines/reference/objectLiteralMemberWithQuestionMark1.js @@ -2,5 +2,4 @@ var v = { foo?() { } } //// [objectLiteralMemberWithQuestionMark1.js] -var v = { foo: function () { -} }; +var v = { foo: function () { } }; diff --git a/tests/baselines/reference/objectLiteralShorthandProperties.js b/tests/baselines/reference/objectLiteralShorthandProperties.js index 776b2bbe454..bc18ecfb948 100644 --- a/tests/baselines/reference/objectLiteralShorthandProperties.js +++ b/tests/baselines/reference/objectLiteralShorthandProperties.js @@ -32,8 +32,7 @@ var x3 = { a: 0, b: b, c: c, - d: function () { - }, + d: function () { }, x3: x3, parent: x3 }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js index 2ef29a37084..c000a30181d 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignment.js @@ -18,8 +18,7 @@ var person3: { name: string; id:number } = bar("Hello", 5); var id = 10000; var name = "my name"; var person = { name: name, id: id }; -function foo(obj) { -} +function foo(obj) { } ; function bar(name, id) { return { name: name, id: id }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js index b2f9004b076..ee99de6d470 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentES6.js @@ -18,8 +18,7 @@ var person3: { name: string; id: number } = bar("Hello", 5); var id = 10000; var name = "my name"; var person = { name, id }; -function foo(obj) { -} +function foo(obj) { } ; function bar(name, id) { return { name, id }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js index 84a5a9342d0..1bef1cc9554 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesAssignmentError.js @@ -19,6 +19,5 @@ var person1 = name, id; function foo(name, id) { return { name: name, id: id }; } // error -function bar(obj) { -} +function bar(obj) { } bar({ name: name, id: id }); // error diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js index c65087a8da7..9b19bdc8b5e 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesES6.js @@ -32,8 +32,7 @@ var x3 = { a: 0, b, c, - d() { - }, + d() { }, x3, parent: x3 }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js index 79e7882796f..b72f0351b9c 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js @@ -25,10 +25,8 @@ var v = { class }; // error var y = { "stringLiteral": , 42: , - get e() { - }, - set f() { - }, + get e() { }, + set f() { }, this: , super: , var: , diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js index f6e20b605b6..860abc24b19 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument.js @@ -14,7 +14,6 @@ var obj = { name: name, id: id }; var id = 10000; var name = "my name"; var person = { name: name, id: id }; -function foo(p) { -} +function foo(p) { } foo(person); var obj = { name: name, id: id }; diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js index 2f3535ef78a..7e9d2e7ca8b 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesFunctionArgument2.js @@ -12,6 +12,5 @@ foo(person); // error var id = 10000; var name = "my name"; var person = { name: name, id: id }; -function foo(p) { -} +function foo(p) { } foo(person); // error diff --git a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js index fa41e57e22e..16268c1331c 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfExtendedObject.js @@ -76,8 +76,7 @@ var B = (function (_super) { var C = (function () { function C() { } - C.prototype.valueOf = function () { - }; + C.prototype.valueOf = function () { }; return C; })(); var c; @@ -91,8 +90,7 @@ var r2b = i.data; var r2c = r2b['hm']; // should be 'Object' var r2d = i['hm']; // should be 'any' var a = { - valueOf: function () { - }, + valueOf: function () { }, data: new B() }; var r3 = a.valueOf(); diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObject.js b/tests/baselines/reference/objectTypeHidingMembersOfObject.js index 113329cf8b6..291cc1858fd 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObject.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObject.js @@ -32,8 +32,7 @@ var r4: void = b.valueOf(); var C = (function () { function C() { } - C.prototype.valueOf = function () { - }; + C.prototype.valueOf = function () { }; return C; })(); var c; @@ -41,8 +40,7 @@ var r1 = c.valueOf(); var i; var r2 = i.valueOf(); var a = { - valueOf: function () { - } + valueOf: function () { } }; var r3 = a.valueOf(); var b; diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js index 93d985f7987..5ae0c2fb1bb 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat.js @@ -29,16 +29,14 @@ i = o; // ok var C = (function () { function C() { } - C.prototype.toString = function () { - }; + C.prototype.toString = function () { }; return C; })(); var c; o = c; // error c = o; // ok var a = { - toString: function () { - } + toString: function () { } }; o = a; // error a = o; // ok diff --git a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js index b8a5aa87aef..9c327ca3a38 100644 --- a/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js +++ b/tests/baselines/reference/objectTypeHidingMembersOfObjectAssignmentCompat2.js @@ -38,8 +38,7 @@ var c; o = c; // error c = o; // error var a = { - toString: function () { - } + toString: function () { } }; o = a; // error a = o; // ok diff --git a/tests/baselines/reference/objectTypesIdentity.js b/tests/baselines/reference/objectTypesIdentity.js index adfef8574ed..7eccee23651 100644 --- a/tests/baselines/reference/objectTypesIdentity.js +++ b/tests/baselines/reference/objectTypesIdentity.js @@ -107,37 +107,20 @@ var C = (function () { })(); var a; var b = { foo: '' }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentity2.js b/tests/baselines/reference/objectTypesIdentity2.js index 19fc65e91e0..adbb9caeada 100644 --- a/tests/baselines/reference/objectTypesIdentity2.js +++ b/tests/baselines/reference/objectTypesIdentity2.js @@ -88,25 +88,14 @@ var E; E[E["A"] = 0] = "A"; })(E || (E = {})); var b = { foo: 0 /* A */ }; -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js index a8d395a813f..21cfc280500 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures.js @@ -130,41 +130,22 @@ var a; var b = { foo: function (x) { return ''; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js index af8496105da..0c7e54ded21 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.js @@ -130,41 +130,22 @@ var a; var b = { foo: function (x) { return ''; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js index 289ba25bf6e..f4cfc8dc605 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures3.js @@ -42,17 +42,10 @@ function foo15(x: any) { } //// [objectTypesIdentityWithCallSignatures3.js] // object types are identical structurally var a; -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo14b(x) { -} -function foo15(x) { -} +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo13(x) { } +function foo14(x) { } +function foo14b(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js index 713401d0302..434d1cdd31e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js @@ -130,41 +130,22 @@ var a; var b = { foo: function (x) { return ''; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js index fe84b3e6b92..98b17767b75 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js @@ -46,19 +46,11 @@ function foo15(x: any) { } //// [objectTypesIdentityWithCallSignaturesDifferingParamCounts2.js] // object types are identical structurally var a; -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo14b(x) { -} -function foo15(x) { -} +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo13(x) { } +function foo14(x) { } +function foo14b(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js index 29cb6f3cd54..52dc447f5fb 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignaturesWithOverloads.js @@ -148,41 +148,22 @@ var b = { return ''; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js index 9f16153da37..ca9db28223a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithComplexConstraints.js @@ -15,5 +15,4 @@ function foo(x: B); // error after constraints above made illegal function foo(x: any) { } //// [objectTypesIdentityWithComplexConstraints.js] -function foo(x) { -} +function foo(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js index caf28cd05de..91208da5b90 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.js @@ -105,35 +105,19 @@ var C = (function () { return C; })(); var a; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js index 8825f8c301f..b3381ac5825 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js @@ -94,31 +94,17 @@ var a; var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js index 49b2b071a7e..0010d8815b4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js @@ -94,31 +94,17 @@ var a; var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js index 939a73f4778..cc17fcbeaf3 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures.js @@ -130,41 +130,22 @@ var a; var b = { foo: function (x) { return x; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js index e699b71eb42..0dc2c18d491 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignatures2.js @@ -130,41 +130,22 @@ var a; var b = { foo: function (x, y) { return x; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js index a323308b2e4..b0652b29b7f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js @@ -134,41 +134,22 @@ var a; var b = { foo: function (x) { return ''; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js index 3a6261da8c0..3486157840c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js @@ -154,45 +154,24 @@ var a; var b = { foo: function (x, y) { return ''; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo6c(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo6c(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js index 4e018372033..714e7dbf142 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.js @@ -173,45 +173,24 @@ var a; var b = { foo: function (x, y) { return ''; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo6c(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo6c(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js index 783749605ef..e1940c41587 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js @@ -134,41 +134,22 @@ var a; var b = { foo: function (x) { return null; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js index d743283e22a..b4eaf096ec8 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js @@ -134,41 +134,22 @@ var a; var b = { foo: function (x) { return null; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js index a344917987e..2c9ad2767d9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js @@ -130,41 +130,22 @@ var a; var b = { foo: function (x) { return x; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js index 944fb7d9846..6bfd019dc86 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js @@ -43,17 +43,10 @@ function foo15(x: any) { } //// [objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.js] // object types are identical structurally var a; -function foo1(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo14b(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo2(x) { } +function foo3(x) { } +function foo13(x) { } +function foo14(x) { } +function foo14b(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js index 19aea02ced0..3e98e5887a9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js @@ -130,41 +130,22 @@ var a; var b = { foo: function (x) { return x; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js index 82f87fe4904..36d17758c94 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js @@ -134,41 +134,22 @@ var a; var b = { foo: function (x, y) { return x; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js index 02222da9530..4e58adda1c4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js @@ -134,41 +134,22 @@ var a; var b = { foo: function (x, y) { return x; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js index bf0f8211205..71842d18781 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js @@ -134,41 +134,22 @@ var a; var b = { foo: function (x, y) { return x; } }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js index e495fa98d65..6183be4fb69 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js @@ -95,29 +95,16 @@ var a; var b = { new: function (x) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js index de9a9bf8c2b..59a801134d4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js @@ -112,33 +112,18 @@ var a; var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5c(x) { -} -function foo6c(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5c(x) { } +function foo6c(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js index ee06af6d5e1..d61edd07382 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js @@ -131,33 +131,18 @@ var a; var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5c(x) { -} -function foo6c(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5c(x) { } +function foo6c(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js index 48b8f4a5c5d..b390f7a933b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js @@ -102,33 +102,18 @@ var a; var b = { new: function (x) { return null; } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js index b09dcf9ba9c..d22cc6b254e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js @@ -98,31 +98,17 @@ var a; var b = { new: function (x) { return null; } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js index 6a086c317a2..99d3f8287df 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js @@ -90,29 +90,16 @@ var a; var b = { new: function (x) { return x; } }; -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js index e9cb0e7b0d5..cd77c1ee3d1 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js @@ -90,29 +90,16 @@ var a; var b = { new: function (x) { return new C(x); } }; -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js index 42ab74801b1..72b8e7c8d8f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js @@ -94,29 +94,16 @@ var a; var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js index 182a642af91..1c781f299ce 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js @@ -94,29 +94,16 @@ var a; var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js index a3714bd9dd2..8c5aca3cb1c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js @@ -94,29 +94,16 @@ var a; var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo12b(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo12b(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js index 06cb05a2dd6..1dc6505456a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers1.js @@ -161,49 +161,26 @@ var PB = (function (_super) { })(B); var a; var b = { foo: '' }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo5d(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo11b(x) { -} -function foo11c(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} -function foo16(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo5d(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo11b(x) { } +function foo11c(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } +function foo16(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js index b51f8383d4f..e2fd1b99bfa 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers2.js @@ -176,49 +176,26 @@ var PB = (function (_super) { })(B); var a; var b = { foo: null }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo5d(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo11b(x) { -} -function foo11c(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} -function foo16(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo5d(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo11b(x) { } +function foo11c(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } +function foo16(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js index f0c434d860b..11d64efc9d5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js +++ b/tests/baselines/reference/objectTypesIdentityWithNumericIndexers3.js @@ -161,49 +161,26 @@ var PB = (function (_super) { })(B); var a; var b = { foo: '' }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo5d(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo11b(x) { -} -function foo11c(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} -function foo16(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo5d(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo11b(x) { } +function foo11c(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } +function foo16(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithOptionality.js b/tests/baselines/reference/objectTypesIdentityWithOptionality.js index 642e0617c69..2a61cda1bb9 100644 --- a/tests/baselines/reference/objectTypesIdentityWithOptionality.js +++ b/tests/baselines/reference/objectTypesIdentityWithOptionality.js @@ -75,21 +75,12 @@ var C = (function () { })(); var a; var b = { foo: '' }; -function foo2(x) { -} -function foo3(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo10(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo2(x) { } +function foo3(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo10(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates.js b/tests/baselines/reference/objectTypesIdentityWithPrivates.js index 17e7240353d..5c8a0afed72 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates.js @@ -159,49 +159,26 @@ var PB = (function (_super) { })(B); var a; var b = { foo: '' }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo5d(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo11b(x) { -} -function foo11c(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} -function foo16(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo5d(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo11b(x) { } +function foo11c(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } +function foo16(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js index 4e62e7b551a..36c3e67c70e 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPrivates2.js +++ b/tests/baselines/reference/objectTypesIdentityWithPrivates2.js @@ -58,17 +58,11 @@ var D = (function (_super) { } return D; })(C); -function foo1(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} +function foo1(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } var r = foo4(new C()); var r = foo4(new D()); -function foo5(x) { -} -function foo6(x) { -} +function foo5(x) { } +function foo6(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithPublics.js b/tests/baselines/reference/objectTypesIdentityWithPublics.js index 061275372ac..7c36eb48f2c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithPublics.js +++ b/tests/baselines/reference/objectTypesIdentityWithPublics.js @@ -107,37 +107,20 @@ var C = (function () { })(); var a; var b = { foo: '' }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js index 538c6267710..37c5537aa4b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers.js @@ -161,49 +161,26 @@ var PB = (function (_super) { })(B); var a; var b = { foo: '' }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo5d(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo11b(x) { -} -function foo11c(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} -function foo16(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo5d(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo11b(x) { } +function foo11c(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } +function foo16(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js index cbf4dfff6c4..e90dc8598e4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js +++ b/tests/baselines/reference/objectTypesIdentityWithStringIndexers2.js @@ -176,49 +176,26 @@ var PB = (function (_super) { })(B); var a; var b = { foo: null }; -function foo1(x) { -} -function foo1b(x) { -} -function foo1c(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} -function foo5b(x) { -} -function foo5c(x) { -} -function foo5d(x) { -} -function foo6(x) { -} -function foo7(x) { -} -function foo8(x) { -} -function foo9(x) { -} -function foo10(x) { -} -function foo11(x) { -} -function foo11b(x) { -} -function foo11c(x) { -} -function foo12(x) { -} -function foo13(x) { -} -function foo14(x) { -} -function foo15(x) { -} -function foo16(x) { -} +function foo1(x) { } +function foo1b(x) { } +function foo1c(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } +function foo5b(x) { } +function foo5c(x) { } +function foo5d(x) { } +function foo6(x) { } +function foo7(x) { } +function foo8(x) { } +function foo9(x) { } +function foo10(x) { } +function foo11(x) { } +function foo11b(x) { } +function foo11c(x) { } +function foo12(x) { } +function foo13(x) { } +function foo14(x) { } +function foo15(x) { } +function foo16(x) { } diff --git a/tests/baselines/reference/objectTypesWithOptionalProperties2.js b/tests/baselines/reference/objectTypesWithOptionalProperties2.js index 3faa10447b6..7a237223d7c 100644 --- a/tests/baselines/reference/objectTypesWithOptionalProperties2.js +++ b/tests/baselines/reference/objectTypesWithOptionalProperties2.js @@ -42,7 +42,6 @@ var C2 = (function () { return C2; })(); var b = { - x: function () { - }, + x: function () { }, 1: // error }; diff --git a/tests/baselines/reference/optionalArgsWithDefaultValues.js b/tests/baselines/reference/optionalArgsWithDefaultValues.js index 12ab7c9f330..ab1aa2f5c15 100644 --- a/tests/baselines/reference/optionalArgsWithDefaultValues.js +++ b/tests/baselines/reference/optionalArgsWithDefaultValues.js @@ -10,21 +10,12 @@ var a = (x?=0) => { return 1; }; var b = (x, y?:number = 2) => { x; }; //// [optionalArgsWithDefaultValues.js] -function foo(x, y, z) { - if (y === void 0) { y = false; } - if (z === void 0) { z = 0; } -} +function foo(x, y, z) { } var CCC = (function () { function CCC() { } - CCC.prototype.foo = function (x, y, z) { - if (y === void 0) { y = false; } - if (z === void 0) { z = 0; } - }; - CCC.foo2 = function (x, y, z) { - if (y === void 0) { y = false; } - if (z === void 0) { z = 0; } - }; + CCC.prototype.foo = function (x, y, z) { }; + CCC.foo2 = function (x, y, z) { }; return CCC; })(); var a = function (x) { diff --git a/tests/baselines/reference/optionalConstructorArgInSuper.js b/tests/baselines/reference/optionalConstructorArgInSuper.js index 45c0e032cd8..5204d7f8307 100644 --- a/tests/baselines/reference/optionalConstructorArgInSuper.js +++ b/tests/baselines/reference/optionalConstructorArgInSuper.js @@ -20,8 +20,7 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base(opt) { } - Base.prototype.foo = function (other) { - }; + Base.prototype.foo = function (other) { }; return Base; })(); var Derived = (function (_super) { diff --git a/tests/baselines/reference/optionalParamArgsTest.js b/tests/baselines/reference/optionalParamArgsTest.js index 942b95d245e..6f9b97036ed 100644 --- a/tests/baselines/reference/optionalParamArgsTest.js +++ b/tests/baselines/reference/optionalParamArgsTest.js @@ -260,11 +260,7 @@ c1o1.C1M4(); i1o1.C1M4(); F4(); L4(); -function fnOpt1(id, children, expectedPath, isRoot) { - if (children === void 0) { children = []; } - if (expectedPath === void 0) { expectedPath = []; } -} -function fnOpt2(id, children, expectedPath, isRoot) { -} +function fnOpt1(id, children, expectedPath, isRoot) { } +function fnOpt2(id, children, expectedPath, isRoot) { } fnOpt1(1, [2, 3], [1], true); fnOpt2(1, [2, 3], [1], true); diff --git a/tests/baselines/reference/optionalParamInOverride.js b/tests/baselines/reference/optionalParamInOverride.js index 0a094c6534c..cfdfce368d0 100644 --- a/tests/baselines/reference/optionalParamInOverride.js +++ b/tests/baselines/reference/optionalParamInOverride.js @@ -17,8 +17,7 @@ var __extends = this.__extends || function (d, b) { var Z = (function () { function Z() { } - Z.prototype.func = function () { - }; + Z.prototype.func = function () { }; return Z; })(); var Y = (function (_super) { @@ -26,7 +25,6 @@ var Y = (function (_super) { function Y() { _super.apply(this, arguments); } - Y.prototype.func = function (value) { - }; + Y.prototype.func = function (value) { }; return Y; })(Z); diff --git a/tests/baselines/reference/optionalPropertiesTest.js b/tests/baselines/reference/optionalPropertiesTest.js index 708f2803a38..617db8d6185 100644 --- a/tests/baselines/reference/optionalPropertiesTest.js +++ b/tests/baselines/reference/optionalPropertiesTest.js @@ -46,8 +46,7 @@ var foo; foo = { id: 1234 }; // Ok foo = { id: 1234, name: "test" }; // Ok foo = { name: "test" }; // Error, id missing -foo = { id: 1234, print: function () { -} }; // Ok +foo = { id: 1234, print: function () { } }; // Ok var s = foo.name || "default"; if (foo.print !== undefined) foo.print(); @@ -59,11 +58,9 @@ var test1 = {}; var test2 = {}; var test3 = {}; var test4 = {}; -var test5 = { M: function () { -} }; +var test5 = { M: function () { } }; var test6 = { M: 5 }; -var test7 = { M: function () { -} }; +var test7 = { M: function () { } }; test7 = {}; var test8 = { M: 5 }; test8 = {}; diff --git a/tests/baselines/reference/optionalSetterParam.js b/tests/baselines/reference/optionalSetterParam.js index 4b9b7f01360..1632f33be9f 100644 --- a/tests/baselines/reference/optionalSetterParam.js +++ b/tests/baselines/reference/optionalSetterParam.js @@ -10,8 +10,7 @@ var foo = (function () { function foo() { } Object.defineProperty(foo.prototype, "bar", { - set: function (param) { - }, + set: function (param) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/overloadModifiersMustAgree.js b/tests/baselines/reference/overloadModifiersMustAgree.js index 8cb537c4410..3f9f7eb1415 100644 --- a/tests/baselines/reference/overloadModifiersMustAgree.js +++ b/tests/baselines/reference/overloadModifiersMustAgree.js @@ -19,9 +19,7 @@ interface I { var baz = (function () { function baz() { } - baz.prototype.foo = function (bar) { - }; // error - access modifiers do not agree + baz.prototype.foo = function (bar) { }; // error - access modifiers do not agree return baz; })(); -function bar(s) { -} +function bar(s) { } diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks1.js b/tests/baselines/reference/overloadOnConstConstraintChecks1.js index a59ca2ceda1..eb613586118 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks1.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks1.js @@ -32,8 +32,7 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); var Derived1 = (function (_super) { @@ -41,8 +40,7 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { - }; + Derived1.prototype.bar = function () { }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -50,8 +48,7 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { - }; + Derived2.prototype.baz = function () { }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -59,8 +56,7 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { - }; + Derived3.prototype.biz = function () { }; return Derived3; })(Base); var D = (function () { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks2.js b/tests/baselines/reference/overloadOnConstConstraintChecks2.js index 071b9372636..25759d0a839 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks2.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks2.js @@ -35,8 +35,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks3.js b/tests/baselines/reference/overloadOnConstConstraintChecks3.js index 961411bf6e5..5980c852f41 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks3.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks3.js @@ -37,8 +37,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstConstraintChecks4.js b/tests/baselines/reference/overloadOnConstConstraintChecks4.js index 5192afc35a2..b2ae1125750 100644 --- a/tests/baselines/reference/overloadOnConstConstraintChecks4.js +++ b/tests/baselines/reference/overloadOnConstConstraintChecks4.js @@ -45,8 +45,7 @@ var C = (function (_super) { function C() { _super.apply(this, arguments); } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(A); function foo(name) { diff --git a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js index 51bf62f7ba3..9bd8ca3a274 100644 --- a/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js +++ b/tests/baselines/reference/overloadOnConstInObjectLiteralImplementingAnInterface.js @@ -6,5 +6,4 @@ interface I { var i2: I = { x1: (a: number, cb: (x: 'hi') => number) => { } }; // error //// [overloadOnConstInObjectLiteralImplementingAnInterface.js] -var i2 = { x1: function (a, cb) { -} }; // error +var i2 = { x1: function (a, cb) { } }; // error diff --git a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js index 33cc9c81b2c..980dfcb2145 100644 --- a/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js +++ b/tests/baselines/reference/overloadOnConstNoNonSpecializedSignature.js @@ -9,7 +9,6 @@ class C { var C = (function () { function C() { } - C.prototype.x1 = function (a) { - }; + C.prototype.x1 = function (a) { }; return C; })(); diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js index f4037c3f668..cf9bc526b51 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.js @@ -21,8 +21,7 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); var Derived1 = (function (_super) { @@ -30,8 +29,7 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { - }; + Derived1.prototype.bar = function () { }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -39,8 +37,7 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { - }; + Derived2.prototype.baz = function () { }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -48,8 +45,7 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { - }; + Derived3.prototype.biz = function () { }; return Derived3; })(Base); function foo(name) { diff --git a/tests/baselines/reference/overloadResolution.js b/tests/baselines/reference/overloadResolution.js index fc8fa501efc..8737708beda 100644 --- a/tests/baselines/reference/overloadResolution.js +++ b/tests/baselines/reference/overloadResolution.js @@ -158,8 +158,7 @@ var s = fn3('', '', ''); var n = fn3('', '', 3); // Generic overloads with differing arity called with type argument count that doesn't match any overload fn3(); // Error -function fn4() { -} +function fn4() { } fn4('', 3); fn4(3, ''); // Error fn4('', 3); // Error diff --git a/tests/baselines/reference/overloadResolutionOverCTLambda.js b/tests/baselines/reference/overloadResolutionOverCTLambda.js index 07cd4232bde..18ad08c9c82 100644 --- a/tests/baselines/reference/overloadResolutionOverCTLambda.js +++ b/tests/baselines/reference/overloadResolutionOverCTLambda.js @@ -3,6 +3,5 @@ function foo(b: (item: number) => boolean) { } foo(a => a); // can not convert (number)=>bool to (number)=>number //// [overloadResolutionOverCTLambda.js] -function foo(b) { -} +function foo(b) { } foo(function (a) { return a; }); // can not convert (number)=>bool to (number)=>number diff --git a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js index d4d0287bc00..03063855267 100644 --- a/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js +++ b/tests/baselines/reference/overloadWithCallbacksWithDifferingOptionalityOnArgs.js @@ -7,7 +7,6 @@ x2((x) => 1 ); //// [overloadWithCallbacksWithDifferingOptionalityOnArgs.js] -function x2(callback) { -} +function x2(callback) { } x2(function () { return 1; }); x2(function (x) { return 1; }); diff --git a/tests/baselines/reference/overloadingOnConstants1.js b/tests/baselines/reference/overloadingOnConstants1.js index e325e7ad8c0..7ebeeb2890f 100644 --- a/tests/baselines/reference/overloadingOnConstants1.js +++ b/tests/baselines/reference/overloadingOnConstants1.js @@ -35,8 +35,7 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); var Derived1 = (function (_super) { @@ -44,8 +43,7 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { - }; + Derived1.prototype.bar = function () { }; return Derived1; })(Base); var Derived2 = (function (_super) { @@ -53,8 +51,7 @@ var Derived2 = (function (_super) { function Derived2() { _super.apply(this, arguments); } - Derived2.prototype.baz = function () { - }; + Derived2.prototype.baz = function () { }; return Derived2; })(Base); var Derived3 = (function (_super) { @@ -62,8 +59,7 @@ var Derived3 = (function (_super) { function Derived3() { _super.apply(this, arguments); } - Derived3.prototype.biz = function () { - }; + Derived3.prototype.biz = function () { }; return Derived3; })(Base); var d2; diff --git a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js index 7e926a6250a..591826725b1 100644 --- a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js +++ b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.js @@ -10,6 +10,5 @@ function boo() { test(); test(name, string); test(name ? : any); - { - } + { } } diff --git a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js index 4d0ac15c717..42c371dd218 100644 --- a/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js +++ b/tests/baselines/reference/overloadsInDifferentContainersDisagreeOnAmbient.js @@ -11,7 +11,6 @@ module M { //// [overloadsInDifferentContainersDisagreeOnAmbient.js] var M; (function (M) { - function f() { - } + function f() { } M.f = f; })(M || (M = {})); diff --git a/tests/baselines/reference/overloadsWithinClasses.js b/tests/baselines/reference/overloadsWithinClasses.js index 79f3c332be5..4ac612502c7 100644 --- a/tests/baselines/reference/overloadsWithinClasses.js +++ b/tests/baselines/reference/overloadsWithinClasses.js @@ -27,17 +27,14 @@ class X { var foo = (function () { function foo() { } - foo.fnOverload = function () { - }; - foo.fnOverload = function (foo) { - }; // error + foo.fnOverload = function () { }; + foo.fnOverload = function (foo) { }; // error return foo; })(); var bar = (function () { function bar() { } - bar.fnOverload = function (foo) { - }; // no error + bar.fnOverload = function (foo) { }; // no error return bar; })(); var X = (function () { diff --git a/tests/baselines/reference/parameterInitializersForwardReferencing.js b/tests/baselines/reference/parameterInitializersForwardReferencing.js index 90fa1bdcd23..d810db54695 100644 --- a/tests/baselines/reference/parameterInitializersForwardReferencing.js +++ b/tests/baselines/reference/parameterInitializersForwardReferencing.js @@ -73,25 +73,14 @@ function outside() { var b; } } -function defaultArgFunction(a, b) { - if (a === void 0) { a = function () { - return b; - }; } - if (b === void 0) { b = 1; } -} -function defaultArgArrow(a, b) { - if (a === void 0) { a = function () { return function () { return b; }; }; } - if (b === void 0) { b = 3; } -} +function defaultArgFunction(a, b) { } +function defaultArgArrow(a, b) { } var C = (function () { function C(a, b) { if (a === void 0) { a = b; } if (b === void 0) { b = 1; } } - C.prototype.method = function (a, b) { - if (a === void 0) { a = b; } - if (b === void 0) { b = 1; } - }; + C.prototype.method = function (a, b) { }; return C; })(); // Function expressions diff --git a/tests/baselines/reference/parser509669.js b/tests/baselines/reference/parser509669.js index e4ce2b90312..3fa4cf696c0 100644 --- a/tests/baselines/reference/parser509669.js +++ b/tests/baselines/reference/parser509669.js @@ -5,6 +5,5 @@ function foo():any { //// [parser509669.js] function foo() { - return function () { - }; + return function () { }; } diff --git a/tests/baselines/reference/parser521128.js b/tests/baselines/reference/parser521128.js index e16cbad6c33..2471f740d77 100644 --- a/tests/baselines/reference/parser521128.js +++ b/tests/baselines/reference/parser521128.js @@ -3,5 +3,4 @@ module.module { } //// [parser521128.js] module.module; -{ -} +{ } diff --git a/tests/baselines/reference/parser553699.js b/tests/baselines/reference/parser553699.js index f245ecc3446..8570780e74a 100644 --- a/tests/baselines/reference/parser553699.js +++ b/tests/baselines/reference/parser553699.js @@ -12,8 +12,7 @@ class Bar { var Foo = (function () { function Foo() { } - Foo.prototype.banana = function (x) { - }; + Foo.prototype.banana = function (x) { }; return Foo; })(); var Bar = (function () { diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic10.js b/tests/baselines/reference/parserAccessibilityAfterStatic10.js index feded66fe95..6756a57ce7e 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic10.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic10.js @@ -9,7 +9,6 @@ static public intI() {} var Outer = (function () { function Outer() { } - Outer.intI = function () { - }; + Outer.intI = function () { }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic11.js b/tests/baselines/reference/parserAccessibilityAfterStatic11.js index 094202014a1..8b16153b797 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic11.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic11.js @@ -9,7 +9,6 @@ static public() {} var Outer = (function () { function Outer() { } - Outer.public = function () { - }; + Outer.public = function () { }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic14.js b/tests/baselines/reference/parserAccessibilityAfterStatic14.js index b2a6be7464c..4455936a859 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic14.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic14.js @@ -9,7 +9,6 @@ static public() {} var Outer = (function () { function Outer() { } - Outer.public = function () { - }; + Outer.public = function () { }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessibilityAfterStatic7.js b/tests/baselines/reference/parserAccessibilityAfterStatic7.js index a2bc5c7fba3..2d94be8ea50 100644 --- a/tests/baselines/reference/parserAccessibilityAfterStatic7.js +++ b/tests/baselines/reference/parserAccessibilityAfterStatic7.js @@ -9,7 +9,6 @@ static public intI() {} var Outer = (function () { function Outer() { } - Outer.intI = function () { - }; + Outer.intI = function () { }; return Outer; })(); diff --git a/tests/baselines/reference/parserAccessors1.js b/tests/baselines/reference/parserAccessors1.js index b4cc809e7b2..6b47a46ede1 100644 --- a/tests/baselines/reference/parserAccessors1.js +++ b/tests/baselines/reference/parserAccessors1.js @@ -8,8 +8,7 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { - }, + get: function () { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserAccessors10.js b/tests/baselines/reference/parserAccessors10.js index f1bed41edee..d5d7e89a7d0 100644 --- a/tests/baselines/reference/parserAccessors10.js +++ b/tests/baselines/reference/parserAccessors10.js @@ -5,6 +5,5 @@ var v = { //// [parserAccessors10.js] var v = { - get foo() { - } + get foo() { } }; diff --git a/tests/baselines/reference/parserAccessors2.js b/tests/baselines/reference/parserAccessors2.js index 71cbd6f466b..482daa74a64 100644 --- a/tests/baselines/reference/parserAccessors2.js +++ b/tests/baselines/reference/parserAccessors2.js @@ -8,8 +8,7 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserAccessors3.js b/tests/baselines/reference/parserAccessors3.js index 68d8ec15e63..287f607725a 100644 --- a/tests/baselines/reference/parserAccessors3.js +++ b/tests/baselines/reference/parserAccessors3.js @@ -2,5 +2,4 @@ var v = { get Foo() { } }; //// [parserAccessors3.js] -var v = { get Foo() { -} }; +var v = { get Foo() { } }; diff --git a/tests/baselines/reference/parserAccessors4.js b/tests/baselines/reference/parserAccessors4.js index 9ebd1f0e82e..0716078a8c8 100644 --- a/tests/baselines/reference/parserAccessors4.js +++ b/tests/baselines/reference/parserAccessors4.js @@ -2,5 +2,4 @@ var v = { set Foo(a) { } }; //// [parserAccessors4.js] -var v = { set Foo(a) { -} }; +var v = { set Foo(a) { } }; diff --git a/tests/baselines/reference/parserAccessors7.js b/tests/baselines/reference/parserAccessors7.js index 2703480ef53..4b7f2d55860 100644 --- a/tests/baselines/reference/parserAccessors7.js +++ b/tests/baselines/reference/parserAccessors7.js @@ -2,5 +2,4 @@ var v = { get foo(v: number) { } }; //// [parserAccessors7.js] -var v = { get foo(v) { -} }; +var v = { get foo(v) { } }; diff --git a/tests/baselines/reference/parserAccessors8.js b/tests/baselines/reference/parserAccessors8.js index 609fde320dc..18fb4454071 100644 --- a/tests/baselines/reference/parserAccessors8.js +++ b/tests/baselines/reference/parserAccessors8.js @@ -2,5 +2,4 @@ var v = { set foo() { } } //// [parserAccessors8.js] -var v = { set foo() { -} }; +var v = { set foo() { } }; diff --git a/tests/baselines/reference/parserAccessors9.js b/tests/baselines/reference/parserAccessors9.js index 07c9d5cbc1e..448d93a2c01 100644 --- a/tests/baselines/reference/parserAccessors9.js +++ b/tests/baselines/reference/parserAccessors9.js @@ -2,5 +2,4 @@ var v = { set foo(a, b) { } } //// [parserAccessors9.js] -var v = { set foo(a, b) { -} }; +var v = { set foo(a, b) { } }; diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js index 18a1dee3e9f..6c74814917a 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator1.js @@ -7,6 +7,5 @@ function f1() { //// [parserAmbiguityWithBinaryOperator1.js] function f1() { var a, b, c; - if (a < b || b > (c + 1)) { - } + if (a < b || b > (c + 1)) { } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js index 9589d57e3af..6cd6de58d47 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator2.js @@ -7,6 +7,5 @@ function f() { //// [parserAmbiguityWithBinaryOperator2.js] function f() { var a, b, c; - if (a < b && b > (c + 1)) { - } + if (a < b && b > (c + 1)) { } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js index 95745263c71..e3df2894777 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator3.js @@ -8,6 +8,5 @@ function f() { //// [parserAmbiguityWithBinaryOperator3.js] function f() { var a, b, c; - if (a < b && b < (c + 1)) { - } + if (a < b && b < (c + 1)) { } } diff --git a/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js b/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js index cdcec030ae7..a6ba380112b 100644 --- a/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js +++ b/tests/baselines/reference/parserAmbiguityWithBinaryOperator4.js @@ -7,6 +7,5 @@ function g() { //// [parserAmbiguityWithBinaryOperator4.js] function g() { var a, b, c; - if (a(c + 1)) { - } + if (a(c + 1)) { } } diff --git a/tests/baselines/reference/parserArrowFunctionExpression1.js b/tests/baselines/reference/parserArrowFunctionExpression1.js index 5ab29fee64c..e4ae59fdb99 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression1.js +++ b/tests/baselines/reference/parserArrowFunctionExpression1.js @@ -2,5 +2,4 @@ var v = (public x: string) => { }; //// [parserArrowFunctionExpression1.js] -var v = function (x) { -}; +var v = function (x) { }; diff --git a/tests/baselines/reference/parserArrowFunctionExpression2.js b/tests/baselines/reference/parserArrowFunctionExpression2.js index 5059cf32182..9004468ec76 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression2.js +++ b/tests/baselines/reference/parserArrowFunctionExpression2.js @@ -2,6 +2,5 @@ a = () => { } || a //// [parserArrowFunctionExpression2.js] -a = function () { -}; +a = function () { }; || a; diff --git a/tests/baselines/reference/parserArrowFunctionExpression3.js b/tests/baselines/reference/parserArrowFunctionExpression3.js index 68ea230d87b..9e6b2706108 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression3.js +++ b/tests/baselines/reference/parserArrowFunctionExpression3.js @@ -2,5 +2,4 @@ a = (() => { } || a) //// [parserArrowFunctionExpression3.js] -a = (function () { -}) || a; +a = (function () { }) || a; diff --git a/tests/baselines/reference/parserArrowFunctionExpression4.js b/tests/baselines/reference/parserArrowFunctionExpression4.js index 53aaee9e6ff..e77a42162cd 100644 --- a/tests/baselines/reference/parserArrowFunctionExpression4.js +++ b/tests/baselines/reference/parserArrowFunctionExpression4.js @@ -2,5 +2,4 @@ a = (() => { }, a) //// [parserArrowFunctionExpression4.js] -a = (function () { -}, a); +a = (function () { }, a); diff --git a/tests/baselines/reference/parserClassDeclaration11.js b/tests/baselines/reference/parserClassDeclaration11.js index 80a27d71e6c..078d3553a43 100644 --- a/tests/baselines/reference/parserClassDeclaration11.js +++ b/tests/baselines/reference/parserClassDeclaration11.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration13.js b/tests/baselines/reference/parserClassDeclaration13.js index dcb704ae1d3..93ce76fb168 100644 --- a/tests/baselines/reference/parserClassDeclaration13.js +++ b/tests/baselines/reference/parserClassDeclaration13.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype.bar = function () { - }; + C.prototype.bar = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration16.js b/tests/baselines/reference/parserClassDeclaration16.js index 7048980597e..a6a92d73afa 100644 --- a/tests/baselines/reference/parserClassDeclaration16.js +++ b/tests/baselines/reference/parserClassDeclaration16.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration19.js b/tests/baselines/reference/parserClassDeclaration19.js index 5b77e263ec9..7900aa4d552 100644 --- a/tests/baselines/reference/parserClassDeclaration19.js +++ b/tests/baselines/reference/parserClassDeclaration19.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype["foo"] = function () { - }; + C.prototype["foo"] = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration20.js b/tests/baselines/reference/parserClassDeclaration20.js index 68d97b66bb9..7c99f2d8ee6 100644 --- a/tests/baselines/reference/parserClassDeclaration20.js +++ b/tests/baselines/reference/parserClassDeclaration20.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype["0"] = function () { - }; + C.prototype["0"] = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration21.js b/tests/baselines/reference/parserClassDeclaration21.js index 248f10e8681..fa4cef46e0e 100644 --- a/tests/baselines/reference/parserClassDeclaration21.js +++ b/tests/baselines/reference/parserClassDeclaration21.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype[1] = function () { - }; + C.prototype[1] = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserClassDeclaration22.js b/tests/baselines/reference/parserClassDeclaration22.js index 60f708d4835..596f7a4474b 100644 --- a/tests/baselines/reference/parserClassDeclaration22.js +++ b/tests/baselines/reference/parserClassDeclaration22.js @@ -8,7 +8,6 @@ class C { var C = (function () { function C() { } - C.prototype["bar"] = function () { - }; + C.prototype["bar"] = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserComputedPropertyName12.js b/tests/baselines/reference/parserComputedPropertyName12.js index 96e62b626e7..f879d4166dd 100644 --- a/tests/baselines/reference/parserComputedPropertyName12.js +++ b/tests/baselines/reference/parserComputedPropertyName12.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype[e] = function () { - }; + C.prototype[e] = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserComputedPropertyName17.js b/tests/baselines/reference/parserComputedPropertyName17.js index 98d61ab8bca..f1fc4caacb3 100644 --- a/tests/baselines/reference/parserComputedPropertyName17.js +++ b/tests/baselines/reference/parserComputedPropertyName17.js @@ -2,5 +2,4 @@ var v = { set [e](v) { } } //// [parserComputedPropertyName17.js] -var v = { set [e](v) { -} }; +var v = { set [e](v) { } }; diff --git a/tests/baselines/reference/parserComputedPropertyName24.js b/tests/baselines/reference/parserComputedPropertyName24.js index 0b9467fb26d..13f14f2e466 100644 --- a/tests/baselines/reference/parserComputedPropertyName24.js +++ b/tests/baselines/reference/parserComputedPropertyName24.js @@ -8,8 +8,7 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, e, { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserComputedPropertyName3.js b/tests/baselines/reference/parserComputedPropertyName3.js index 2e73fe87d3a..70273ed501d 100644 --- a/tests/baselines/reference/parserComputedPropertyName3.js +++ b/tests/baselines/reference/parserComputedPropertyName3.js @@ -2,5 +2,4 @@ var v = { [e]() { } }; //// [parserComputedPropertyName3.js] -var v = { [e]() { -} }; +var v = { [e]() { } }; diff --git a/tests/baselines/reference/parserComputedPropertyName33.js b/tests/baselines/reference/parserComputedPropertyName33.js index 1cc06c06780..924bb872115 100644 --- a/tests/baselines/reference/parserComputedPropertyName33.js +++ b/tests/baselines/reference/parserComputedPropertyName33.js @@ -13,5 +13,4 @@ var C = (function () { } return C; })(); -{ -} +{ } diff --git a/tests/baselines/reference/parserComputedPropertyName38.js b/tests/baselines/reference/parserComputedPropertyName38.js index 487ff4078fd..6fc40f0802a 100644 --- a/tests/baselines/reference/parserComputedPropertyName38.js +++ b/tests/baselines/reference/parserComputedPropertyName38.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype[public] = function () { - }; + C.prototype[public] = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserComputedPropertyName39.js b/tests/baselines/reference/parserComputedPropertyName39.js index c37312f0034..2849acd0562 100644 --- a/tests/baselines/reference/parserComputedPropertyName39.js +++ b/tests/baselines/reference/parserComputedPropertyName39.js @@ -11,5 +11,4 @@ var C = (function () { } return C; })(); -(() => { -}); +(() => { }); diff --git a/tests/baselines/reference/parserComputedPropertyName4.js b/tests/baselines/reference/parserComputedPropertyName4.js index a88545566e6..e456ca74f93 100644 --- a/tests/baselines/reference/parserComputedPropertyName4.js +++ b/tests/baselines/reference/parserComputedPropertyName4.js @@ -2,5 +2,4 @@ var v = { get [e]() { } }; //// [parserComputedPropertyName4.js] -var v = { get [e]() { -} }; +var v = { get [e]() { } }; diff --git a/tests/baselines/reference/parserComputedPropertyName40.js b/tests/baselines/reference/parserComputedPropertyName40.js index 5f6381360fc..dc77466492d 100644 --- a/tests/baselines/reference/parserComputedPropertyName40.js +++ b/tests/baselines/reference/parserComputedPropertyName40.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.prototype[a ? "" : ""] = function () { - }; + C.prototype[a ? "" : ""] = function () { }; return C; })(); diff --git a/tests/baselines/reference/parserComputedPropertyName5.js b/tests/baselines/reference/parserComputedPropertyName5.js index aa86d54d09c..b94acd5523b 100644 --- a/tests/baselines/reference/parserComputedPropertyName5.js +++ b/tests/baselines/reference/parserComputedPropertyName5.js @@ -2,5 +2,4 @@ var v = { public get [e]() { } }; //// [parserComputedPropertyName5.js] -var v = { get [e]() { -} }; +var v = { get [e]() { } }; diff --git a/tests/baselines/reference/parserES3Accessors1.js b/tests/baselines/reference/parserES3Accessors1.js index 4900c1f32d9..b4d0b9d6576 100644 --- a/tests/baselines/reference/parserES3Accessors1.js +++ b/tests/baselines/reference/parserES3Accessors1.js @@ -8,8 +8,7 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - get: function () { - }, + get: function () { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserES3Accessors2.js b/tests/baselines/reference/parserES3Accessors2.js index 08259f2655e..3d18e8ac280 100644 --- a/tests/baselines/reference/parserES3Accessors2.js +++ b/tests/baselines/reference/parserES3Accessors2.js @@ -8,8 +8,7 @@ var C = (function () { function C() { } Object.defineProperty(C.prototype, "Foo", { - set: function (a) { - }, + set: function (a) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/parserES3Accessors3.js b/tests/baselines/reference/parserES3Accessors3.js index 57ceb566dcb..f623fc546fd 100644 --- a/tests/baselines/reference/parserES3Accessors3.js +++ b/tests/baselines/reference/parserES3Accessors3.js @@ -2,5 +2,4 @@ var v = { get Foo() { } }; //// [parserES3Accessors3.js] -var v = { get Foo() { -} }; +var v = { get Foo() { } }; diff --git a/tests/baselines/reference/parserES3Accessors4.js b/tests/baselines/reference/parserES3Accessors4.js index 5c87923ed5e..2bc5c9d1f78 100644 --- a/tests/baselines/reference/parserES3Accessors4.js +++ b/tests/baselines/reference/parserES3Accessors4.js @@ -2,5 +2,4 @@ var v = { set Foo(a) { } }; //// [parserES3Accessors4.js] -var v = { set Foo(a) { -} }; +var v = { set Foo(a) { } }; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName3.js b/tests/baselines/reference/parserES5ComputedPropertyName3.js index 4e07049b29d..f83253b531d 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName3.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName3.js @@ -2,5 +2,4 @@ var v = { [e]() { } }; //// [parserES5ComputedPropertyName3.js] -var v = { [e]: function () { -} }; +var v = { [e]: function () { } }; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName4.js b/tests/baselines/reference/parserES5ComputedPropertyName4.js index 50e240dcf20..568b54500ac 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName4.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName4.js @@ -2,5 +2,4 @@ var v = { get [e]() { } }; //// [parserES5ComputedPropertyName4.js] -var v = { get [e]() { -} }; +var v = { get [e]() { } }; diff --git a/tests/baselines/reference/parserErrantSemicolonInClass1.js b/tests/baselines/reference/parserErrantSemicolonInClass1.js index 2f38e2b5323..f761b04ca78 100644 --- a/tests/baselines/reference/parserErrantSemicolonInClass1.js +++ b/tests/baselines/reference/parserErrantSemicolonInClass1.js @@ -39,8 +39,7 @@ class a { var a = (function () { function a(ns) { } - a.prototype.pgF = function () { - }; + a.prototype.pgF = function () { }; Object.defineProperty(a.prototype, "d", { get: function () { return 30; diff --git a/tests/baselines/reference/parserErrorRecovery_Block3.js b/tests/baselines/reference/parserErrorRecovery_Block3.js index 30183fb7d8b..55b0a4d65e7 100644 --- a/tests/baselines/reference/parserErrorRecovery_Block3.js +++ b/tests/baselines/reference/parserErrorRecovery_Block3.js @@ -10,8 +10,7 @@ class C { var C = (function () { function C() { } - C.prototype.a = function () { - }; + C.prototype.a = function () { }; C.prototype.b = function () { }; return C; diff --git a/tests/baselines/reference/parserErrorRecovery_ParameterList6.js b/tests/baselines/reference/parserErrorRecovery_ParameterList6.js index e83c045208d..060ad14766b 100644 --- a/tests/baselines/reference/parserErrorRecovery_ParameterList6.js +++ b/tests/baselines/reference/parserErrorRecovery_ParameterList6.js @@ -11,5 +11,4 @@ var Foo = (function () { return Foo; })(); break ; -{ -} +{ } diff --git a/tests/baselines/reference/parserFunctionDeclaration4.js b/tests/baselines/reference/parserFunctionDeclaration4.js index 285f36e6838..a36a41e0809 100644 --- a/tests/baselines/reference/parserFunctionDeclaration4.js +++ b/tests/baselines/reference/parserFunctionDeclaration4.js @@ -3,5 +3,4 @@ function foo(); function bar() { } //// [parserFunctionDeclaration4.js] -function bar() { -} +function bar() { } diff --git a/tests/baselines/reference/parserFunctionDeclaration5.js b/tests/baselines/reference/parserFunctionDeclaration5.js index 1c80f842c0d..fd35c14675e 100644 --- a/tests/baselines/reference/parserFunctionDeclaration5.js +++ b/tests/baselines/reference/parserFunctionDeclaration5.js @@ -3,5 +3,4 @@ function foo(); function foo() { } //// [parserFunctionDeclaration5.js] -function foo() { -} +function foo() { } diff --git a/tests/baselines/reference/parserFunctionDeclaration6.js b/tests/baselines/reference/parserFunctionDeclaration6.js index 6f877b07b14..05afe2d33a8 100644 --- a/tests/baselines/reference/parserFunctionDeclaration6.js +++ b/tests/baselines/reference/parserFunctionDeclaration6.js @@ -6,6 +6,5 @@ //// [parserFunctionDeclaration6.js] { - function bar() { - } + function bar() { } } diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment1.js b/tests/baselines/reference/parserFunctionPropertyAssignment1.js index 9135f98ff6d..ea7b20f05d5 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment1.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment1.js @@ -2,5 +2,4 @@ var v = { foo() { } }; //// [parserFunctionPropertyAssignment1.js] -var v = { foo: function () { -} }; +var v = { foo: function () { } }; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment2.js b/tests/baselines/reference/parserFunctionPropertyAssignment2.js index 928b0113342..668e8df2cfc 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment2.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment2.js @@ -2,5 +2,4 @@ var v = { 0() { } }; //// [parserFunctionPropertyAssignment2.js] -var v = { 0: function () { -} }; +var v = { 0: function () { } }; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment3.js b/tests/baselines/reference/parserFunctionPropertyAssignment3.js index 03318edc134..87a98ac402c 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment3.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment3.js @@ -2,5 +2,4 @@ var v = { "foo"() { } }; //// [parserFunctionPropertyAssignment3.js] -var v = { "foo": function () { -} }; +var v = { "foo": function () { } }; diff --git a/tests/baselines/reference/parserFunctionPropertyAssignment4.js b/tests/baselines/reference/parserFunctionPropertyAssignment4.js index 8366fb296ff..e9b41e754e6 100644 --- a/tests/baselines/reference/parserFunctionPropertyAssignment4.js +++ b/tests/baselines/reference/parserFunctionPropertyAssignment4.js @@ -2,5 +2,4 @@ var v = { 0() { } }; //// [parserFunctionPropertyAssignment4.js] -var v = { 0: function () { -} }; +var v = { 0: function () { } }; diff --git a/tests/baselines/reference/parserFuzz1.js b/tests/baselines/reference/parserFuzz1.js index 969c07c1659..b9ffb540049 100644 --- a/tests/baselines/reference/parserFuzz1.js +++ b/tests/baselines/reference/parserFuzz1.js @@ -6,8 +6,6 @@ cla (1, 'hm'); // error //// [primitiveConstraints1.js] -function foo1(t, u) { -} +function foo1(t, u) { } foo1('hm', 1); // no error -function foo2(t, u) { -} +function foo2(t, u) { } foo2(1, 'hm'); // error diff --git a/tests/baselines/reference/primitiveMembers.js b/tests/baselines/reference/primitiveMembers.js index 7f9710bea48..f41d2a65bba 100644 --- a/tests/baselines/reference/primitiveMembers.js +++ b/tests/baselines/reference/primitiveMembers.js @@ -57,8 +57,7 @@ var n3 = 5 || {}; var baz = (function () { function baz() { } - baz.prototype.bar = function () { - }; + baz.prototype.bar = function () { }; return baz; })(); var foo = (function (_super) { diff --git a/tests/baselines/reference/primtiveTypesAreIdentical.js b/tests/baselines/reference/primtiveTypesAreIdentical.js index 00a77fac917..19bdadb4cee 100644 --- a/tests/baselines/reference/primtiveTypesAreIdentical.js +++ b/tests/baselines/reference/primtiveTypesAreIdentical.js @@ -33,21 +33,14 @@ function foo7(x: any) { } //// [primtiveTypesAreIdentical.js] // primitive types are identical to themselves so these overloads will all cause errors -function foo1(x) { -} -function foo2(x) { -} -function foo3(x) { -} -function foo4(x) { -} -function foo5(x) { -} +function foo1(x) { } +function foo2(x) { } +function foo3(x) { } +function foo4(x) { } +function foo5(x) { } var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function foo6(x) { -} -function foo7(x) { -} +function foo6(x) { } +function foo7(x) { } diff --git a/tests/baselines/reference/privateVisibility.js b/tests/baselines/reference/privateVisibility.js index 80e0bf51a1b..9565b6fc25d 100644 --- a/tests/baselines/reference/privateVisibility.js +++ b/tests/baselines/reference/privateVisibility.js @@ -35,8 +35,7 @@ var Foo = (function () { Foo.prototype.pubMeth = function () { this.privMeth(); }; - Foo.prototype.privMeth = function () { - }; + Foo.prototype.privMeth = function () { }; return Foo; })(); var f = new Foo(); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js index 5351258111e..6ffe8c53445 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js @@ -1,5 +1,4 @@ define(["require", "exports"], function (require, exports) { - function hello() { - } + function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js index 5351258111e..6ffe8c53445 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js @@ -1,5 +1,4 @@ define(["require", "exports"], function (require, exports) { - function hello() { - } + function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js index 5351258111e..6ffe8c53445 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js @@ -1,5 +1,4 @@ define(["require", "exports"], function (require, exports) { - function hello() { - } + function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js index 3bc8930ed53..58114de3a4d 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js @@ -1,3 +1,2 @@ -function hello() { -} +function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js index 3bc8930ed53..58114de3a4d 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js @@ -1,3 +1,2 @@ -function hello() { -} +function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js index 3bc8930ed53..58114de3a4d 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js @@ -1,3 +1,2 @@ -function hello() { -} +function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js index 649db9a606d..115b5fff25f 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/amd/li'b/class'A.js @@ -3,8 +3,7 @@ var test; var ClassA = (function () { function ClassA() { } - ClassA.prototype.method = function () { - }; + ClassA.prototype.method = function () { }; return ClassA; })(); test.ClassA = ClassA; diff --git a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js index 649db9a606d..115b5fff25f 100644 --- a/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js +++ b/tests/baselines/reference/project/quotesInFileAndDirectoryNames/node/li'b/class'A.js @@ -3,8 +3,7 @@ var test; var ClassA = (function () { function ClassA() { } - ClassA.prototype.method = function () { - }; + ClassA.prototype.method = function () { }; return ClassA; })(); test.ClassA = ClassA; diff --git a/tests/baselines/reference/propertyAccess.js b/tests/baselines/reference/propertyAccess.js index e0b89f39de0..735c8d3908f 100644 --- a/tests/baselines/reference/propertyAccess.js +++ b/tests/baselines/reference/propertyAccess.js @@ -179,8 +179,7 @@ var Compass; var numIndex = { 3: 'three', 'three': 'three' }; var strIndex = { 'N': 0 /* North */, 'E': 2 /* East */ }; var bothIndex; -function noIndex() { -} +function noIndex() { } var obj = { 10: 'ten', x: 'hello', diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.js b/tests/baselines/reference/propertyAndAccessorWithSameName.js index f466483cede..f8978ac4d18 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.js +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.js @@ -36,8 +36,7 @@ var D = (function () { function D() { } Object.defineProperty(D.prototype, "x", { - set: function (v) { - } // error + set: function (v) { } // error , enumerable: true, configurable: true @@ -51,8 +50,7 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/propertyAndFunctionWithSameName.js b/tests/baselines/reference/propertyAndFunctionWithSameName.js index ec5f1903e8a..eb0b437fd5c 100644 --- a/tests/baselines/reference/propertyAndFunctionWithSameName.js +++ b/tests/baselines/reference/propertyAndFunctionWithSameName.js @@ -23,7 +23,6 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.x = function (v) { - }; // error + D.prototype.x = function (v) { }; // error return D; })(); diff --git a/tests/baselines/reference/propertyWrappedInTry.js b/tests/baselines/reference/propertyWrappedInTry.js index 459e35f91ae..e7f8a28d688 100644 --- a/tests/baselines/reference/propertyWrappedInTry.js +++ b/tests/baselines/reference/propertyWrappedInTry.js @@ -28,8 +28,7 @@ var Foo = (function () { try { bar = someInitThatMightFail(); } -catch (e) { -} +catch (e) { } baz(); { return this.bar; // doesn't get rewritten to Foo.bar. diff --git a/tests/baselines/reference/prototypes.js b/tests/baselines/reference/prototypes.js index 4ecdafb3dc4..4d7ddc4a4d5 100644 --- a/tests/baselines/reference/prototypes.js +++ b/tests/baselines/reference/prototypes.js @@ -7,6 +7,5 @@ f.prototype; //// [prototypes.js] Object.prototype; // ok new Object().prototype; // error -function f() { -} +function f() { } f.prototype; diff --git a/tests/baselines/reference/qualifiedModuleLocals.js b/tests/baselines/reference/qualifiedModuleLocals.js index 2909be7639d..45d61949c63 100644 --- a/tests/baselines/reference/qualifiedModuleLocals.js +++ b/tests/baselines/reference/qualifiedModuleLocals.js @@ -13,8 +13,7 @@ A.a(); //// [qualifiedModuleLocals.js] var A; (function (A) { - function b() { - } + function b() { } function a() { A.b(); } diff --git a/tests/baselines/reference/quotedFunctionName1.js b/tests/baselines/reference/quotedFunctionName1.js index 28d75186474..69f4f2cfaa3 100644 --- a/tests/baselines/reference/quotedFunctionName1.js +++ b/tests/baselines/reference/quotedFunctionName1.js @@ -7,7 +7,6 @@ class Test1 { var Test1 = (function () { function Test1() { } - Test1.prototype["prop1"] = function () { - }; + Test1.prototype["prop1"] = function () { }; return Test1; })(); diff --git a/tests/baselines/reference/quotedFunctionName2.js b/tests/baselines/reference/quotedFunctionName2.js index 46d8d9bae9d..3173ec29f13 100644 --- a/tests/baselines/reference/quotedFunctionName2.js +++ b/tests/baselines/reference/quotedFunctionName2.js @@ -7,7 +7,6 @@ class Test1 { var Test1 = (function () { function Test1() { } - Test1["prop1"] = function () { - }; + Test1["prop1"] = function () { }; return Test1; })(); diff --git a/tests/baselines/reference/recur1.js b/tests/baselines/reference/recur1.js index 3dd0e14ad97..37a8b6eb3f2 100644 --- a/tests/baselines/reference/recur1.js +++ b/tests/baselines/reference/recur1.js @@ -9,8 +9,6 @@ cobalt.pitch = function() {} //// [recur1.js] var salt = new salt.pepper(); -salt.pepper = function () { -}; +salt.pepper = function () { }; var cobalt = new cobalt.pitch(); -cobalt.pitch = function () { -}; +cobalt.pitch = function () { }; diff --git a/tests/baselines/reference/recursiveBaseConstructorCreation1.js b/tests/baselines/reference/recursiveBaseConstructorCreation1.js index 69a71a4f79c..c475f604b14 100644 --- a/tests/baselines/reference/recursiveBaseConstructorCreation1.js +++ b/tests/baselines/reference/recursiveBaseConstructorCreation1.js @@ -16,8 +16,7 @@ var __extends = this.__extends || function (d, b) { var C1 = (function () { function C1() { } - C1.prototype.func = function (param) { - }; + C1.prototype.func = function (param) { }; return C1; })(); var C2 = (function (_super) { diff --git a/tests/baselines/reference/recursiveFunctionTypes.js b/tests/baselines/reference/recursiveFunctionTypes.js index 6f10ef99080..1158fb539d0 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.js +++ b/tests/baselines/reference/recursiveFunctionTypes.js @@ -52,12 +52,9 @@ var x = fn; // error var y = fn; // ok var f; var g; -function f1(d) { -} -function f2() { -} -function g2() { -} +function f1(d) { } +function f2() { } +function g2() { } function f3() { return f3; } @@ -65,8 +62,7 @@ var a = f3; // error var C = (function () { function C() { } - C.g = function (t) { - }; + C.g = function (t) { }; return C; })(); C.g(3); // error diff --git a/tests/baselines/reference/recursiveFunctionTypes1.js b/tests/baselines/reference/recursiveFunctionTypes1.js index 2f2d072cb6b..c4c255d5e44 100644 --- a/tests/baselines/reference/recursiveFunctionTypes1.js +++ b/tests/baselines/reference/recursiveFunctionTypes1.js @@ -7,7 +7,6 @@ class C { var C = (function () { function C() { } - C.g = function (t) { - }; + C.g = function (t) { }; return C; })(); diff --git a/tests/baselines/reference/recursiveInferenceBug.js b/tests/baselines/reference/recursiveInferenceBug.js index cffa96415dc..ff9b1c31434 100644 --- a/tests/baselines/reference/recursiveInferenceBug.js +++ b/tests/baselines/reference/recursiveInferenceBug.js @@ -17,8 +17,7 @@ function f(x) { return x; } var zz = { - g: function () { - }, + g: function () { }, get f() { return "abc"; } diff --git a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js index b056e90e909..0d972d3e86c 100644 --- a/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js +++ b/tests/baselines/reference/recursiveTypesUsedAsFunctionParameters.js @@ -59,10 +59,8 @@ function foo(x) { function foo2(x) { } function other() { - function foo3(x) { - } - function foo4(x) { - } + function foo3(x) { } + function foo4(x) { } function foo5(x) { return null; } diff --git a/tests/baselines/reference/restArgAssignmentCompat.js b/tests/baselines/reference/restArgAssignmentCompat.js index a52cff7ec5c..3f8749f332d 100644 --- a/tests/baselines/reference/restArgAssignmentCompat.js +++ b/tests/baselines/reference/restArgAssignmentCompat.js @@ -17,8 +17,7 @@ function f() { } x.forEach(function (n, i) { return void ('item ' + i + ' = ' + n); }); } -function g(x, y) { -} +function g(x, y) { } var n = g; n = f; n([4], 'foo'); diff --git a/tests/baselines/reference/restArgMissingName.js b/tests/baselines/reference/restArgMissingName.js index b87800c7dac..bbd3641478e 100644 --- a/tests/baselines/reference/restArgMissingName.js +++ b/tests/baselines/reference/restArgMissingName.js @@ -3,9 +3,4 @@ function sum (...) {} //// [restArgMissingName.js] -function sum() { - var = []; - for (var _i = 0; _i < arguments.length; _i++) { - [_i - 0] = arguments[_i]; - } -} +function sum() { } diff --git a/tests/baselines/reference/restParamAsOptional.js b/tests/baselines/reference/restParamAsOptional.js index 59aea1cc9c4..717df925f35 100644 --- a/tests/baselines/reference/restParamAsOptional.js +++ b/tests/baselines/reference/restParamAsOptional.js @@ -3,16 +3,5 @@ function f(...x?) { } function f2(...x = []) { } //// [restParamAsOptional.js] -function f() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} -function f2() { - if (x === void 0) { x = []; } - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} +function f() { } +function f2() { } diff --git a/tests/baselines/reference/restParameterNotLast.js b/tests/baselines/reference/restParameterNotLast.js index 791d83849a1..4ca416a47ec 100644 --- a/tests/baselines/reference/restParameterNotLast.js +++ b/tests/baselines/reference/restParameterNotLast.js @@ -2,5 +2,4 @@ function f(...x, y) { } //// [restParameterNotLast.js] -function f(x, y) { -} +function f(x, y) { } diff --git a/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js b/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js index c800c628c9c..30547f3f637 100644 --- a/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js +++ b/tests/baselines/reference/restParameterWithoutAnnotationIsAnyArray.js @@ -28,53 +28,18 @@ var b = { //// [restParameterWithoutAnnotationIsAnyArray.js] // Rest parameters without type annotations are 'any', errors only for the functions with 2 rest params -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -}; -var f2 = function (x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function (x) { }; var C = (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; })(); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }, - a: function foo(x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - } + foo: function () { }, + a: function foo(x) { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParameters.js b/tests/baselines/reference/restParameters.js index 2e5b7bb4c92..f71401d2f18 100644 --- a/tests/baselines/reference/restParameters.js +++ b/tests/baselines/reference/restParameters.js @@ -8,27 +8,7 @@ function f20(a:string, b?:string, ...c:number[]){} function f21(a:string, b?:string, c?:number, ...d:number[]){} //// [restParameters.js] -function f18(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} -function f19(a, b) { - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } -} -function f20(a, b) { - var c = []; - for (var _i = 2; _i < arguments.length; _i++) { - c[_i - 2] = arguments[_i]; - } -} -function f21(a, b, c) { - var d = []; - for (var _i = 3; _i < arguments.length; _i++) { - d[_i - 3] = arguments[_i]; - } -} +function f18(a) { } +function f19(a, b) { } +function f20(a, b) { } +function f21(a, b, c) { } diff --git a/tests/baselines/reference/restParametersOfNonArrayTypes.js b/tests/baselines/reference/restParametersOfNonArrayTypes.js index f6f6a8af44d..b1b2d7d2fb2 100644 --- a/tests/baselines/reference/restParametersOfNonArrayTypes.js +++ b/tests/baselines/reference/restParametersOfNonArrayTypes.js @@ -27,53 +27,18 @@ var b = { //// [restParametersOfNonArrayTypes.js] // Rest parameters must be an array type if they have a type annotation, so all these are errors -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -}; -var f2 = function (x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function (x) { }; var C = (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; })(); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }, - a: function foo(x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - } + foo: function () { }, + a: function foo(x) { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParametersOfNonArrayTypes2.js b/tests/baselines/reference/restParametersOfNonArrayTypes2.js index 73d0ddaeef2..c6ad1f2ce25 100644 --- a/tests/baselines/reference/restParametersOfNonArrayTypes2.js +++ b/tests/baselines/reference/restParametersOfNonArrayTypes2.js @@ -59,103 +59,33 @@ var b2 = { //// [restParametersOfNonArrayTypes2.js] // Rest parameters must be an array type if they have a type annotation, // user defined subtypes of array do not count, all of these are errors -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -}; -var f2 = function (x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function (x) { }; var C = (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; })(); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }, - a: function foo(x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - } -}; -function foo2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} -var f3 = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -}; -var f4 = function (x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } + foo: function () { }, + a: function foo(x) { }, + b: function () { } }; +function foo2() { } +var f3 = function foo() { }; +var f4 = function (x) { }; var C2 = (function () { function C2() { } - C2.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }; + C2.prototype.foo = function () { }; return C2; })(); var a2; var b2 = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }, - a: function foo(x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - } + foo: function () { }, + a: function foo(x) { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js b/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js index c7d1dee9295..a199edea2c6 100644 --- a/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js +++ b/tests/baselines/reference/restParametersWithArrayTypeAnnotations.js @@ -54,103 +54,33 @@ var b2 = { //// [restParametersWithArrayTypeAnnotations.js] // Rest parameters must be an array type if they have a type annotation, errors only for the functions with 2 rest params -function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} -var f = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -}; -var f2 = function (x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } -}; +function foo() { } +var f = function foo() { }; +var f2 = function (x) { }; var C = (function () { function C() { } - C.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }; + C.prototype.foo = function () { }; return C; })(); var a; var b = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }, - a: function foo(x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - } -}; -function foo2() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -} -var f3 = function foo() { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } -}; -var f4 = function (x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } + foo: function () { }, + a: function foo(x) { }, + b: function () { } }; +function foo2() { } +var f3 = function foo() { }; +var f4 = function (x) { }; var C2 = (function () { function C2() { } - C2.prototype.foo = function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }; + C2.prototype.foo = function () { }; return C2; })(); var a2; var b2 = { - foo: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - }, - a: function foo(x) { - var y = []; - for (var _i = 1; _i < arguments.length; _i++) { - y[_i - 1] = arguments[_i]; - } - }, - b: function () { - var x = []; - for (var _i = 0; _i < arguments.length; _i++) { - x[_i - 0] = arguments[_i]; - } - } + foo: function () { }, + a: function foo(x) { }, + b: function () { } }; diff --git a/tests/baselines/reference/restParamsWithNonRestParams.js b/tests/baselines/reference/restParamsWithNonRestParams.js index 6b0caa72394..b58870f1346 100644 --- a/tests/baselines/reference/restParamsWithNonRestParams.js +++ b/tests/baselines/reference/restParamsWithNonRestParams.js @@ -7,24 +7,9 @@ function foo3(a?:string, ...b:number[]){} foo3(); // error but shouldn't be //// [restParamsWithNonRestParams.js] -function foo() { - var b = []; - for (var _i = 0; _i < arguments.length; _i++) { - b[_i - 0] = arguments[_i]; - } -} +function foo() { } foo(); // ok -function foo2(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo2(a) { } foo2(); // should be an error -function foo3(a) { - var b = []; - for (var _i = 1; _i < arguments.length; _i++) { - b[_i - 1] = arguments[_i]; - } -} +function foo3(a) { } foo3(); // error but shouldn't be diff --git a/tests/baselines/reference/returnInConstructor1.js b/tests/baselines/reference/returnInConstructor1.js index 7594821f56c..0096c4d65b6 100644 --- a/tests/baselines/reference/returnInConstructor1.js +++ b/tests/baselines/reference/returnInConstructor1.js @@ -77,32 +77,28 @@ var A = (function () { function A() { return; } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); var B = (function () { function B() { return 1; // error } - B.prototype.foo = function () { - }; + B.prototype.foo = function () { }; return B; })(); var C = (function () { function C() { return this; } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); var D = (function () { function D() { return "test"; // error } - D.prototype.foo = function () { - }; + D.prototype.foo = function () { }; return D; })(); var E = (function () { @@ -121,10 +117,8 @@ var G = (function () { function G() { this.test = 2; } - G.prototype.test1 = function () { - }; - G.prototype.foo = function () { - }; + G.prototype.test1 = function () { }; + G.prototype.foo = function () { }; return G; })(); var H = (function (_super) { diff --git a/tests/baselines/reference/returnStatements.js b/tests/baselines/reference/returnStatements.js index 4894caa47fa..59a91566043 100644 --- a/tests/baselines/reference/returnStatements.js +++ b/tests/baselines/reference/returnStatements.js @@ -59,8 +59,7 @@ function fn8() { var C = (function () { function C() { } - C.prototype.dispose = function () { - }; + C.prototype.dispose = function () { }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/returnTypeParameter.js b/tests/baselines/reference/returnTypeParameter.js index 58667207055..75e8a998942 100644 --- a/tests/baselines/reference/returnTypeParameter.js +++ b/tests/baselines/reference/returnTypeParameter.js @@ -3,8 +3,7 @@ function f(a: T): T { } // error, no return statement function f2(a: T): T { return T; } // bug was that this satisfied the return statement requirement //// [returnTypeParameter.js] -function f(a) { -} // error, no return statement +function f(a) { } // error, no return statement function f2(a) { return T; } // bug was that this satisfied the return statement requirement diff --git a/tests/baselines/reference/scopingInCatchBlocks.js b/tests/baselines/reference/scopingInCatchBlocks.js index 2d3ca7098b5..3121f4e9c79 100644 --- a/tests/baselines/reference/scopingInCatchBlocks.js +++ b/tests/baselines/reference/scopingInCatchBlocks.js @@ -11,17 +11,12 @@ var x = ex1; // should error //// [scopingInCatchBlocks.js] -try { -} +try { } catch (ex1) { throw ex1; } -try { -} -catch (ex1) { -} // should not error -try { -} -catch (ex1) { -} // should not error +try { } +catch (ex1) { } // should not error +try { } +catch (ex1) { } // should not error var x = ex1; // should error diff --git a/tests/baselines/reference/separate1-2.js b/tests/baselines/reference/separate1-2.js index bda277467e8..6ef155ca0f4 100644 --- a/tests/baselines/reference/separate1-2.js +++ b/tests/baselines/reference/separate1-2.js @@ -6,7 +6,6 @@ module X { //// [separate1-2.js] var X; (function (X) { - function f() { - } + function f() { } X.f = f; })(X || (X = {})); diff --git a/tests/baselines/reference/shadowPrivateMembers.js b/tests/baselines/reference/shadowPrivateMembers.js index 3d7e3db7ef1..098a7914a71 100644 --- a/tests/baselines/reference/shadowPrivateMembers.js +++ b/tests/baselines/reference/shadowPrivateMembers.js @@ -13,8 +13,7 @@ var __extends = this.__extends || function (d, b) { var base = (function () { function base() { } - base.prototype.n = function () { - }; + base.prototype.n = function () { }; return base; })(); var derived = (function (_super) { @@ -22,7 +21,6 @@ var derived = (function (_super) { function derived() { _super.apply(this, arguments); } - derived.prototype.n = function () { - }; + derived.prototype.n = function () { }; return derived; })(base); diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js index b360b0e45a7..289d29d02bd 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js @@ -2,6 +2,5 @@ var x = { n() { } }; //// [sourceMapValidationFunctionPropertyAssignment.js] -var x = { n: function () { -} }; +var x = { n: function () { } }; //# sourceMappingURL=sourceMapValidationFunctionPropertyAssignment.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map index cc78ea833bb..9170a8e3a2d 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationFunctionPropertyAssignment.js.map] -{"version":3,"file":"sourceMapValidationFunctionPropertyAssignment.js","sourceRoot":"","sources":["sourceMapValidationFunctionPropertyAssignment.ts"],"names":["n"],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC;AAAKA,CAACA,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationFunctionPropertyAssignment.js","sourceRoot":"","sources":["sourceMapValidationFunctionPropertyAssignment.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC,iBAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt index a1f780ae2fe..1ba2024cee0 100644 --- a/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationFunctionPropertyAssignment.sourcemap.txt @@ -8,39 +8,34 @@ sources: sourceMapValidationFunctionPropertyAssignment.ts emittedFile:tests/cases/compiler/sourceMapValidationFunctionPropertyAssignment.js sourceFile:sourceMapValidationFunctionPropertyAssignment.ts ------------------------------------------------------------------- ->>>var x = { n: function () { +>>>var x = { n: function () { } }; 1 > 2 >^^^^ 3 > ^ 4 > ^^^ 5 > ^^ 6 > ^ +7 > ^^^^^^^^^^^^^^^^^ +8 > ^^ +9 > ^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > 2 >var 3 > x 4 > = 5 > { 6 > n +7 > () { } +8 > } +9 > ; 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) 2 >Emitted(1, 5) Source(1, 5) + SourceIndex(0) 3 >Emitted(1, 6) Source(1, 6) + SourceIndex(0) 4 >Emitted(1, 9) Source(1, 9) + SourceIndex(0) 5 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) 6 >Emitted(1, 12) Source(1, 12) + SourceIndex(0) ---- ->>>} }; -1 > -2 >^ -3 > ^^ -4 > ^ -5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >() { -2 >} -3 > } -4 > ; -1 >Emitted(2, 1) Source(1, 17) + SourceIndex(0) name (n) -2 >Emitted(2, 2) Source(1, 18) + SourceIndex(0) name (n) -3 >Emitted(2, 4) Source(1, 20) + SourceIndex(0) -4 >Emitted(2, 5) Source(1, 21) + SourceIndex(0) +7 >Emitted(1, 29) Source(1, 18) + SourceIndex(0) +8 >Emitted(1, 31) Source(1, 20) + SourceIndex(0) +9 >Emitted(1, 32) Source(1, 21) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationFunctionPropertyAssignment.js.map \ No newline at end of file diff --git a/tests/baselines/reference/specializedOverloadWithRestParameters.js b/tests/baselines/reference/specializedOverloadWithRestParameters.js index 56bf07f6fdf..f091a39677c 100644 --- a/tests/baselines/reference/specializedOverloadWithRestParameters.js +++ b/tests/baselines/reference/specializedOverloadWithRestParameters.js @@ -22,8 +22,7 @@ var __extends = this.__extends || function (d, b) { var Base = (function () { function Base() { } - Base.prototype.foo = function () { - }; + Base.prototype.foo = function () { }; return Base; })(); var Derived1 = (function (_super) { @@ -31,8 +30,7 @@ var Derived1 = (function (_super) { function Derived1() { _super.apply(this, arguments); } - Derived1.prototype.bar = function () { - }; + Derived1.prototype.bar = function () { }; return Derived1; })(Base); function f(tagName) { diff --git a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js index eaf0605ef17..e5e06d48a8d 100644 --- a/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js @@ -69,27 +69,23 @@ var a3: { //// [specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js] // Specialized signatures must be a subtype of a non-specialized signature // All the below should be errors -function foo(x) { -} +function foo(x) { } var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo = function (x) { - }; + C2.prototype.foo = function (x) { }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo = function (x) { - }; + C3.prototype.foo = function (x) { }; return C3; })(); var a; diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js index 882d0da9124..17a886a0784 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.js @@ -84,27 +84,23 @@ var a3: { //// [specializedSignatureIsSubtypeOfNonSpecializedSignature.js] // Specialized signatures must be a subtype of a non-specialized signature // All the below should not be errors -function foo(x) { -} +function foo(x) { } var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo = function (x) { - }; + C2.prototype.foo = function (x) { }; return C2; })(); var C3 = (function () { function C3() { } - C3.prototype.foo = function (x) { - }; + C3.prototype.foo = function (x) { }; return C3; })(); var a; diff --git a/tests/baselines/reference/staticAndMemberFunctions.js b/tests/baselines/reference/staticAndMemberFunctions.js index 0d1d9e81900..71f146b72f7 100644 --- a/tests/baselines/reference/staticAndMemberFunctions.js +++ b/tests/baselines/reference/staticAndMemberFunctions.js @@ -8,9 +8,7 @@ class T { var T = (function () { function T() { } - T.x = function () { - }; - T.prototype.y = function () { - }; + T.x = function () { }; + T.prototype.y = function () { }; return T; })(); diff --git a/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js b/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js index ccfbcc85602..be667ae1f3b 100644 --- a/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js +++ b/tests/baselines/reference/staticAndNonStaticPropertiesSameName.js @@ -11,9 +11,7 @@ class C { var C = (function () { function C() { } - C.prototype.f = function () { - }; - C.f = function () { - }; + C.prototype.f = function () { }; + C.f = function () { }; return C; })(); diff --git a/tests/baselines/reference/staticClassProps.js b/tests/baselines/reference/staticClassProps.js index 3dc7dbb67d0..aad40e29b76 100644 --- a/tests/baselines/reference/staticClassProps.js +++ b/tests/baselines/reference/staticClassProps.js @@ -12,8 +12,7 @@ class C var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; C.z = 1; return C; })(); diff --git a/tests/baselines/reference/staticGetterAndSetter.js b/tests/baselines/reference/staticGetterAndSetter.js index 7c6ef26e739..64fcc134ad9 100644 --- a/tests/baselines/reference/staticGetterAndSetter.js +++ b/tests/baselines/reference/staticGetterAndSetter.js @@ -13,8 +13,7 @@ var Foo = (function () { get: function () { return 0; }, - set: function (n) { - }, + set: function (n) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/staticInheritance.js b/tests/baselines/reference/staticInheritance.js index dfe39119d32..a577bad3a86 100644 --- a/tests/baselines/reference/staticInheritance.js +++ b/tests/baselines/reference/staticInheritance.js @@ -18,8 +18,7 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function doThing(x) { -} +function doThing(x) { } var A = (function () { function A() { this.p = doThing(A); // OK diff --git a/tests/baselines/reference/staticInstanceResolution4.js b/tests/baselines/reference/staticInstanceResolution4.js index 6e81d67dc00..c74030d047e 100644 --- a/tests/baselines/reference/staticInstanceResolution4.js +++ b/tests/baselines/reference/staticInstanceResolution4.js @@ -9,8 +9,7 @@ A.foo(); var A = (function () { function A() { } - A.prototype.foo = function () { - }; + A.prototype.foo = function () { }; return A; })(); A.foo(); diff --git a/tests/baselines/reference/staticInstanceResolution5.js b/tests/baselines/reference/staticInstanceResolution5.js index 6ca976ae46a..843b79ec6f1 100644 --- a/tests/baselines/reference/staticInstanceResolution5.js +++ b/tests/baselines/reference/staticInstanceResolution5.js @@ -19,10 +19,7 @@ function z(w3: WinJS) { } //// [staticInstanceResolution5_1.js] define(["require", "exports"], function (require, exports) { // these 3 should be errors - var x = function (w1) { - }; - var y = function (w2) { - }; - function z(w3) { - } + var x = function (w1) { }; + var y = function (w2) { }; + function z(w3) { } }); diff --git a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js index 062e252b393..edd657d7da1 100644 --- a/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js +++ b/tests/baselines/reference/staticMemberAssignsToConstructorFunctionMembers.js @@ -17,12 +17,10 @@ var C = (function () { function C() { } C.foo = function () { - C.foo = function () { - }; + C.foo = function () { }; }; C.bar = function (x) { - C.bar = function () { - }; // error + C.bar = function () { }; // error C.bar = function (x) { return x; }; // ok C.bar = function (x) { return 1; }; // ok return 1; diff --git a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js index 23e6fa9dd06..7b24a29b326 100644 --- a/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js +++ b/tests/baselines/reference/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js @@ -29,15 +29,13 @@ c = a; var B = (function () { function B() { } - B.prototype.name = function () { - }; + B.prototype.name = function () { }; return B; })(); var C = (function () { function C() { } - C.name = function () { - }; + C.name = function () { }; return C; })(); var a = new B(); diff --git a/tests/baselines/reference/staticMembersUsingClassTypeParameter.js b/tests/baselines/reference/staticMembersUsingClassTypeParameter.js index 1c31ef82d91..0c728cdbab6 100644 --- a/tests/baselines/reference/staticMembersUsingClassTypeParameter.js +++ b/tests/baselines/reference/staticMembersUsingClassTypeParameter.js @@ -20,21 +20,18 @@ class C3 { var C = (function () { function C() { } - C.f = function (x) { - }; + C.f = function (x) { }; return C; })(); var C2 = (function () { function C2() { } - C2.f = function (x) { - }; + C2.f = function (x) { }; return C2; })(); var C3 = (function () { function C3() { } - C3.f = function (x) { - }; + C3.f = function (x) { }; return C3; })(); diff --git a/tests/baselines/reference/staticModifierAlreadySeen.js b/tests/baselines/reference/staticModifierAlreadySeen.js index b097f3924e4..d767a9b51d1 100644 --- a/tests/baselines/reference/staticModifierAlreadySeen.js +++ b/tests/baselines/reference/staticModifierAlreadySeen.js @@ -8,8 +8,7 @@ class C { var C = (function () { function C() { } - C.bar = function () { - }; + C.bar = function () { }; C.foo = 1; return C; })(); diff --git a/tests/baselines/reference/staticOffOfInstance1.js b/tests/baselines/reference/staticOffOfInstance1.js index 41b7cd895bb..58cf24d0529 100644 --- a/tests/baselines/reference/staticOffOfInstance1.js +++ b/tests/baselines/reference/staticOffOfInstance1.js @@ -13,7 +13,6 @@ var List = (function () { List.prototype.Blah = function () { this.Foo(); }; - List.Foo = function () { - }; + List.Foo = function () { }; return List; })(); diff --git a/tests/baselines/reference/staticOffOfInstance2.js b/tests/baselines/reference/staticOffOfInstance2.js index ff139859bf7..ceac77419a4 100644 --- a/tests/baselines/reference/staticOffOfInstance2.js +++ b/tests/baselines/reference/staticOffOfInstance2.js @@ -16,7 +16,6 @@ var List = (function () { this.Foo(); // no error List.Foo(); }; - List.Foo = function () { - }; + List.Foo = function () { }; return List; })(); diff --git a/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js b/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js index 0308805cd7b..50252c606f4 100644 --- a/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js +++ b/tests/baselines/reference/staticPropertyAndFunctionWithSameName.js @@ -18,7 +18,6 @@ var C = (function () { var D = (function () { function D() { } - D.prototype.f = function () { - }; + D.prototype.f = function () { }; return D; })(); diff --git a/tests/baselines/reference/staticPropertyNotInClassType.js b/tests/baselines/reference/staticPropertyNotInClassType.js index 22ff4276deb..3a00c80e033 100644 --- a/tests/baselines/reference/staticPropertyNotInClassType.js +++ b/tests/baselines/reference/staticPropertyNotInClassType.js @@ -54,8 +54,7 @@ var NonGeneric; get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -85,8 +84,7 @@ var Generic; get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/staticPrototypeProperty.js b/tests/baselines/reference/staticPrototypeProperty.js index cfd81bedeec..471ec743b59 100644 --- a/tests/baselines/reference/staticPrototypeProperty.js +++ b/tests/baselines/reference/staticPrototypeProperty.js @@ -11,8 +11,7 @@ class C2 { var C = (function () { function C() { } - C.prototype = function () { - }; + C.prototype = function () { }; return C; })(); var C2 = (function () { diff --git a/tests/baselines/reference/staticsInAFunction.js b/tests/baselines/reference/staticsInAFunction.js index e6959b7757a..e918f4b2901 100644 --- a/tests/baselines/reference/staticsInAFunction.js +++ b/tests/baselines/reference/staticsInAFunction.js @@ -11,6 +11,5 @@ function boo() { test(); test(name, string); test(name ? : any); - { - } + { } } diff --git a/tests/baselines/reference/staticsInConstructorBodies.js b/tests/baselines/reference/staticsInConstructorBodies.js index 044f183b370..bb91b52a18a 100644 --- a/tests/baselines/reference/staticsInConstructorBodies.js +++ b/tests/baselines/reference/staticsInConstructorBodies.js @@ -10,8 +10,7 @@ class C { var C = (function () { function C() { } - C.m1 = function () { - }; // ERROR + C.m1 = function () { }; // ERROR C.p1 = 0; // ERROR return C; })(); diff --git a/tests/baselines/reference/strictMode5.js b/tests/baselines/reference/strictMode5.js index c46de926dbb..8e4021820f1 100644 --- a/tests/baselines/reference/strictMode5.js +++ b/tests/baselines/reference/strictMode5.js @@ -36,8 +36,7 @@ var A = (function () { return _this.n(); }; }; - A.prototype.n = function () { - }; + A.prototype.n = function () { }; return A; })(); function bar(x) { diff --git a/tests/baselines/reference/stringIndexerAndConstructor.js b/tests/baselines/reference/stringIndexerAndConstructor.js index 6d4cc3747c0..db3b9b8770b 100644 --- a/tests/baselines/reference/stringIndexerAndConstructor.js +++ b/tests/baselines/reference/stringIndexerAndConstructor.js @@ -17,7 +17,6 @@ interface I { var C = (function () { function C() { } - C.v = function () { - }; + C.v = function () { }; return C; })(); diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js index ed96311f526..9d70b66887c 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.js @@ -106,8 +106,7 @@ var C = (function () { get: function () { return ''; }, - set: function (v) { - } // ok + set: function (v) { } // ok , enumerable: true, configurable: true @@ -115,8 +114,7 @@ var C = (function () { C.prototype.foo = function () { return ''; }; - C.foo = function () { - }; // ok + C.foo = function () { }; // ok Object.defineProperty(C, "X", { get: function () { return 1; @@ -131,8 +129,7 @@ var a; var b = { a: '', b: 1, - c: function () { - }, + c: function () { }, "d": '', "e": 1, 1.0: '', @@ -143,8 +140,7 @@ var b = { get X() { return ''; }, - set X(v) { - }, + set X(v) { }, foo: function () { return ''; } diff --git a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js index 37aa59bef43..3a6280b15ba 100644 --- a/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js +++ b/tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js @@ -101,24 +101,15 @@ function f16(x: any) { } //// [stringLiteralTypeIsSubtypeOfString.js] // string literal types are subtypes of string, any -function f1(x) { -} -function f2(x) { -} -function f3(x) { -} -function f4(x) { -} -function f5(x) { -} -function f6(x) { -} -function f7(x) { -} -function f8(x) { -} -function f9(x) { -} +function f1(x) { } +function f2(x) { } +function f3(x) { } +function f4(x) { } +function f5(x) { } +function f6(x) { } +function f7(x) { } +function f8(x) { } +function f9(x) { } var C = (function () { function C() { } @@ -185,21 +176,14 @@ var C = (function () { }; return C; })(); -function f10(x) { -} -function f11(x) { -} -function f12(x) { -} -function f13(x) { -} +function f10(x) { } +function f11(x) { } +function f12(x) { } +function f13(x) { } var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f14(x) { -} -function f15(x) { -} -function f16(x) { -} +function f14(x) { } +function f15(x) { } +function f16(x) { } diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js index dc2b2a73412..724c20c6309 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures.js @@ -28,25 +28,18 @@ var b = { //// [stringLiteralTypesInImplementationSignatures.js] // String literal types are only valid in overload signatures -function foo(x) { -} -var f = function foo(x) { -}; -var f2 = function (x, y) { -}; +function foo(x) { } +var f = function foo(x) { }; +var f2 = function (x, y) { }; var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); var a; var b = { - foo: function (x) { - }, - a: function foo(x, y) { - }, - b: function (x) { - } + foo: function (x) { }, + a: function foo(x, y) { }, + b: function (x) { } }; diff --git a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js index 2ecd3330e20..5050709c213 100644 --- a/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js +++ b/tests/baselines/reference/stringLiteralTypesInImplementationSignatures2.js @@ -31,19 +31,15 @@ var b = { //// [stringLiteralTypesInImplementationSignatures2.js] // String literal types are only valid in overload signatures -function foo(x) { -} +function foo(x) { } var C = (function () { function C() { } - C.prototype.foo = function (x) { - }; + C.prototype.foo = function (x) { }; return C; })(); var a; var b = { - foo: function (x) { - }, - foo: function (x) { - } + foo: function (x) { }, + foo: function (x) { } }; diff --git a/tests/baselines/reference/stringPropCodeGen.js b/tests/baselines/reference/stringPropCodeGen.js index 46e1a6eb920..ae8cfa3d5aa 100644 --- a/tests/baselines/reference/stringPropCodeGen.js +++ b/tests/baselines/reference/stringPropCodeGen.js @@ -15,8 +15,7 @@ a.bar.toString(); //// [stringPropCodeGen.js] var a = { - "foo": function () { - }, + "foo": function () { }, "bar": 5 }; a.foo(); diff --git a/tests/baselines/reference/stripInternal1.js b/tests/baselines/reference/stripInternal1.js index 9deadf1fc31..c5d350bcd86 100644 --- a/tests/baselines/reference/stripInternal1.js +++ b/tests/baselines/reference/stripInternal1.js @@ -10,11 +10,9 @@ class C { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; // @internal - C.prototype.bar = function () { - }; + C.prototype.bar = function () { }; return C; })(); diff --git a/tests/baselines/reference/subtypesOfAny.js b/tests/baselines/reference/subtypesOfAny.js index 973db6a9a74..e73a120ed63 100644 --- a/tests/baselines/reference/subtypesOfAny.js +++ b/tests/baselines/reference/subtypesOfAny.js @@ -149,8 +149,7 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/subtypesOfTypeParameter.js b/tests/baselines/reference/subtypesOfTypeParameter.js index a7a31e881fd..5a5a02733ba 100644 --- a/tests/baselines/reference/subtypesOfTypeParameter.js +++ b/tests/baselines/reference/subtypesOfTypeParameter.js @@ -143,8 +143,7 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; @@ -177,10 +176,8 @@ function f2(x, y) { var r5 = true ? x : /1/; var r6 = true ? { foo: 1 } : x; var r6 = true ? x : { foo: 1 }; - var r7 = true ? function () { - } : x; - var r7 = true ? x : function () { - }; + var r7 = true ? function () { } : x; + var r7 = true ? x : function () { }; var r8 = true ? function (x) { return x; } : x; diff --git a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js index bd729f36222..0687a434ae6 100644 --- a/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js +++ b/tests/baselines/reference/subtypesOfTypeParameterWithConstraints2.js @@ -199,8 +199,7 @@ var E; (function (E) { E[E["A"] = 0] = "A"; })(E || (E = {})); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; @@ -246,10 +245,8 @@ function f10(x) { var r6 = true ? x : { foo: 1 }; // ok } function f11(x) { - var r7 = true ? function () { - } : x; // ok - var r7 = true ? x : function () { - }; // ok + var r7 = true ? function () { } : x; // ok + var r7 = true ? x : function () { }; // ok } function f12(x) { var r8 = true ? function (x) { diff --git a/tests/baselines/reference/subtypesOfUnion.js b/tests/baselines/reference/subtypesOfUnion.js index a18ebb944b9..926efc3e921 100644 --- a/tests/baselines/reference/subtypesOfUnion.js +++ b/tests/baselines/reference/subtypesOfUnion.js @@ -68,8 +68,7 @@ var A2 = (function () { } return A2; })(); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.js b/tests/baselines/reference/subtypingWithCallSignatures2.js index a887c52d2a1..e1341914739 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.js +++ b/tests/baselines/reference/subtypingWithCallSignatures2.js @@ -217,8 +217,7 @@ var r2 = foo2(r2arg1); var r2a = [r2arg1, r2arg2]; var r2b = [r2arg2, r2arg1]; var r3arg1 = function (x) { return x; }; -var r3arg2 = function (x) { -}; +var r3arg2 = function (x) { }; var r3 = foo3(r3arg1); var r3a = [r3arg1, r3arg2]; var r3b = [r3arg2, r3arg1]; diff --git a/tests/baselines/reference/subtypingWithCallSignatures4.js b/tests/baselines/reference/subtypingWithCallSignatures4.js index 023b08c6d8d..cbdf92e2e60 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures4.js +++ b/tests/baselines/reference/subtypingWithCallSignatures4.js @@ -156,8 +156,7 @@ var r2 = foo2(r2arg); var r2a = [r2arg, r2arg2]; var r2b = [r2arg2, r2arg]; var r3arg = function (x) { return null; }; -var r3arg2 = function (x) { -}; +var r3arg2 = function (x) { }; var r3 = foo3(r3arg); var r3a = [r3arg, r3arg2]; var r3b = [r3arg2, r3arg]; diff --git a/tests/baselines/reference/superAccess2.js b/tests/baselines/reference/superAccess2.js index 077eefc4e91..7d8f7a9e643 100644 --- a/tests/baselines/reference/superAccess2.js +++ b/tests/baselines/reference/superAccess2.js @@ -34,10 +34,8 @@ var __extends = this.__extends || function (d, b) { var P = (function () { function P() { } - P.prototype.x = function () { - }; - P.y = function () { - }; + P.prototype.x = function () { }; + P.y = function () { }; return P; })(); var Q = (function (_super) { diff --git a/tests/baselines/reference/superCallOutsideConstructor.js b/tests/baselines/reference/superCallOutsideConstructor.js index 32d45b044f5..94f41cccb57 100644 --- a/tests/baselines/reference/superCallOutsideConstructor.js +++ b/tests/baselines/reference/superCallOutsideConstructor.js @@ -32,8 +32,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superCalls.js b/tests/baselines/reference/superCalls.js index e714a4db191..2928793feb6 100644 --- a/tests/baselines/reference/superCalls.js +++ b/tests/baselines/reference/superCalls.js @@ -43,8 +43,7 @@ var Base = (function () { } return Base; })(); -function v() { -} +function v() { } var Derived = (function (_super) { __extends(Derived, _super); //super call in class constructor of derived type diff --git a/tests/baselines/reference/superCallsInConstructor.js b/tests/baselines/reference/superCallsInConstructor.js index 912bfab349b..0c19e365d92 100644 --- a/tests/baselines/reference/superCallsInConstructor.js +++ b/tests/baselines/reference/superCallsInConstructor.js @@ -30,10 +30,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { - }; - C.prototype.bar = function () { - }; + C.prototype.foo = function () { }; + C.prototype.bar = function () { }; return C; })(); var Base = (function () { @@ -49,8 +47,7 @@ var Derived = (function (_super) { _super.call(this); bar(); } - try { - } + try { } catch (e) { _super.call(this); } diff --git a/tests/baselines/reference/superInCatchBlock1.js b/tests/baselines/reference/superInCatchBlock1.js index f94c0511277..1b9085ec266 100644 --- a/tests/baselines/reference/superInCatchBlock1.js +++ b/tests/baselines/reference/superInCatchBlock1.js @@ -23,8 +23,7 @@ var __extends = this.__extends || function (d, b) { var A = (function () { function A() { } - A.prototype.m = function () { - }; + A.prototype.m = function () { }; return A; })(); var B = (function (_super) { diff --git a/tests/baselines/reference/superPropertyAccess.js b/tests/baselines/reference/superPropertyAccess.js index a9ee2352c76..13dfe1ee3a7 100644 --- a/tests/baselines/reference/superPropertyAccess.js +++ b/tests/baselines/reference/superPropertyAccess.js @@ -45,22 +45,19 @@ var __extends = this.__extends || function (d, b) { }; var MyBase = (function () { function MyBase() { - this.m2 = function () { - }; + this.m2 = function () { }; this.d1 = 42; this.d2 = 42; } MyBase.prototype.m1 = function (a) { return a; }; - MyBase.prototype.p1 = function () { - }; + MyBase.prototype.p1 = function () { }; Object.defineProperty(MyBase.prototype, "value", { get: function () { return 0; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/superPropertyAccess1.js b/tests/baselines/reference/superPropertyAccess1.js index 8b1e855e0a3..a0a52526f93 100644 --- a/tests/baselines/reference/superPropertyAccess1.js +++ b/tests/baselines/reference/superPropertyAccess1.js @@ -37,8 +37,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; Object.defineProperty(C.prototype, "x", { get: function () { return 1; @@ -46,8 +45,7 @@ var C = (function () { enumerable: true, configurable: true }); - C.prototype.bar = function () { - }; + C.prototype.bar = function () { }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superPropertyAccess2.js b/tests/baselines/reference/superPropertyAccess2.js index 98beb078e2f..b906f1b0a8b 100644 --- a/tests/baselines/reference/superPropertyAccess2.js +++ b/tests/baselines/reference/superPropertyAccess2.js @@ -37,8 +37,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.foo = function () { - }; + C.foo = function () { }; Object.defineProperty(C.prototype, "x", { get: function () { return 1; @@ -46,8 +45,7 @@ var C = (function () { enumerable: true, configurable: true }); - C.bar = function () { - }; + C.bar = function () { }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/superWithTypeArgument3.js b/tests/baselines/reference/superWithTypeArgument3.js index 8277fe0506e..ef228a3ba20 100644 --- a/tests/baselines/reference/superWithTypeArgument3.js +++ b/tests/baselines/reference/superWithTypeArgument3.js @@ -23,8 +23,7 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C() { } - C.prototype.bar = function (x) { - }; + C.prototype.bar = function (x) { }; return C; })(); var D = (function (_super) { diff --git a/tests/baselines/reference/switchBreakStatements.js b/tests/baselines/reference/switchBreakStatements.js index 810c9909233..534f025e2f5 100644 --- a/tests/baselines/reference/switchBreakStatements.js +++ b/tests/baselines/reference/switchBreakStatements.js @@ -91,8 +91,7 @@ SEVEN: switch ('') { break SEVEN; EIGHT: switch ('') { case 'a': - var fn = function () { - }; + var fn = function () { }; break EIGHT; } } diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js index 6f3d4ed803a..14a7015f803 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js @@ -95,54 +95,43 @@ var arr: any[]; //// [taggedTemplateStringsTypeArgumentInference.js] // Generic tag with one parameter -function noParams(n) { -} +function noParams(n) { } noParams ""; // Generic tag with parameter which does not use type parameter -function noGenericParams(n) { -} +function noGenericParams(n) { } noGenericParams ""; // Generic tag with multiple type parameters and only one used in parameter type annotation -function someGenerics1a(n, m) { -} +function someGenerics1a(n, m) { } someGenerics1a "" + 3; -function someGenerics1b(n, m) { -} +function someGenerics1b(n, m) { } someGenerics1b "" + 3; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs, n) { -} +function someGenerics2a(strs, n) { } someGenerics2a "" + function (n) { return n; }; -function someGenerics2b(strs, n) { -} +function someGenerics2b(strs, n) { } someGenerics2b "" + function (n, x) { return n; }; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs, producer) { -} +function someGenerics3(strs, producer) { } someGenerics3 "" + function () { return ''; }; someGenerics3 "" + function () { return undefined; }; someGenerics3 "" + function () { return 3; }; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs, n, f) { -} +function someGenerics4(strs, n, f) { } someGenerics4 "" + 4 + function () { return null; }; someGenerics4 "" + '' + function () { return 3; }; someGenerics4 "" + null + null; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs, n, f) { -} +function someGenerics5(strs, n, f) { } someGenerics5 4 + " " + function () { return null; }; someGenerics5 "" + '' + function () { return 3; }; someGenerics5 "" + null + null; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs, a, b, c) { -} +function someGenerics6(strs, a, b, c) { } someGenerics6 "" + function (n) { return n; } + function (n) { return n; } + function (n) { return n; }; someGenerics6 "" + function (n) { return n; } + function (n) { return n; } + function (n) { return n; }; someGenerics6 "" + function (n) { return n; } + function (n) { return n; } + function (n) { return n; }; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs, a, b, c) { -} +function someGenerics7(strs, a, b, c) { } someGenerics7 "" + function (n) { return n; } + function (n) { return n; } + function (n) { return n; }; someGenerics7 "" + function (n) { return n; } + function (n) { return n; } + function (n) { return n; }; someGenerics7 "" + function (n) { return n; } + function (n) { return n; } + function (n) { return n; }; diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js index da39703931c..25203c40d91 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInferenceES6.js @@ -94,54 +94,43 @@ var arr: any[]; //// [taggedTemplateStringsTypeArgumentInferenceES6.js] // Generic tag with one parameter -function noParams(n) { -} +function noParams(n) { } noParams ``; // Generic tag with parameter which does not use type parameter -function noGenericParams(n) { -} +function noGenericParams(n) { } noGenericParams ``; // Generic tag with multiple type parameters and only one used in parameter type annotation -function someGenerics1a(n, m) { -} +function someGenerics1a(n, m) { } someGenerics1a `${3}`; -function someGenerics1b(n, m) { -} +function someGenerics1b(n, m) { } someGenerics1b `${3}`; // Generic tag with argument of function type whose parameter is of type parameter type -function someGenerics2a(strs, n) { -} +function someGenerics2a(strs, n) { } someGenerics2a `${(n) => { return n; }}`; -function someGenerics2b(strs, n) { -} +function someGenerics2b(strs, n) { } someGenerics2b `${(n, x) => { return n; }}`; // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(strs, producer) { -} +function someGenerics3(strs, producer) { } someGenerics3 `${() => { return ''; }}`; someGenerics3 `${() => { return undefined; }}`; someGenerics3 `${() => { return 3; }}`; // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(strs, n, f) { -} +function someGenerics4(strs, n, f) { } someGenerics4 `${4}${() => { return null; }}`; someGenerics4 `${''}${() => { return 3; }}`; someGenerics4 `${null}${null}`; // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(strs, n, f) { -} +function someGenerics5(strs, n, f) { } someGenerics5 `${4} ${() => { return null; }}`; someGenerics5 `${''}${() => { return 3; }}`; someGenerics5 `${null}${null}`; // Generic tag with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(strs, a, b, c) { -} +function someGenerics6(strs, a, b, c) { } someGenerics6 `${n => { return n; }}${n => { return n; }}${n => { return n; }}`; someGenerics6 `${n => { return n; }}${n => { return n; }}${n => { return n; }}`; someGenerics6 `${(n) => { return n; }}${(n) => { return n; }}${(n) => { return n; }}`; // Generic tag with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(strs, a, b, c) { -} +function someGenerics7(strs, a, b, c) { } someGenerics7 `${n => { return n; }}${n => { return n; }}${n => { return n; }}`; someGenerics7 `${n => { return n; }}${n => { return n; }}${n => { return n; }}`; someGenerics7 `${(n) => { return n; }}${(n) => { return n; }}${(n) => { return n; }}`; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js index dc8a08b4fc4..a28e0103a7e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js @@ -104,8 +104,7 @@ var s = fn3 "" + '' + '' + ''; var n = fn3 "" + '' + '' + 3; // Generic overloads with differing arity tagging with argument count that doesn't match any overload fn3 ""; // Error -function fn4() { -} +function fn4() { } // Generic overloads with constraints tagged with types that satisfy the constraints fn4 "" + '' + 3; fn4 "" + 3 + ''; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js index eb7086eadec..75a01df6af6 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.js @@ -103,8 +103,7 @@ var s = fn3 `${''}${''}${''}`; var n = fn3 `${''}${''}${3}`; // Generic overloads with differing arity tagging with argument count that doesn't match any overload fn3 ``; // Error -function fn4() { -} +function fn4() { } // Generic overloads with constraints tagged with types that satisfy the constraints fn4 `${''}${3}`; fn4 `${3}${''}`; diff --git a/tests/baselines/reference/targetTypeBaseCalls.js b/tests/baselines/reference/targetTypeBaseCalls.js index d844354b154..b09d4960d01 100644 --- a/tests/baselines/reference/targetTypeBaseCalls.js +++ b/tests/baselines/reference/targetTypeBaseCalls.js @@ -25,8 +25,7 @@ var __extends = this.__extends || function (d, b) { __.prototype = b.prototype; d.prototype = new __(); }; -function foo(x) { -} +function foo(x) { } var Foo = (function () { function Foo(x) { } diff --git a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js index fdfcc5d9522..03e6ddb64d9 100644 --- a/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js +++ b/tests/baselines/reference/thisInArrowFunctionInStaticInitializer1.js @@ -9,8 +9,7 @@ class Vector { } //// [thisInArrowFunctionInStaticInitializer1.js] -function log(a) { -} +function log(a) { } var Vector = (function () { function Vector() { var _this = this; diff --git a/tests/baselines/reference/thisInInvalidContexts.js b/tests/baselines/reference/thisInInvalidContexts.js index 16c40a96e91..f21ebedc1eb 100644 --- a/tests/baselines/reference/thisInInvalidContexts.js +++ b/tests/baselines/reference/thisInInvalidContexts.js @@ -92,8 +92,7 @@ var M; //'this' as type parameter constraint // function fn() { } // Error //'this' as a type argument -function genericFunc(x) { -} +function genericFunc(x) { } genericFunc < this > (undefined); // Should be an error var ErrClass3 = (function () { function ErrClass3() { diff --git a/tests/baselines/reference/thisInInvalidContextsExternalModule.js b/tests/baselines/reference/thisInInvalidContextsExternalModule.js index 19a2854efc7..ee1c5add921 100644 --- a/tests/baselines/reference/thisInInvalidContextsExternalModule.js +++ b/tests/baselines/reference/thisInInvalidContextsExternalModule.js @@ -92,8 +92,7 @@ var M; //'this' as type parameter constraint // function fn() { } // Error //'this' as a type argument -function genericFunc(x) { -} +function genericFunc(x) { } genericFunc < this > (undefined); // Should be an error var ErrClass3 = (function () { function ErrClass3() { diff --git a/tests/baselines/reference/thisInLambda.js b/tests/baselines/reference/thisInLambda.js index 515812b362c..94c86bd5a80 100644 --- a/tests/baselines/reference/thisInLambda.js +++ b/tests/baselines/reference/thisInLambda.js @@ -30,8 +30,7 @@ var Foo = (function () { }; return Foo; })(); -function myFn(a) { -} +function myFn(a) { } var myCls = (function () { function myCls() { var _this = this; diff --git a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js index 4326e58d828..d6718a56106 100644 --- a/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js +++ b/tests/baselines/reference/thisReferencedInFunctionInsideArrowFunction1.js @@ -8,8 +8,7 @@ function test() } //// [thisReferencedInFunctionInsideArrowFunction1.js] -var foo = function (dummy) { -}; +var foo = function (dummy) { }; function test() { foo(function () { return function () { return this; diff --git a/tests/baselines/reference/tooManyTypeParameters1.js b/tests/baselines/reference/tooManyTypeParameters1.js index 3ac7dfacda3..892731cbd43 100644 --- a/tests/baselines/reference/tooManyTypeParameters1.js +++ b/tests/baselines/reference/tooManyTypeParameters1.js @@ -12,11 +12,9 @@ interface I {} var i: I; //// [tooManyTypeParameters1.js] -function f() { -} +function f() { } f(); -var x = function () { -}; +var x = function () { }; x(); var C = (function () { function C() { diff --git a/tests/baselines/reference/topLevelLambda2.js b/tests/baselines/reference/topLevelLambda2.js index 9ff74b74dd7..10059e42efd 100644 --- a/tests/baselines/reference/topLevelLambda2.js +++ b/tests/baselines/reference/topLevelLambda2.js @@ -5,6 +5,5 @@ foo(()=>this.window); //// [topLevelLambda2.js] var _this = this; -function foo(x) { -} +function foo(x) { } foo(function () { return _this.window; }); diff --git a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js index 478c05f5e73..7dd59ee840e 100644 --- a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js +++ b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.js @@ -13,8 +13,7 @@ class arrTest { var arrTest = (function () { function arrTest() { } - arrTest.prototype.test = function (arg1) { - }; + arrTest.prototype.test = function (arg1) { }; arrTest.prototype.callTest = function () { // these two should give the same error this.test([1, 2, "hi", 5,]); diff --git a/tests/baselines/reference/tryCatchFinally.js b/tests/baselines/reference/tryCatchFinally.js index aeda61faca4..b93f248c031 100644 --- a/tests/baselines/reference/tryCatchFinally.js +++ b/tests/baselines/reference/tryCatchFinally.js @@ -6,17 +6,10 @@ try {} catch(e) {} try {} finally {} //// [tryCatchFinally.js] -try { -} -catch (e) { -} -finally { -} -try { -} -catch (e) { -} -try { -} -finally { -} +try { } +catch (e) { } +finally { } +try { } +catch (e) { } +try { } +finally { } diff --git a/tests/baselines/reference/tryStatements.js b/tests/baselines/reference/tryStatements.js index 01d55308d19..723014c1b52 100644 --- a/tests/baselines/reference/tryStatements.js +++ b/tests/baselines/reference/tryStatements.js @@ -18,14 +18,9 @@ function fn() { catch (x) { var x; } - try { - } - finally { - } - try { - } - catch (z) { - } - finally { - } + try { } + finally { } + try { } + catch (z) { } + finally { } } diff --git a/tests/baselines/reference/twoAccessorsWithSameName.js b/tests/baselines/reference/twoAccessorsWithSameName.js index 7ae4d3bd1f9..2d15bf6a02a 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName.js +++ b/tests/baselines/reference/twoAccessorsWithSameName.js @@ -51,8 +51,7 @@ var D = (function () { function D() { } Object.defineProperty(D.prototype, "x", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -65,8 +64,7 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -85,6 +83,5 @@ var y = { get x() { return 1; }, - set x(v) { - } + set x(v) { } }; diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.js b/tests/baselines/reference/twoAccessorsWithSameName2.js index 437fe16cea5..b6ef280156d 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.js +++ b/tests/baselines/reference/twoAccessorsWithSameName2.js @@ -33,8 +33,7 @@ var D = (function () { function D() { } Object.defineProperty(D, "x", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); @@ -47,8 +46,7 @@ var E = (function () { get: function () { return 1; }, - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/typeArgInferenceWithNull.js b/tests/baselines/reference/typeArgInferenceWithNull.js index e54e1dc1630..ed7a50780aa 100644 --- a/tests/baselines/reference/typeArgInferenceWithNull.js +++ b/tests/baselines/reference/typeArgInferenceWithNull.js @@ -13,13 +13,9 @@ fn6({ x: null }, y => { }, { x: "" }); // y has type { x: any }, but ideally wou //// [typeArgInferenceWithNull.js] // All legal -function fn4(n) { -} +function fn4(n) { } fn4(null); -function fn5(n) { -} +function fn5(n) { } fn5({ x: null }); -function fn6(n, fun, n2) { -} -fn6({ x: null }, function (y) { -}, { x: "" }); // y has type { x: any }, but ideally would have type { x: string } +function fn6(n, fun, n2) { } +fn6({ x: null }, function (y) { }, { x: "" }); // y has type { x: any }, but ideally would have type { x: string } diff --git a/tests/baselines/reference/typeArgumentConstraintResolution1.js b/tests/baselines/reference/typeArgumentConstraintResolution1.js index b7476ad2abd..64b1bfe5b6c 100644 --- a/tests/baselines/reference/typeArgumentConstraintResolution1.js +++ b/tests/baselines/reference/typeArgumentConstraintResolution1.js @@ -13,8 +13,7 @@ foo2(""); // Type Date does not satisfy the constraint 'Number' for type p //// [typeArgumentConstraintResolution1.js] -function foo1(test) { -} +function foo1(test) { } foo1(""); // should error function foo2(test) { return null; diff --git a/tests/baselines/reference/typeArgumentInference.js b/tests/baselines/reference/typeArgumentInference.js index 9b37fabd62d..65de6ea071f 100644 --- a/tests/baselines/reference/typeArgumentInference.js +++ b/tests/baselines/reference/typeArgumentInference.js @@ -102,60 +102,50 @@ var arr: any[]; //// [typeArgumentInference.js] // Generic call with no parameters -function noParams() { -} +function noParams() { } noParams(); noParams(); noParams(); // Generic call with parameters but none use type parameter type -function noGenericParams(n) { -} +function noGenericParams(n) { } noGenericParams(''); noGenericParams(''); noGenericParams(''); // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { -} +function someGenerics1(n, m) { } someGenerics1(3, 4); someGenerics1(3, 4); // Generic call with argument of function type whose parameter is of type parameter type -function someGenerics2a(n) { -} +function someGenerics2a(n) { } someGenerics2a(function (n) { return n; }); someGenerics2a(function (n) { return n; }); someGenerics2a(function (n) { return n.substr(0); }); -function someGenerics2b(n) { -} +function someGenerics2b(n) { } someGenerics2b(function (n, x) { return n; }); someGenerics2b(function (n, t) { return n; }); someGenerics2b(function (n, t) { return n.substr(t * t); }); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(producer) { -} +function someGenerics3(producer) { } someGenerics3(function () { return ''; }); someGenerics3(function () { return undefined; }); someGenerics3(function () { return 3; }); // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { -} +function someGenerics4(n, f) { } someGenerics4(4, function () { return null; }); someGenerics4('', function () { return 3; }); someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { -} +function someGenerics5(n, f) { } someGenerics5(4, function () { return null; }); someGenerics5('', function () { return 3; }); someGenerics5(null, null); // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { -} +function someGenerics6(a, b, c) { } someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Generic call with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(a, b, c) { -} +function someGenerics7(a, b, c) { } someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); diff --git a/tests/baselines/reference/typeArgumentInferenceErrors.js b/tests/baselines/reference/typeArgumentInferenceErrors.js index 751190210f9..7ec612d2c7c 100644 --- a/tests/baselines/reference/typeArgumentInferenceErrors.js +++ b/tests/baselines/reference/typeArgumentInferenceErrors.js @@ -18,18 +18,14 @@ someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // //// [typeArgumentInferenceErrors.js] // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { -} +function someGenerics1(n, m) { } someGenerics1(3, 4); // Error // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { -} +function someGenerics4(n, f) { } someGenerics4('', function (x) { return ''; }); // Error // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { -} +function someGenerics5(n, f) { } someGenerics5('', function (x) { return ''; }); // Error // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { -} +function someGenerics6(a, b, c) { } someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js index 713bbf8bcd3..f2300de8144 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.js +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.js @@ -107,65 +107,55 @@ var arr: any[]; //// [typeArgumentInferenceWithConstraints.js] // Generic call with no parameters -function noParams() { -} +function noParams() { } noParams(); noParams(); noParams(); // Generic call with parameters but none use type parameter type -function noGenericParams(n) { -} +function noGenericParams(n) { } noGenericParams(''); // Valid noGenericParams(''); noGenericParams(''); // Error // Generic call with multiple type parameters and only one used in parameter type annotation -function someGenerics1(n, m) { -} +function someGenerics1(n, m) { } someGenerics1(3, 4); // Valid someGenerics1(3, 4); // Error someGenerics1(3, 4); // Error someGenerics1(3, 4); // Generic call with argument of function type whose parameter is of type parameter type -function someGenerics2a(n) { -} +function someGenerics2a(n) { } someGenerics2a(function (n) { return n; }); someGenerics2a(function (n) { return n; }); someGenerics2a(function (n) { return n.substr(0); }); -function someGenerics2b(n) { -} +function someGenerics2b(n) { } someGenerics2b(function (n, x) { return n; }); someGenerics2b(function (n, t) { return n; }); someGenerics2b(function (n, t) { return n.substr(t * t); }); // Generic call with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter -function someGenerics3(producer) { -} +function someGenerics3(producer) { } someGenerics3(function () { return ''; }); // Error someGenerics3(function () { return undefined; }); someGenerics3(function () { return 3; }); // Error // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type -function someGenerics4(n, f) { -} +function someGenerics4(n, f) { } someGenerics4(4, function () { return null; }); // Valid someGenerics4('', function () { return 3; }); someGenerics4('', function (x) { return ''; }); // Error someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type -function someGenerics5(n, f) { -} +function someGenerics5(n, f) { } someGenerics5(4, function () { return null; }); // Valid someGenerics5('', function () { return 3; }); someGenerics5('', function (x) { return ''; }); // Error someGenerics5(null, null); // Error // Generic call with multiple arguments of function types that each have parameters of the same generic type -function someGenerics6(a, b, c) { -} +function someGenerics6(a, b, c) { } someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Valid someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Error someGenerics6(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Generic call with multiple arguments of function types that each have parameters of different generic type -function someGenerics7(a, b, c) { -} +function someGenerics7(a, b, c) { } someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); // Valid, types of n are respectively someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); someGenerics7(function (n) { return n; }, function (n) { return n; }, function (n) { return n; }); diff --git a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js index eeb67b4d3af..8e2445d249c 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js +++ b/tests/baselines/reference/typeArgumentInferenceWithObjectLiteral.js @@ -37,8 +37,7 @@ var v3 = f1({ w: x => x, r: () => E1.X }, E2.X); // Error //// [typeArgumentInferenceWithObjectLiteral.js] -function foo(x) { -} +function foo(x) { } var s; // Calls below should infer string for T and then assign that type to the value parameter foo({ diff --git a/tests/baselines/reference/typeAssertions.js b/tests/baselines/reference/typeAssertions.js index c964ae94958..01acf58227b 100644 --- a/tests/baselines/reference/typeAssertions.js +++ b/tests/baselines/reference/typeAssertions.js @@ -50,10 +50,8 @@ var __extends = this.__extends || function (d, b) { d.prototype = new __(); }; // Function call whose argument is a 1 arg generic function call with explicit type arguments -function fn1(t) { -} -function fn2(t) { -} +function fn1(t) { } +function fn2(t) { } fn1(fn2(4)); // Error var a; var s; diff --git a/tests/baselines/reference/typeCheckTypeArgument.js b/tests/baselines/reference/typeCheckTypeArgument.js index 720ee92a966..bec33393f92 100644 --- a/tests/baselines/reference/typeCheckTypeArgument.js +++ b/tests/baselines/reference/typeCheckTypeArgument.js @@ -23,14 +23,11 @@ var Foo = (function () { } return Foo; })(); -function bar() { -} +function bar() { } var Foo2 = (function () { function Foo2() { } - Foo2.prototype.method = function () { - }; + Foo2.prototype.method = function () { }; return Foo2; })(); -(function (a) { -}); +(function (a) { }); diff --git a/tests/baselines/reference/typeIdentityConsidersBrands.js b/tests/baselines/reference/typeIdentityConsidersBrands.js index 002364a2e03..2398033c2c6 100644 --- a/tests/baselines/reference/typeIdentityConsidersBrands.js +++ b/tests/baselines/reference/typeIdentityConsidersBrands.js @@ -53,15 +53,13 @@ var Y_1 = (function () { } return Y_1; })(); -function foo(arg) { -} +function foo(arg) { } var a = new Y(); var b = new X(); a = b; // ok foo(a); // ok var a2 = new Y_1(); var b2 = new X_1(); -function foo2(arg) { -} +function foo2(arg) { } a2 = b2; // should error foo2(a2); // should error diff --git a/tests/baselines/reference/typeInfer1.js b/tests/baselines/reference/typeInfer1.js index bab1ebf930c..f0b14a6b6c9 100644 --- a/tests/baselines/reference/typeInfer1.js +++ b/tests/baselines/reference/typeInfer1.js @@ -15,10 +15,8 @@ var yyyyyyyy: ITextWriter2 = { //// [typeInfer1.js] var x = { - Write: function (s) { - }, - WriteLine: function (s) { - } + Write: function (s) { }, + WriteLine: function (s) { } }; var yyyyyyyy = { Moo: function () { diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js index 9612aa7be51..20cadec3981 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively.js @@ -38,10 +38,7 @@ foo(1, 2, 3); foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: '', z: true }); foo(a, b, c); foo(a, b, { foo: 1, bar: '', hm: true }); -foo(function (x, y) { -}, function (x) { -}, function () { -}); +foo(function (x, y) { }, function (x) { }, function () { }); function foo2(x, y, z) { return z; } diff --git a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js index 3c9f3d959cd..c63c1e9e13a 100644 --- a/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js +++ b/tests/baselines/reference/typeParameterAsTypeParameterConstraintTransitively2.js @@ -37,10 +37,7 @@ foo(1, 2, ''); foo({ x: 1 }, { x: 1, y: '' }, { x: 2, y: 2, z: true }); foo(a, b, a); foo(a, { foo: 1, bar: '', hm: true }, b); -foo(function (x, y) { -}, function (x, y) { -}, function () { -}); +foo(function (x, y) { }, function (x, y) { }, function () { }); function foo2(x, y, z) { return z; } diff --git a/tests/baselines/reference/typeParameterConstraints1.js b/tests/baselines/reference/typeParameterConstraints1.js index 49d347f576b..6ffefbcf8f1 100644 --- a/tests/baselines/reference/typeParameterConstraints1.js +++ b/tests/baselines/reference/typeParameterConstraints1.js @@ -14,29 +14,16 @@ function foo12(test: T) { } function foo13(test: T) { } //// [typeParameterConstraints1.js] -function foo1(test) { -} -function foo2(test) { -} -function foo3(test) { -} -function foo4(test) { -} // valid -function foo5(test) { -} // valid -function foo6(test) { -} -function foo7(test) { -} // valid -function foo8(test) { -} -function foo9(test) { -} -function foo10(test) { -} -function foo11(test) { -} -function foo12(test) { -} -function foo13(test) { -} +function foo1(test) { } +function foo2(test) { } +function foo3(test) { } +function foo4(test) { } // valid +function foo5(test) { } // valid +function foo6(test) { } +function foo7(test) { } // valid +function foo8(test) { } +function foo9(test) { } +function foo10(test) { } +function foo11(test) { } +function foo12(test) { } +function foo13(test) { } diff --git a/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js b/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js index 85f86f7de76..a14e010515b 100644 --- a/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js +++ b/tests/baselines/reference/typeParameterDirectlyConstrainedToItself.js @@ -30,12 +30,8 @@ var C2 = (function () { } return C2; })(); -function f() { -} -function f2() { -} +function f() { } +function f2() { } var a; -var b = function () { -}; -var b2 = function () { -}; +var b = function () { }; +var b2 = function () { }; diff --git a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js index fc0e10d41c9..3cdb735adfb 100644 --- a/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js +++ b/tests/baselines/reference/typeParameterIndirectlyConstrainedToItself.js @@ -29,15 +29,11 @@ var C2 = (function () { } return C2; })(); -function f() { -} -function f2() { -} +function f() { } +function f2() { } var a; -var b = function () { -}; -var b2 = function () { -}; +var b = function () { }; +var b2 = function () { }; var D = (function () { function D() { } diff --git a/tests/baselines/reference/typeParameterOrderReversal.js b/tests/baselines/reference/typeParameterOrderReversal.js index 8c9185ba57c..40df6db0034 100644 --- a/tests/baselines/reference/typeParameterOrderReversal.js +++ b/tests/baselines/reference/typeParameterOrderReversal.js @@ -15,10 +15,8 @@ tFirst(z); //// [typeParameterOrderReversal.js] // Only difference here is order of type parameters -function uFirst(x) { -} -function tFirst(x) { -} +function uFirst(x) { } +function tFirst(x) { } var z = null; // Both of these should be allowed uFirst(z); diff --git a/tests/baselines/reference/typeParameterUsedAsConstraint.js b/tests/baselines/reference/typeParameterUsedAsConstraint.js index 4649a53f8fc..b1c55343aa0 100644 --- a/tests/baselines/reference/typeParameterUsedAsConstraint.js +++ b/tests/baselines/reference/typeParameterUsedAsConstraint.js @@ -66,30 +66,18 @@ var C6 = (function () { } return C6; })(); -function f() { -} -function f2() { -} -function f3() { -} -function f4() { -} -function f5() { -} -function f6() { -} -var e = function () { -}; -var e2 = function () { -}; -var e3 = function () { -}; -var e4 = function () { -}; -var e5 = function () { -}; -var e6 = function () { -}; +function f() { } +function f2() { } +function f3() { } +function f4() { } +function f5() { } +function f6() { } +var e = function () { }; +var e2 = function () { }; +var e3 = function () { }; +var e4 = function () { }; +var e5 = function () { }; +var e6 = function () { }; var a; var a2; var a3; diff --git a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js index a2f8aa2f9b7..c6c624f7e2b 100644 --- a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js +++ b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.js @@ -78,37 +78,26 @@ interface I2 { //// [typeParametersAreIdenticalToThemselves.js] // type parameters from the same declaration are identical to themself -function foo1(x) { -} -function foo2(x) { -} +function foo1(x) { } +function foo2(x) { } function foo3(x, y) { - function inner(x) { - } - function inner2(x) { - } + function inner(x) { } + function inner2(x) { } } var C = (function () { function C() { } - C.prototype.foo1 = function (x) { - }; - C.prototype.foo2 = function (a, x) { - }; - C.prototype.foo3 = function (x) { - }; - C.prototype.foo4 = function (x) { - }; + C.prototype.foo1 = function (x) { }; + C.prototype.foo2 = function (a, x) { }; + C.prototype.foo3 = function (x) { }; + C.prototype.foo4 = function (x) { }; return C; })(); var C2 = (function () { function C2() { } - C2.prototype.foo1 = function (x) { - }; - C2.prototype.foo2 = function (a, x) { - }; - C2.prototype.foo3 = function (x) { - }; + C2.prototype.foo1 = function (x) { }; + C2.prototype.foo2 = function (a, x) { }; + C2.prototype.foo3 = function (x) { }; return C2; })(); diff --git a/tests/baselines/reference/typeParametersInStaticAccessors.js b/tests/baselines/reference/typeParametersInStaticAccessors.js index 411a4eac69d..2f9d8c795ff 100644 --- a/tests/baselines/reference/typeParametersInStaticAccessors.js +++ b/tests/baselines/reference/typeParametersInStaticAccessors.js @@ -16,8 +16,7 @@ var foo = (function () { configurable: true }); Object.defineProperty(foo, "Bar", { - set: function (v) { - }, + set: function (v) { }, enumerable: true, configurable: true }); diff --git a/tests/baselines/reference/typeQueryOnClass.js b/tests/baselines/reference/typeQueryOnClass.js index 08fea6567fc..5c881a5ced3 100644 --- a/tests/baselines/reference/typeQueryOnClass.js +++ b/tests/baselines/reference/typeQueryOnClass.js @@ -64,10 +64,8 @@ var C = (function () { this.ia = 1; this.ib = function () { return _this.ia; }; } - C.foo = function (x) { - }; - C.bar = function (x) { - }; + C.foo = function (x) { }; + C.bar = function (x) { }; Object.defineProperty(C, "sc", { get: function () { return 1; @@ -115,8 +113,7 @@ var D = (function () { function D(y) { this.y = y; } - D.prototype.foo = function () { - }; + D.prototype.foo = function () { }; return D; })(); var d; diff --git a/tests/baselines/reference/typeResolution.js b/tests/baselines/reference/typeResolution.js index 74102f5a0fd..55a6beeceba 100644 --- a/tests/baselines/reference/typeResolution.js +++ b/tests/baselines/reference/typeResolution.js @@ -224,24 +224,21 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn1_2_2 = function () { - }; + ClassA.prototype.AisIn1_2_2 = function () { }; return ClassA; })(); SubSubModule2.ClassA = ClassA; var ClassB = (function () { function ClassB() { } - ClassB.prototype.BisIn1_2_2 = function () { - }; + ClassB.prototype.BisIn1_2_2 = function () { }; return ClassB; })(); SubSubModule2.ClassB = ClassB; var ClassC = (function () { function ClassC() { } - ClassC.prototype.CisIn1_2_2 = function () { - }; + ClassC.prototype.CisIn1_2_2 = function () { }; return ClassC; })(); SubSubModule2.ClassC = ClassC; @@ -250,8 +247,7 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn1 = function () { - }; + ClassA.prototype.AisIn1 = function () { }; return ClassA; })(); var NotExportedModule; @@ -271,8 +267,7 @@ define(["require", "exports"], function (require, exports) { var ClassA = (function () { function ClassA() { } - ClassA.prototype.AisIn2_3 = function () { - }; + ClassA.prototype.AisIn2_3 = function () { }; return ClassA; })(); SubModule3.ClassA = ClassA; diff --git a/tests/baselines/reference/typeResolution.js.map b/tests/baselines/reference/typeResolution.js.map index b030021a205..a39fb49d634 100644 --- a/tests/baselines/reference/typeResolution.js.map +++ b/tests/baselines/reference/typeResolution.js.map @@ -1,2 +1,2 @@ //// [typeResolution.js.map] -{"version":3,"file":"typeResolution.js","sourceRoot":"","sources":["typeResolution.ts"],"names":["TopLevelModule1","TopLevelModule1.SubModule1","TopLevelModule1.SubModule1.SubSubModule1","TopLevelModule1.SubModule1.SubSubModule1.ClassA","TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.ClassB","TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ","TopLevelModule1.SubModule1.ClassA","TopLevelModule1.SubModule1.ClassA.constructor","TopLevelModule1.SubModule1.ClassA.constructor.AA","TopLevelModule1.SubModule2","TopLevelModule1.SubModule2.SubSubModule2","TopLevelModule1.SubModule2.SubSubModule2.ClassA","TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassB","TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2","TopLevelModule1.SubModule2.SubSubModule2.ClassC","TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2","TopLevelModule1.ClassA","TopLevelModule1.ClassA.constructor","TopLevelModule1.ClassA.AisIn1","TopLevelModule1.NotExportedModule","TopLevelModule1.NotExportedModule.ClassA","TopLevelModule1.NotExportedModule.ClassA.constructor","TopLevelModule2","TopLevelModule2.SubModule3","TopLevelModule2.SubModule3.ClassA","TopLevelModule2.SubModule3.ClassA.constructor","TopLevelModule2.SubModule3.ClassA.AisIn2_3"],"mappings":";IAAA,IAAc,eAAe,CAmG5B;IAnGD,WAAc,eAAe,EAAC,CAAC;QAC3BA,IAAcA,UAAUA,CAwEvBA;QAxEDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAcA,aAAaA,CAwD1BA;YAxDDA,WAAcA,aAAaA,EAACA,CAACA;gBACzBC,IAAaA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAmBnBC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,GAANA,MAmBZA,CAAAA;gBACDA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAsBnBC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,GAANA,MAsBZA,CAAAA;gBAEDA,IAAMA,iBAAiBA;oBACnBO,SADEA,iBAAiBA;wBAEfC,SAASA,EAAEA;4BAEPC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAGDA,AADAA,0EAA0EA;gBACpEA,MAAMA;gBACRW,SADEA,MAAMA;oBAEJC,SAASA,EAAEA;wBACPC,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAEDA,IAAcA,UAAUA,CAWvBA;QAXDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,IAAcA,aAAaA,CAO1BA;YAPDA,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;oBAChDA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CJ,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBO,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA;oBAAsBE,CAACA;oBAACF,aAACA;gBAADA,CAACA,AAA/CP,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAE0CA,JAC/CA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA,IAAMA,MAAMA;YAAZ0B,SAAMA,MAAMA;YAEZC,CAACA;YADUD,uBAAMA,GAAbA;YAAkBE,CAACA;YACvBF,aAACA;QAADA,CAACA,AAFD1B,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtB6B,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAAGC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,GAANA,MAAUA,CAAAA;QAC3BA,CAACA,EAFM7B,iBAAiBA,KAAjBA,iBAAiBA,QAEvBA;IACLA,CAACA,EAnGa,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAmG5B;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpBgC,IAAcA,UAAUA,CAIvBA;QAJDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAEnBC,CAACA;gBADUD,yBAAQA,GAAfA;gBAAoBE,CAACA;gBACzBF,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,GAANA,MAEZA,CAAAA;QACLA,CAACA,EAJaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAIvBA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file +{"version":3,"file":"typeResolution.js","sourceRoot":"","sources":["typeResolution.ts"],"names":["TopLevelModule1","TopLevelModule1.SubModule1","TopLevelModule1.SubModule1.SubSubModule1","TopLevelModule1.SubModule1.SubSubModule1.ClassA","TopLevelModule1.SubModule1.SubSubModule1.ClassA.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassA.AisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.ClassB","TopLevelModule1.SubModule1.SubSubModule1.ClassB.constructor","TopLevelModule1.SubModule1.SubSubModule1.ClassB.BisIn1_1_1","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor","TopLevelModule1.SubModule1.SubSubModule1.NonExportedClassQ.constructor.QQ","TopLevelModule1.SubModule1.ClassA","TopLevelModule1.SubModule1.ClassA.constructor","TopLevelModule1.SubModule1.ClassA.constructor.AA","TopLevelModule1.SubModule2","TopLevelModule1.SubModule2.SubSubModule2","TopLevelModule1.SubModule2.SubSubModule2.ClassA","TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassB","TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor","TopLevelModule1.SubModule2.SubSubModule2.ClassC","TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor","TopLevelModule1.ClassA","TopLevelModule1.ClassA.constructor","TopLevelModule1.NotExportedModule","TopLevelModule1.NotExportedModule.ClassA","TopLevelModule1.NotExportedModule.ClassA.constructor","TopLevelModule2","TopLevelModule2.SubModule3","TopLevelModule2.SubModule3.ClassA","TopLevelModule2.SubModule3.ClassA.constructor"],"mappings":";IAAA,IAAc,eAAe,CAmG5B;IAnGD,WAAc,eAAe,EAAC,CAAC;QAC3BA,IAAcA,UAAUA,CAwEvBA;QAxEDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAcA,aAAaA,CAwD1BA;YAxDDA,WAAcA,aAAaA,EAACA,CAACA;gBACzBC,IAAaA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAmBnBC,CAACA;oBAlBUD,2BAAUA,GAAjBA;wBAEIE,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAnBDD,IAmBCA;gBAnBYA,oBAAMA,GAANA,MAmBZA,CAAAA;gBACDA,IAAaA,MAAMA;oBAAnBI,SAAaA,MAAMA;oBAsBnBC,CAACA;oBArBUD,2BAAUA,GAAjBA;wBACIE,+CAA+CA;wBAG/CA,AADAA,uCAAuCA;4BACnCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,yCAAyCA;4BACrCA,EAAUA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAChCA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,qCAAqCA;4BACjCA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzEA,IAAIA,EAAqCA,CAACA;wBAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAGzDA,AADAA,sBAAsBA;4BAClBA,EAAcA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACpCA,IAAIA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;oBACLF,aAACA;gBAADA,CAACA,AAtBDJ,IAsBCA;gBAtBYA,oBAAMA,GAANA,MAsBZA,CAAAA;gBAEDA,IAAMA,iBAAiBA;oBACnBO,SADEA,iBAAiBA;wBAEfC,SAASA,EAAEA;4BAEPC,AADAA,uCAAuCA;gCACnCA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAmDA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACzEA,IAAIA,EAAcA,CAACA;4BAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;4BACpCA,IAAIA,EAAqCA,CAACA;4BAACA,EAAEA,CAACA,QAAQA,EAAEA,CAACA;wBAC7DA,CAACA;oBACLD,CAACA;oBACLD,wBAACA;gBAADA,CAACA,AAVDP,IAUCA;YACLA,CAACA,EAxDaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAwD1BA;YAGDA,AADAA,0EAA0EA;gBACpEA,MAAMA;gBACRW,SADEA,MAAMA;oBAEJC,SAASA,EAAEA;wBACPC,IAAIA,EAAwBA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAC9CA,IAAIA,EAAmCA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBACzDA,IAAIA,EAAmDA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;wBAGzEA,AADAA,sBAAsBA;4BAClBA,EAA4BA,CAACA;wBAACA,EAAEA,CAACA,UAAUA,EAAEA,CAACA;oBACtDA,CAACA;gBACLD,CAACA;gBACLD,aAACA;YAADA,CAACA,AAXDX,IAWCA;QACLA,CAACA,EAxEaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAwEvBA;QAEDA,IAAcA,UAAUA,CAWvBA;QAXDA,WAAcA,UAAUA,EAACA,CAACA;YACtBe,IAAcA,aAAaA,CAO1BA;YAPDA,WAAcA,aAAaA,EAACA,CAACA;gBAEzBC,AADAA,6DAA6DA;oBAChDA,MAAMA;oBAAnBC,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA,eAAuBA;oBAACA,aAACA;gBAADA,CAACA,AAA/CD,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBG,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA,eAAuBA;oBAACA,aAACA;gBAADA,CAACA,AAA/CH,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAC/CA,IAAaA,MAAMA;oBAAnBK,SAAaA,MAAMA;oBAA2BC,CAACA;oBAAlBD,2BAAUA,GAAjBA,eAAuBA;oBAACA,aAACA;gBAADA,CAACA,AAA/CL,IAA+CA;gBAAlCA,oBAAMA,GAANA,MAAkCA,CAAAA;gBAEZA,JACvCA,CAACA,EAPaD,aAAaA,GAAbA,wBAAaA,KAAbA,wBAAaA,QAO1BA;YAE0CA,JAC/CA,CAACA,EAXaf,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAWvBA;QAEDA,IAAMA,MAAMA;YAAZuB,SAAMA,MAAMA;YAEZC,CAACA;YADUD,uBAAMA,GAAbA,eAAmBA;YACvBA,aAACA;QAADA,CAACA,AAFDvB,IAECA;QAMDA,IAAOA,iBAAiBA,CAEvBA;QAFDA,WAAOA,iBAAiBA,EAACA,CAACA;YACtByB,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAAGC,CAACA;gBAADD,aAACA;YAADA,CAACA,AAAvBD,IAAuBA;YAAVA,wBAAMA,GAANA,MAAUA,CAAAA;QAC3BA,CAACA,EAFMzB,iBAAiBA,KAAjBA,iBAAiBA,QAEvBA;IACLA,CAACA,EAnGa,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAmG5B;IAED,IAAO,eAAe,CAMrB;IAND,WAAO,eAAe,EAAC,CAAC;QACpB4B,IAAcA,UAAUA,CAIvBA;QAJDA,WAAcA,UAAUA,EAACA,CAACA;YACtBC,IAAaA,MAAMA;gBAAnBC,SAAaA,MAAMA;gBAEnBC,CAACA;gBADUD,yBAAQA,GAAfA,eAAqBA;gBACzBA,aAACA;YAADA,CAACA,AAFDD,IAECA;YAFYA,iBAAMA,GAANA,MAEZA,CAAAA;QACLA,CAACA,EAJaD,UAAUA,GAAVA,0BAAUA,KAAVA,0BAAUA,QAIvBA;IACLA,CAACA,EANM,eAAe,KAAf,eAAe,QAMrB"} \ No newline at end of file diff --git a/tests/baselines/reference/typeResolution.sourcemap.txt b/tests/baselines/reference/typeResolution.sourcemap.txt index 0c5e2c3b0a9..08cb4a873d0 100644 --- a/tests/baselines/reference/typeResolution.sourcemap.txt +++ b/tests/baselines/reference/typeResolution.sourcemap.txt @@ -2256,39 +2256,33 @@ sourceFile:typeResolution.ts >>> } 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { public AisIn1_2_2() { } 2 > } 1 >Emitted(113, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) 2 >Emitted(113, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.constructor) --- ->>> ClassA.prototype.AisIn1_2_2 = function () { +>>> ClassA.prototype.AisIn1_2_2 = function () { }; 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ +4 > ^^^^^^^^^^^^^^^ 1-> 2 > AisIn1_2_2 3 > +4 > public AisIn1_2_2() { } 1->Emitted(114, 21) Source(79, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) 2 >Emitted(114, 48) Source(79, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) 3 >Emitted(114, 51) Source(79, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) ---- ->>> }; -1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 >public AisIn1_2_2() { -2 > } -1 >Emitted(115, 21) Source(79, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) -2 >Emitted(115, 22) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA.AisIn1_2_2) +4 >Emitted(114, 66) Source(79, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> return ClassA; -1->^^^^^^^^^^^^^^^^^^^^ +1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1-> +1 > 2 > } -1->Emitted(116, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(116, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +1 >Emitted(115, 21) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(115, 34) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2300,10 +2294,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { public AisIn1_2_2() { } } -1 >Emitted(117, 17) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -2 >Emitted(117, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) -3 >Emitted(117, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(117, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(116, 17) Source(79, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +2 >Emitted(116, 18) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassA) +3 >Emitted(116, 18) Source(79, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(116, 22) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassA = ClassA; 1->^^^^^^^^^^^^^^^^ @@ -2316,11 +2310,11 @@ sourceFile:typeResolution.ts 3 > 4 > ClassA { public AisIn1_2_2() { } } 5 > -1->Emitted(118, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(118, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(118, 40) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(118, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(118, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(117, 17) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(117, 37) Source(79, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(117, 40) Source(79, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(117, 46) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +5 >Emitted(117, 47) Source(79, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassB = (function () { 1 >^^^^^^^^^^^^^^^^ @@ -2331,9 +2325,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassB -1 >Emitted(119, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(119, 21) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(119, 27) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(118, 17) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(118, 21) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(118, 27) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassB() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2342,46 +2336,40 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassB -1->Emitted(120, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(120, 30) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(120, 36) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1->Emitted(119, 21) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(119, 30) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(119, 36) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { public BisIn1_2_2() { } 2 > } -1 >Emitted(121, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) -2 >Emitted(121, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +1 >Emitted(120, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) +2 >Emitted(120, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.constructor) --- ->>> ClassB.prototype.BisIn1_2_2 = function () { +>>> ClassB.prototype.BisIn1_2_2 = function () { }; 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ +4 > ^^^^^^^^^^^^^^^ 1-> 2 > BisIn1_2_2 3 > -1->Emitted(122, 21) Source(80, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(122, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(122, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) ---- ->>> }; -1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 >public BisIn1_2_2() { -2 > } -1 >Emitted(123, 21) Source(80, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) -2 >Emitted(123, 22) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB.BisIn1_2_2) +4 > public BisIn1_2_2() { } +1->Emitted(121, 21) Source(80, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(121, 48) Source(80, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(121, 51) Source(80, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +4 >Emitted(121, 66) Source(80, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> return ClassB; -1->^^^^^^^^^^^^^^^^^^^^ +1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1-> +1 > 2 > } -1->Emitted(124, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(124, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +1 >Emitted(122, 21) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(122, 34) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2393,10 +2381,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassB { public BisIn1_2_2() { } } -1 >Emitted(125, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -2 >Emitted(125, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) -3 >Emitted(125, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(125, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(123, 17) Source(80, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +2 >Emitted(123, 18) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassB) +3 >Emitted(123, 18) Source(80, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(123, 22) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassB = ClassB; 1->^^^^^^^^^^^^^^^^ @@ -2409,11 +2397,11 @@ sourceFile:typeResolution.ts 3 > 4 > ClassB { public BisIn1_2_2() { } } 5 > -1->Emitted(126, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(126, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(126, 40) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(126, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(126, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(124, 17) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(124, 37) Source(80, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(124, 40) Source(80, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(124, 46) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +5 >Emitted(124, 47) Source(80, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> var ClassC = (function () { 1 >^^^^^^^^^^^^^^^^ @@ -2424,9 +2412,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassC -1 >Emitted(127, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(127, 21) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(127, 27) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(125, 17) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(125, 21) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(125, 27) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> function ClassC() { 1->^^^^^^^^^^^^^^^^^^^^ @@ -2435,46 +2423,40 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassC -1->Emitted(128, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(128, 30) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(128, 36) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1->Emitted(126, 21) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(126, 30) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(126, 36) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> } 1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { public CisIn1_2_2() { } 2 > } -1 >Emitted(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) -2 >Emitted(129, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +1 >Emitted(127, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) +2 >Emitted(127, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.constructor) --- ->>> ClassC.prototype.CisIn1_2_2 = function () { +>>> ClassC.prototype.CisIn1_2_2 = function () { }; 1->^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ +4 > ^^^^^^^^^^^^^^^ 1-> 2 > CisIn1_2_2 3 > -1->Emitted(130, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(130, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(130, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) ---- ->>> }; -1 >^^^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 >public CisIn1_2_2() { -2 > } -1 >Emitted(131, 21) Source(81, 57) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) -2 >Emitted(131, 22) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC.CisIn1_2_2) +4 > public CisIn1_2_2() { } +1->Emitted(128, 21) Source(81, 42) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(128, 48) Source(81, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(128, 51) Source(81, 35) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +4 >Emitted(128, 66) Source(81, 58) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> return ClassC; -1->^^^^^^^^^^^^^^^^^^^^ +1 >^^^^^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1-> +1 > 2 > } -1->Emitted(132, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(132, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +1 >Emitted(129, 21) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(129, 34) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) --- >>> })(); 1 >^^^^^^^^^^^^^^^^ @@ -2486,10 +2468,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassC { public CisIn1_2_2() { } } -1 >Emitted(133, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -2 >Emitted(133, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) -3 >Emitted(133, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(133, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1 >Emitted(130, 17) Source(81, 59) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +2 >Emitted(130, 18) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2.ClassC) +3 >Emitted(130, 18) Source(81, 13) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(130, 22) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> SubSubModule2.ClassC = ClassC; 1->^^^^^^^^^^^^^^^^ @@ -2503,11 +2485,11 @@ sourceFile:typeResolution.ts 3 > 4 > ClassC { public CisIn1_2_2() { } } 5 > -1->Emitted(134, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(134, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(134, 40) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(134, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -5 >Emitted(134, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +1->Emitted(131, 17) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(131, 37) Source(81, 32) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(131, 40) Source(81, 26) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(131, 46) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +5 >Emitted(131, 47) Source(81, 60) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) --- >>> })(SubSubModule2 = SubModule2.SubSubModule2 || (SubModule2.SubSubModule2 = {})); 1->^^^^^^^^^^^^^^^^ @@ -2540,16 +2522,16 @@ sourceFile:typeResolution.ts > export interface InterfaceY { YisIn1_2_2(); } > interface NonExportedInterfaceQ { } > } -1->Emitted(135, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -2 >Emitted(135, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -3 >Emitted(135, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) -4 >Emitted(135, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -5 >Emitted(135, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -6 >Emitted(135, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -7 >Emitted(135, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -8 >Emitted(135, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) -9 >Emitted(135, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) -10>Emitted(135, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) +1->Emitted(132, 17) Source(83, 48) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +2 >Emitted(132, 13) Source(84, 9) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +3 >Emitted(132, 14) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2.SubSubModule2) +4 >Emitted(132, 16) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +5 >Emitted(132, 29) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +6 >Emitted(132, 32) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +7 >Emitted(132, 56) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +8 >Emitted(132, 61) Source(77, 23) + SourceIndex(0) name (TopLevelModule1.SubModule2) +9 >Emitted(132, 85) Source(77, 36) + SourceIndex(0) name (TopLevelModule1.SubModule2) +10>Emitted(132, 93) Source(84, 10) + SourceIndex(0) name (TopLevelModule1.SubModule2) --- >>> })(SubModule2 = TopLevelModule1.SubModule2 || (TopLevelModule1.SubModule2 = {})); 1 >^^^^^^^^^^^^ @@ -2586,16 +2568,16 @@ sourceFile:typeResolution.ts > > export interface InterfaceY { YisIn1_2(); } > } -1 >Emitted(136, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) -2 >Emitted(136, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) -3 >Emitted(136, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) -4 >Emitted(136, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(136, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(136, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(136, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -8 >Emitted(136, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) -9 >Emitted(136, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) -10>Emitted(136, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(133, 13) Source(86, 52) + SourceIndex(0) name (TopLevelModule1.SubModule2) +2 >Emitted(133, 9) Source(87, 5) + SourceIndex(0) name (TopLevelModule1.SubModule2) +3 >Emitted(133, 10) Source(87, 6) + SourceIndex(0) name (TopLevelModule1.SubModule2) +4 >Emitted(133, 12) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(133, 22) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(133, 25) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(133, 51) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +8 >Emitted(133, 56) Source(76, 19) + SourceIndex(0) name (TopLevelModule1) +9 >Emitted(133, 82) Source(76, 29) + SourceIndex(0) name (TopLevelModule1) +10>Emitted(133, 90) Source(87, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1 >^^^^^^^^ @@ -2607,9 +2589,9 @@ sourceFile:typeResolution.ts > 2 > class 3 > ClassA -1 >Emitted(137, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(137, 13) Source(89, 11) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(137, 19) Source(89, 17) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(134, 9) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(134, 13) Source(89, 11) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(134, 19) Source(89, 17) + SourceIndex(0) name (TopLevelModule1) --- >>> function ClassA() { 1->^^^^^^^^^^^^ @@ -2618,49 +2600,43 @@ sourceFile:typeResolution.ts 1-> 2 > class 3 > ClassA -1->Emitted(138, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(138, 22) Source(89, 11) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(138, 28) Source(89, 17) + SourceIndex(0) name (TopLevelModule1.ClassA) +1->Emitted(135, 13) Source(89, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(135, 22) Source(89, 11) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(135, 28) Source(89, 17) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> } 1 >^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { > public AisIn1() { } > 2 > } -1 >Emitted(139, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) -2 >Emitted(139, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +1 >Emitted(136, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) +2 >Emitted(136, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA.constructor) --- ->>> ClassA.prototype.AisIn1 = function () { +>>> ClassA.prototype.AisIn1 = function () { }; 1->^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ +4 > ^^^^^^^^^^^^^^^ 1-> 2 > AisIn1 3 > -1->Emitted(140, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(140, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(140, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) ---- ->>> }; -1 >^^^^^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 >public AisIn1() { -2 > } -1 >Emitted(141, 13) Source(90, 27) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) -2 >Emitted(141, 14) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA.AisIn1) +4 > public AisIn1() { } +1->Emitted(137, 13) Source(90, 16) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(137, 36) Source(90, 22) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(137, 39) Source(90, 9) + SourceIndex(0) name (TopLevelModule1.ClassA) +4 >Emitted(137, 54) Source(90, 28) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> return ClassA; -1->^^^^^^^^^^^^ +1 >^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1-> +1 > > 2 > } -1->Emitted(142, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(142, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +1 >Emitted(138, 13) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(138, 26) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) --- >>> })(); 1 >^^^^^^^^ @@ -2674,10 +2650,10 @@ sourceFile:typeResolution.ts 4 > class ClassA { > public AisIn1() { } > } -1 >Emitted(143, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) -2 >Emitted(143, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) -3 >Emitted(143, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(143, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) +1 >Emitted(139, 9) Source(91, 5) + SourceIndex(0) name (TopLevelModule1.ClassA) +2 >Emitted(139, 10) Source(91, 6) + SourceIndex(0) name (TopLevelModule1.ClassA) +3 >Emitted(139, 10) Source(89, 5) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(139, 14) Source(91, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> var NotExportedModule; 1->^^^^^^^^ @@ -2697,10 +2673,10 @@ sourceFile:typeResolution.ts 4 > { > export class ClassA { } > } -1->Emitted(144, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(144, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(144, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(144, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(140, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(140, 13) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(140, 30) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(140, 31) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> (function (NotExportedModule) { 1->^^^^^^^^ @@ -2714,11 +2690,11 @@ sourceFile:typeResolution.ts 3 > NotExportedModule 4 > 5 > { -1->Emitted(145, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(145, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(145, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(145, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(145, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(141, 9) Source(97, 5) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(141, 20) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(141, 37) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(141, 39) Source(97, 30) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(141, 40) Source(97, 31) + SourceIndex(0) name (TopLevelModule1) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ @@ -2729,9 +2705,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassA -1->Emitted(146, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(146, 17) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(146, 23) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(142, 13) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(142, 17) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(142, 23) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ @@ -2740,9 +2716,9 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassA -1->Emitted(147, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(147, 26) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -3 >Emitted(147, 32) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(143, 17) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(143, 26) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +3 >Emitted(143, 32) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> } 1 >^^^^^^^^^^^^^^^^ @@ -2750,16 +2726,16 @@ sourceFile:typeResolution.ts 3 > ^^^^^^^^^^^^^^-> 1 > { 2 > } -1 >Emitted(148, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) -2 >Emitted(148, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +1 >Emitted(144, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) +2 >Emitted(144, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA.constructor) --- >>> return ClassA; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ 1-> 2 > } -1->Emitted(149, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(149, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +1->Emitted(145, 17) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(145, 30) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -2771,10 +2747,10 @@ sourceFile:typeResolution.ts 2 > } 3 > 4 > export class ClassA { } -1 >Emitted(150, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -2 >Emitted(150, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) -3 >Emitted(150, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(150, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1 >Emitted(146, 13) Source(98, 31) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +2 >Emitted(146, 14) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule.ClassA) +3 >Emitted(146, 14) Source(98, 9) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(146, 18) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> NotExportedModule.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -2788,11 +2764,11 @@ sourceFile:typeResolution.ts 3 > 4 > ClassA { } 5 > -1->Emitted(151, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(151, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(151, 40) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -4 >Emitted(151, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -5 >Emitted(151, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +1->Emitted(147, 13) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(147, 37) Source(98, 28) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(147, 40) Source(98, 22) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +4 >Emitted(147, 46) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +5 >Emitted(147, 47) Source(98, 32) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) --- >>> })(NotExportedModule || (NotExportedModule = {})); 1->^^^^^^^^ @@ -2813,13 +2789,13 @@ sourceFile:typeResolution.ts 7 > { > export class ClassA { } > } -1->Emitted(152, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -2 >Emitted(152, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) -3 >Emitted(152, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -4 >Emitted(152, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -5 >Emitted(152, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) -6 >Emitted(152, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) -7 >Emitted(152, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) +1->Emitted(148, 9) Source(99, 5) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +2 >Emitted(148, 10) Source(99, 6) + SourceIndex(0) name (TopLevelModule1.NotExportedModule) +3 >Emitted(148, 12) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +4 >Emitted(148, 29) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +5 >Emitted(148, 34) Source(97, 12) + SourceIndex(0) name (TopLevelModule1) +6 >Emitted(148, 51) Source(97, 29) + SourceIndex(0) name (TopLevelModule1) +7 >Emitted(148, 59) Source(99, 6) + SourceIndex(0) name (TopLevelModule1) --- >>> })(TopLevelModule1 = exports.TopLevelModule1 || (exports.TopLevelModule1 = {})); 1->^^^^ @@ -2940,15 +2916,15 @@ sourceFile:typeResolution.ts > export class ClassA { } > } > } -1->Emitted(153, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) -2 >Emitted(153, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) -3 >Emitted(153, 8) Source(1, 15) + SourceIndex(0) -4 >Emitted(153, 23) Source(1, 30) + SourceIndex(0) -5 >Emitted(153, 26) Source(1, 15) + SourceIndex(0) -6 >Emitted(153, 49) Source(1, 30) + SourceIndex(0) -7 >Emitted(153, 54) Source(1, 15) + SourceIndex(0) -8 >Emitted(153, 77) Source(1, 30) + SourceIndex(0) -9 >Emitted(153, 85) Source(100, 2) + SourceIndex(0) +1->Emitted(149, 5) Source(100, 1) + SourceIndex(0) name (TopLevelModule1) +2 >Emitted(149, 6) Source(100, 2) + SourceIndex(0) name (TopLevelModule1) +3 >Emitted(149, 8) Source(1, 15) + SourceIndex(0) +4 >Emitted(149, 23) Source(1, 30) + SourceIndex(0) +5 >Emitted(149, 26) Source(1, 15) + SourceIndex(0) +6 >Emitted(149, 49) Source(1, 30) + SourceIndex(0) +7 >Emitted(149, 54) Source(1, 15) + SourceIndex(0) +8 >Emitted(149, 77) Source(1, 30) + SourceIndex(0) +9 >Emitted(149, 85) Source(100, 2) + SourceIndex(0) --- >>> var TopLevelModule2; 1 >^^^^ @@ -2968,10 +2944,10 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(154, 5) Source(102, 1) + SourceIndex(0) -2 >Emitted(154, 9) Source(102, 8) + SourceIndex(0) -3 >Emitted(154, 24) Source(102, 23) + SourceIndex(0) -4 >Emitted(154, 25) Source(108, 2) + SourceIndex(0) +1 >Emitted(150, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(150, 9) Source(102, 8) + SourceIndex(0) +3 >Emitted(150, 24) Source(102, 23) + SourceIndex(0) +4 >Emitted(150, 25) Source(108, 2) + SourceIndex(0) --- >>> (function (TopLevelModule2) { 1->^^^^ @@ -2984,11 +2960,11 @@ sourceFile:typeResolution.ts 3 > TopLevelModule2 4 > 5 > { -1->Emitted(155, 5) Source(102, 1) + SourceIndex(0) -2 >Emitted(155, 16) Source(102, 8) + SourceIndex(0) -3 >Emitted(155, 31) Source(102, 23) + SourceIndex(0) -4 >Emitted(155, 33) Source(102, 24) + SourceIndex(0) -5 >Emitted(155, 34) Source(102, 25) + SourceIndex(0) +1->Emitted(151, 5) Source(102, 1) + SourceIndex(0) +2 >Emitted(151, 16) Source(102, 8) + SourceIndex(0) +3 >Emitted(151, 31) Source(102, 23) + SourceIndex(0) +4 >Emitted(151, 33) Source(102, 24) + SourceIndex(0) +5 >Emitted(151, 34) Source(102, 25) + SourceIndex(0) --- >>> var SubModule3; 1 >^^^^^^^^ @@ -3005,10 +2981,10 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } > } -1 >Emitted(156, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(156, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(156, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(156, 24) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +1 >Emitted(152, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(152, 13) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(152, 23) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(152, 24) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) --- >>> (function (SubModule3) { 1->^^^^^^^^ @@ -3022,11 +2998,11 @@ sourceFile:typeResolution.ts 3 > SubModule3 4 > 5 > { -1->Emitted(157, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(157, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(157, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(157, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(157, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) +1->Emitted(153, 9) Source(103, 5) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(153, 20) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(153, 30) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(153, 32) Source(103, 30) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(153, 33) Source(103, 31) + SourceIndex(0) name (TopLevelModule2) --- >>> var ClassA = (function () { 1->^^^^^^^^^^^^ @@ -3037,9 +3013,9 @@ sourceFile:typeResolution.ts > 2 > export class 3 > ClassA -1->Emitted(158, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(158, 17) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(158, 23) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(154, 13) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(154, 17) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(154, 23) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> function ClassA() { 1->^^^^^^^^^^^^^^^^ @@ -3048,49 +3024,43 @@ sourceFile:typeResolution.ts 1-> 2 > export class 3 > ClassA -1->Emitted(159, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(159, 26) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(159, 32) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1->Emitted(155, 17) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(155, 26) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(155, 32) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> } 1 >^^^^^^^^^^^^^^^^ 2 > ^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { > public AisIn2_3() { } > 2 > } -1 >Emitted(160, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) -2 >Emitted(160, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +1 >Emitted(156, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) +2 >Emitted(156, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.constructor) --- ->>> ClassA.prototype.AisIn2_3 = function () { +>>> ClassA.prototype.AisIn2_3 = function () { }; 1->^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^ +4 > ^^^^^^^^^^^^^^^ 1-> 2 > AisIn2_3 3 > -1->Emitted(161, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(161, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(161, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) ---- ->>> }; -1 >^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^^^^^^^^^^^^^-> -1 >public AisIn2_3() { -2 > } -1 >Emitted(162, 17) Source(105, 33) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) -2 >Emitted(162, 18) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA.AisIn2_3) +4 > public AisIn2_3() { } +1->Emitted(157, 17) Source(105, 20) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(157, 42) Source(105, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(157, 45) Source(105, 13) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +4 >Emitted(157, 60) Source(105, 34) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> return ClassA; -1->^^^^^^^^^^^^^^^^ +1 >^^^^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^ -1-> +1 > > 2 > } -1->Emitted(163, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(163, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +1 >Emitted(158, 17) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(158, 30) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) --- >>> })(); 1 >^^^^^^^^^^^^ @@ -3104,10 +3074,10 @@ sourceFile:typeResolution.ts 4 > export class ClassA { > public AisIn2_3() { } > } -1 >Emitted(164, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -2 >Emitted(164, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) -3 >Emitted(164, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(164, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1 >Emitted(159, 13) Source(106, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +2 >Emitted(159, 14) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3.ClassA) +3 >Emitted(159, 14) Source(104, 9) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(159, 18) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> SubModule3.ClassA = ClassA; 1->^^^^^^^^^^^^ @@ -3123,11 +3093,11 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } 5 > -1->Emitted(165, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(165, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(165, 33) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) -4 >Emitted(165, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) -5 >Emitted(165, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +1->Emitted(160, 13) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(160, 30) Source(104, 28) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(160, 33) Source(104, 22) + SourceIndex(0) name (TopLevelModule2.SubModule3) +4 >Emitted(160, 39) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) +5 >Emitted(160, 40) Source(106, 10) + SourceIndex(0) name (TopLevelModule2.SubModule3) --- >>> })(SubModule3 = TopLevelModule2.SubModule3 || (TopLevelModule2.SubModule3 = {})); 1->^^^^^^^^ @@ -3153,15 +3123,15 @@ sourceFile:typeResolution.ts > public AisIn2_3() { } > } > } -1->Emitted(166, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) -2 >Emitted(166, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) -3 >Emitted(166, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -4 >Emitted(166, 22) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -5 >Emitted(166, 25) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -6 >Emitted(166, 51) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -7 >Emitted(166, 56) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) -8 >Emitted(166, 82) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) -9 >Emitted(166, 90) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) +1->Emitted(161, 9) Source(107, 5) + SourceIndex(0) name (TopLevelModule2.SubModule3) +2 >Emitted(161, 10) Source(107, 6) + SourceIndex(0) name (TopLevelModule2.SubModule3) +3 >Emitted(161, 12) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +4 >Emitted(161, 22) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +5 >Emitted(161, 25) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +6 >Emitted(161, 51) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +7 >Emitted(161, 56) Source(103, 19) + SourceIndex(0) name (TopLevelModule2) +8 >Emitted(161, 82) Source(103, 29) + SourceIndex(0) name (TopLevelModule2) +9 >Emitted(161, 90) Source(107, 6) + SourceIndex(0) name (TopLevelModule2) --- >>> })(TopLevelModule2 || (TopLevelModule2 = {})); 1 >^^^^ @@ -3185,13 +3155,13 @@ sourceFile:typeResolution.ts > } > } > } -1 >Emitted(167, 5) Source(108, 1) + SourceIndex(0) name (TopLevelModule2) -2 >Emitted(167, 6) Source(108, 2) + SourceIndex(0) name (TopLevelModule2) -3 >Emitted(167, 8) Source(102, 8) + SourceIndex(0) -4 >Emitted(167, 23) Source(102, 23) + SourceIndex(0) -5 >Emitted(167, 28) Source(102, 8) + SourceIndex(0) -6 >Emitted(167, 43) Source(102, 23) + SourceIndex(0) -7 >Emitted(167, 51) Source(108, 2) + SourceIndex(0) +1 >Emitted(162, 5) Source(108, 1) + SourceIndex(0) name (TopLevelModule2) +2 >Emitted(162, 6) Source(108, 2) + SourceIndex(0) name (TopLevelModule2) +3 >Emitted(162, 8) Source(102, 8) + SourceIndex(0) +4 >Emitted(162, 23) Source(102, 23) + SourceIndex(0) +5 >Emitted(162, 28) Source(102, 8) + SourceIndex(0) +6 >Emitted(162, 43) Source(102, 23) + SourceIndex(0) +7 >Emitted(162, 51) Source(108, 2) + SourceIndex(0) --- >>>}); >>>//# sourceMappingURL=typeResolution.js.map \ No newline at end of file diff --git a/tests/baselines/reference/typedGenericPrototypeMember.js b/tests/baselines/reference/typedGenericPrototypeMember.js index 866bf500ded..e5ba2e0e75f 100644 --- a/tests/baselines/reference/typedGenericPrototypeMember.js +++ b/tests/baselines/reference/typedGenericPrototypeMember.js @@ -10,8 +10,7 @@ List.prototype.add("abc"); // Valid because T is instantiated to any var List = (function () { function List() { } - List.prototype.add = function (item) { - }; + List.prototype.add = function (item) { }; return List; })(); List.prototype.add("abc"); // Valid because T is instantiated to any diff --git a/tests/baselines/reference/typeofANonExportedType.js b/tests/baselines/reference/typeofANonExportedType.js index a241eafeaa2..bb41ddfab7a 100644 --- a/tests/baselines/reference/typeofANonExportedType.js +++ b/tests/baselines/reference/typeofANonExportedType.js @@ -91,8 +91,7 @@ var E; exports.r10; exports.r11; exports.r12; -function foo() { -} +function foo() { } var foo; (function (foo) { foo.y = 1; diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index 77407f2628c..af6c405a3cf 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -93,8 +93,7 @@ var E = exports.E; exports.r10; exports.r11; exports.r12; -function foo() { -} +function foo() { } exports.foo = foo; var foo; (function (foo) { diff --git a/tests/baselines/reference/typeofClass2.js b/tests/baselines/reference/typeofClass2.js index cbad0068372..1cef22bf2eb 100644 --- a/tests/baselines/reference/typeofClass2.js +++ b/tests/baselines/reference/typeofClass2.js @@ -31,10 +31,8 @@ var __extends = this.__extends || function (d, b) { var C = (function () { function C(x) { } - C.foo = function (x) { - }; - C.bar = function (x) { - }; + C.foo = function (x) { }; + C.bar = function (x) { }; return C; })(); var D = (function (_super) { @@ -42,10 +40,8 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.baz = function (x) { - }; - D.prototype.foo = function () { - }; + D.baz = function (x) { }; + D.prototype.foo = function () { }; return D; })(C); var d; diff --git a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js index a41ab42c9f5..a497519f249 100644 --- a/tests/baselines/reference/typeofOperatorWithAnyOtherType.js +++ b/tests/baselines/reference/typeofOperatorWithAnyOtherType.js @@ -80,8 +80,7 @@ var ANY; var ANY1; var ANY2 = ["", ""]; var obj; -var obj1 = { x: "a", y: function () { -} }; +var obj1 = { x: "a", y: function () { } }; function foo() { var a; return a; diff --git a/tests/baselines/reference/typesWithDuplicateTypeParameters.js b/tests/baselines/reference/typesWithDuplicateTypeParameters.js index f81f59d5307..cc80d4d57b4 100644 --- a/tests/baselines/reference/typesWithDuplicateTypeParameters.js +++ b/tests/baselines/reference/typesWithDuplicateTypeParameters.js @@ -19,7 +19,5 @@ var C2 = (function () { } return C2; })(); -function f() { -} -function f2() { -} +function f() { } +function f2() { } diff --git a/tests/baselines/reference/undeclaredMethod.js b/tests/baselines/reference/undeclaredMethod.js index b2795938632..2cef06cc593 100644 --- a/tests/baselines/reference/undeclaredMethod.js +++ b/tests/baselines/reference/undeclaredMethod.js @@ -19,8 +19,7 @@ var M; var C = (function () { function C() { } - C.prototype.salt = function () { - }; + C.prototype.salt = function () { }; return C; })(); M.C = C; diff --git a/tests/baselines/reference/undeclaredModuleError.js b/tests/baselines/reference/undeclaredModuleError.js index e7e9b70ee7b..4b93db57682 100644 --- a/tests/baselines/reference/undeclaredModuleError.js +++ b/tests/baselines/reference/undeclaredModuleError.js @@ -17,14 +17,8 @@ function instrumentFile(covFileDir: string, covFileName: string, originalFilePat //// [undeclaredModuleError.js] define(["require", "exports", 'fs'], function (require, exports, fs) { - function readdir(path, accept, callback) { - } - function join() { - var paths = []; - for (var _i = 0; _i < arguments.length; _i++) { - paths[_i - 0] = arguments[_i]; - } - } + function readdir(path, accept, callback) { } + function join() { } function instrumentFile(covFileDir, covFileName, originalFilePath) { fs.readFile(originalFilePath, function () { readdir(covFileDir, function () { diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js index df87e7b0ad6..b1ef3e19edd 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.js +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.js @@ -250,8 +250,7 @@ var D11 = (function (_super) { } return D11; })(Base); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/underscoreTest1.js b/tests/baselines/reference/underscoreTest1.js index 290e7aa6c88..b9bfe51533c 100644 --- a/tests/baselines/reference/underscoreTest1.js +++ b/tests/baselines/reference/underscoreTest1.js @@ -983,12 +983,7 @@ $('#underscore_button').bind('click', buttonView.onClick); var fibonacci = _.memoize(function (n) { return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); }); -var log = _.bind(function (message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } -}, Date); +var log = _.bind(function (message) { }, Date); _.delay(log, 1000, 'logged later'); _.defer(function () { alert('deferred'); diff --git a/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js b/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js index 0c9ffeb5653..d30b78ca2c3 100644 --- a/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js +++ b/tests/baselines/reference/unionSubtypeIfEveryConstituentTypeIsSubtype.js @@ -163,8 +163,7 @@ var E2; (function (E2) { E2[E2["A"] = 0] = "A"; })(E2 || (E2 = {})); -function f() { -} +function f() { } var f; (function (f) { f.bar = 1; diff --git a/tests/baselines/reference/unionTypeEquivalence.js b/tests/baselines/reference/unionTypeEquivalence.js index f9fdf2e58d7..8343b8e5208 100644 --- a/tests/baselines/reference/unionTypeEquivalence.js +++ b/tests/baselines/reference/unionTypeEquivalence.js @@ -37,8 +37,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo = function () { - }; + D.prototype.foo = function () { }; return D; })(C); var x; diff --git a/tests/baselines/reference/unionTypeFromArrayLiteral.js b/tests/baselines/reference/unionTypeFromArrayLiteral.js index e0410a65229..0aa549f5490 100644 --- a/tests/baselines/reference/unionTypeFromArrayLiteral.js +++ b/tests/baselines/reference/unionTypeFromArrayLiteral.js @@ -43,15 +43,13 @@ var arr5Tuple = ["hello", true, false, " hello", true, 10, "any"]; // Tuple var C = (function () { function C() { } - C.prototype.foo = function () { - }; + C.prototype.foo = function () { }; return C; })(); var D = (function () { function D() { } - D.prototype.foo2 = function () { - }; + D.prototype.foo2 = function () { }; return D; })(); var E = (function (_super) { @@ -59,8 +57,7 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo3 = function () { - }; + E.prototype.foo3 = function () { }; return E; })(C); var F = (function (_super) { @@ -68,8 +65,7 @@ var F = (function (_super) { function F() { _super.apply(this, arguments); } - F.prototype.foo4 = function () { - }; + F.prototype.foo4 = function () { }; return F; })(C); var c, d, e, f; diff --git a/tests/baselines/reference/unionTypesAssignability.js b/tests/baselines/reference/unionTypesAssignability.js index a67f23bb09f..a94ea07dce2 100644 --- a/tests/baselines/reference/unionTypesAssignability.js +++ b/tests/baselines/reference/unionTypesAssignability.js @@ -90,8 +90,7 @@ var D = (function (_super) { function D() { _super.apply(this, arguments); } - D.prototype.foo1 = function () { - }; + D.prototype.foo1 = function () { }; return D; })(C); var E = (function (_super) { @@ -99,8 +98,7 @@ var E = (function (_super) { function E() { _super.apply(this, arguments); } - E.prototype.foo2 = function () { - }; + E.prototype.foo2 = function () { }; return E; })(C); var unionDE; diff --git a/tests/baselines/reference/unknownSymbols1.js b/tests/baselines/reference/unknownSymbols1.js index e4f38971461..cbcdd2ea27f 100644 --- a/tests/baselines/reference/unknownSymbols1.js +++ b/tests/baselines/reference/unknownSymbols1.js @@ -41,8 +41,7 @@ var __extends = this.__extends || function (d, b) { }; var x = asdf; var y; -function foo(x, y) { -} +function foo(x, y) { } function foo2() { return asdf; } diff --git a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js index 3bdce742fc3..9ff4a5c469a 100644 --- a/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js +++ b/tests/baselines/reference/untypedFunctionCallsWithTypeParameters1.js @@ -64,8 +64,7 @@ var C = (function () { this.prototype = null; this.length = 1; this.arguments = null; - this.caller = function () { - }; + this.caller = function () { }; } return C; })(); diff --git a/tests/baselines/reference/validMultipleVariableDeclarations.js b/tests/baselines/reference/validMultipleVariableDeclarations.js index 097f9ae50c6..5c65d388711 100644 --- a/tests/baselines/reference/validMultipleVariableDeclarations.js +++ b/tests/baselines/reference/validMultipleVariableDeclarations.js @@ -45,8 +45,7 @@ var x; var x = 2; if (true) { var x = 3; - for (var x = 0;;) { - } + for (var x = 0;;) { } } var x = undefined; // new declaration space, making redeclaring x as a string valid diff --git a/tests/baselines/reference/varAndFunctionShareName.js b/tests/baselines/reference/varAndFunctionShareName.js index a63f038b927..cdc661dafb5 100644 --- a/tests/baselines/reference/varAndFunctionShareName.js +++ b/tests/baselines/reference/varAndFunctionShareName.js @@ -4,5 +4,4 @@ function myFn(): any { } //// [varAndFunctionShareName.js] var myFn; -function myFn() { -} +function myFn() { } diff --git a/tests/baselines/reference/varArgWithNoParamName.js b/tests/baselines/reference/varArgWithNoParamName.js index 05a9695770a..b61400ff739 100644 --- a/tests/baselines/reference/varArgWithNoParamName.js +++ b/tests/baselines/reference/varArgWithNoParamName.js @@ -2,9 +2,4 @@ function t1(...) {} //// [varArgWithNoParamName.js] -function t1() { - var = []; - for (var _i = 0; _i < arguments.length; _i++) { - [_i - 0] = arguments[_i]; - } -} +function t1() { } diff --git a/tests/baselines/reference/voidArrayLit.js b/tests/baselines/reference/voidArrayLit.js index 35a07480334..1ed6a7dfd3d 100644 --- a/tests/baselines/reference/voidArrayLit.js +++ b/tests/baselines/reference/voidArrayLit.js @@ -6,11 +6,7 @@ foo((()=>{})()); // error //// [voidArrayLit.js] -var va = [(function () { -})()]; // ok -(function () { -})(); // ok -function foo(s) { -} -foo((function () { -})()); // error +var va = [(function () { })()]; // ok +(function () { })(); // ok +function foo(s) { } +foo((function () { })()); // error diff --git a/tests/baselines/reference/voidAsNonAmbiguousReturnType.js b/tests/baselines/reference/voidAsNonAmbiguousReturnType.js index 3ba67436b9f..713c4ffe47b 100644 --- a/tests/baselines/reference/voidAsNonAmbiguousReturnType.js +++ b/tests/baselines/reference/voidAsNonAmbiguousReturnType.js @@ -14,8 +14,7 @@ function main() { //// [voidAsNonAmbiguousReturnType_0.js] -function mkdirSync(path, mode) { -} +function mkdirSync(path, mode) { } exports.mkdirSync = mkdirSync; //// [voidAsNonAmbiguousReturnType_1.js] /// diff --git a/tests/baselines/reference/voidFunctionAssignmentCompat.js b/tests/baselines/reference/voidFunctionAssignmentCompat.js index f3a457075c0..42e0f99ec31 100644 --- a/tests/baselines/reference/voidFunctionAssignmentCompat.js +++ b/tests/baselines/reference/voidFunctionAssignmentCompat.js @@ -23,18 +23,15 @@ var frv3: (v:any)=>number = (function() { return function () { return 0; } })() var fa = function () { return 3; }; -fa = function () { -}; // should not work -var fv = function () { -}; +fa = function () { }; // should not work +var fv = function () { }; fv = function () { return 0; }; // should work function execAny(callback) { return callback(0); } -execAny(function () { -}); // should work +execAny(function () { }); // should work function execVoid(callback) { callback(0); } @@ -42,8 +39,7 @@ execVoid(function () { return 0; }); // should work var fra = function () { - return function () { - }; + return function () { }; }; // should work var frv = function () { return function () { diff --git a/tests/baselines/reference/whileBreakStatements.js b/tests/baselines/reference/whileBreakStatements.js index 671226349c1..818be39a242 100644 --- a/tests/baselines/reference/whileBreakStatements.js +++ b/tests/baselines/reference/whileBreakStatements.js @@ -66,7 +66,6 @@ SEVEN: while (true) while (true) break SEVEN; EIGHT: while (true) { - var fn = function () { - }; + var fn = function () { }; break EIGHT; } diff --git a/tests/baselines/reference/whileContinueStatements.js b/tests/baselines/reference/whileContinueStatements.js index 894c8723294..91894f9fb8d 100644 --- a/tests/baselines/reference/whileContinueStatements.js +++ b/tests/baselines/reference/whileContinueStatements.js @@ -82,8 +82,7 @@ SEVEN: while (true) while (true) continue SEVEN; EIGHT: while (true) { - var fn = function () { - }; + var fn = function () { }; continue EIGHT; } NINE: while (true) { diff --git a/tests/baselines/reference/widenedTypes.js b/tests/baselines/reference/widenedTypes.js index 5a76ae72905..a0ff6327f25 100644 --- a/tests/baselines/reference/widenedTypes.js +++ b/tests/baselines/reference/widenedTypes.js @@ -25,13 +25,11 @@ var arr: string[] = [3, null]; // not assignable because null is not widened. BC var obj: { [x: string]: string; } = { x: 3, y: null }; // assignable because null is widened, and therefore BCT is any //// [widenedTypes.js] -null instanceof (function () { -}); +null instanceof (function () { }); ({}) instanceof null; // Ok because null is a subtype of function null in {}; "" in null; -for (var a in null) { -} +for (var a in null) { } var t = [3, (3, null)]; t[3] = ""; var x = 3; diff --git a/tests/baselines/reference/withStatement.js b/tests/baselines/reference/withStatement.js index 579f1574bd0..e4224482059 100644 --- a/tests/baselines/reference/withStatement.js +++ b/tests/baselines/reference/withStatement.js @@ -16,7 +16,6 @@ with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) { // error with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) { bing = true; // no error bang = true; // no error - function bar() { - } + function bar() { } bar(); } diff --git a/tests/baselines/reference/withStatementErrors.js b/tests/baselines/reference/withStatementErrors.js index 9ccdfa2a759..5a4e0635db4 100644 --- a/tests/baselines/reference/withStatementErrors.js +++ b/tests/baselines/reference/withStatementErrors.js @@ -22,8 +22,7 @@ with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) { // error with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) { bing = true; // no error bang = true; // no error - function bar() { - } // no error + function bar() { } // no error bar(); } // no error var C = (function () { From ff31b9653340013fd5fd78e4938dc44e105dfeaf Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 6 Feb 2015 19:06:16 -0800 Subject: [PATCH 3/9] Update test baseline. --- tests/baselines/reference/objectLiteralWithSemicolons5.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/baselines/reference/objectLiteralWithSemicolons5.js b/tests/baselines/reference/objectLiteralWithSemicolons5.js index 082ca6829a0..1c9c4ddf544 100644 --- a/tests/baselines/reference/objectLiteralWithSemicolons5.js +++ b/tests/baselines/reference/objectLiteralWithSemicolons5.js @@ -2,6 +2,4 @@ var v = { foo() { }; a: b; get baz() { }; } //// [objectLiteralWithSemicolons5.js] -var v = { foo: function () { -}, a: b, get baz() { -} }; +var v = { foo: function () { }, a: b, get baz() { } }; From f1cb97b6925da108ebdb78122e6d3a919f9b0ac1 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 8 Feb 2015 16:10:16 -0800 Subject: [PATCH 4/9] Add additional aggressive checks during incremental parsing. --- src/compiler/parser.ts | 52 ++++++++++++++++--- src/harness/harnessLanguageService.ts | 2 +- src/services/services.ts | 4 +- .../baselines/reference/APISample_compile.js | 4 +- .../reference/APISample_compile.types | 10 ++-- tests/baselines/reference/APISample_linter.js | 4 +- .../reference/APISample_linter.types | 10 ++-- .../reference/APISample_transform.js | 4 +- .../reference/APISample_transform.types | 10 ++-- .../baselines/reference/APISample_watcher.js | 4 +- .../reference/APISample_watcher.types | 10 ++-- 11 files changed, 80 insertions(+), 34 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6942be3cf13..88fff6de959 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -357,21 +357,41 @@ module ts { forEachChild(sourceFile, walk); } - function moveElementEntirelyPastChangeRange(element: IncrementalElement, delta: number) { + function shouldCheckNode(node: Node) { + switch (node.kind) { + case SyntaxKind.StringLiteral: + case SyntaxKind.NumericLiteral: + case SyntaxKind.Identifier: + return true; + } + + return false; + } + + function moveElementEntirelyPastChangeRange(element: IncrementalElement, delta: number, oldText: string, newText: string, aggressiveChecks: boolean) { if (element.length) { visitArray(element); } else { visitNode(element); } + return; function visitNode(node: IncrementalNode) { + if (aggressiveChecks && shouldCheckNode(node)) { + var text = oldText.substring(node.pos, node.end); + } + // Ditch any existing LS children we may have created. This way we can avoid // moving them forward. node._children = undefined; node.pos += delta; node.end += delta; + if (aggressiveChecks && shouldCheckNode(node)) { + Debug.assert(text === newText.substring(node.pos, node.end)); + } + forEachChild(node, visitNode, visitArray); } @@ -459,14 +479,24 @@ module ts { } } - function updateTokenPositionsAndMarkElements(node: IncrementalNode, changeStart: number, changeRangeOldEnd: number, changeRangeNewEnd: number, delta: number): void { + function updateTokenPositionsAndMarkElements( + node: IncrementalNode, + changeStart: number, + changeRangeOldEnd: number, + changeRangeNewEnd: number, + delta: number, + oldText: string, + newText: string, + aggressiveChecks: boolean): void { + visitNode(node); + return; function visitNode(child: IncrementalNode) { if (child.pos > changeRangeOldEnd) { // Node is entirely past the change range. We need to move both its pos and // end, forward or backward appropriately. - moveElementEntirelyPastChangeRange(child, delta); + moveElementEntirelyPastChangeRange(child, delta, oldText, newText, aggressiveChecks); return; } @@ -490,7 +520,7 @@ module ts { if (array.pos > changeRangeOldEnd) { // Array is entirely after the change range. We need to move it, and move any of // its children. - moveElementEntirelyPastChangeRange(array, delta); + moveElementEntirelyPastChangeRange(array, delta, oldText, newText, aggressiveChecks); } else { // Check if the element intersects the change range. If it does, then it is not @@ -513,7 +543,6 @@ module ts { } } - function extendToAffectedRange(sourceFile: SourceFile, changeRange: TextChangeRange): TextChangeRange { // Consider the following code: // void foo() { /; } @@ -650,7 +679,9 @@ module ts { // from this SourceFile that are being held onto may change as a result (including // becoming detached from any SourceFile). It is recommended that this SourceFile not // be used once 'update' is called on it. - export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile { + export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile { + aggressiveChecks = aggressiveChecks || Debug.shouldAssert(AssertionLevel.Aggressive); + if (textChangeRangeIsUnchanged(textChangeRange)) { // if the text didn't change, then we can just return our current source file as-is. return sourceFile; @@ -662,12 +693,19 @@ module ts { return parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion,/*syntaxCursor*/ undefined, /*setNodeParents*/ true) } + var oldText = sourceFile.text; var syntaxCursor = createSyntaxCursor(sourceFile); // Make the actual change larger so that we know to reparse anything whose lookahead // might have intersected the change. var changeRange = extendToAffectedRange(sourceFile, textChangeRange); + // Ensure that extending the affected range only moved the start of the change range + // earlier in the file. + Debug.assert(changeRange.span.start <= textChangeRange.span.start); + Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span)); + Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange))); + // The is the amount the nodes after the edit range need to be adjusted. It can be // positive (if the edit added characters), negative (if the edit deleted characters) // or zero (if this was a pure overwrite with nothing added/removed). @@ -693,7 +731,7 @@ module ts { // Also, mark any syntax elements that intersect the changed span. We know, up front, // that we cannot reuse these elements. updateTokenPositionsAndMarkElements(sourceFile, - changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta); + changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); // Now that we've set up our internal incremental state just proceed and parse the // source file in the normal fashion. When possible the parser will retrieve and diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index bf9c75a7167..595ef7af3f1 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -115,7 +115,7 @@ module Harness.LanguageService { version: string, textChangeRange: ts.TextChangeRange ): ts.SourceFile { - var result = ts.updateLanguageServiceSourceFile(document, scriptSnapshot, version, textChangeRange); + var result = ts.updateLanguageServiceSourceFile(document, scriptSnapshot, version, textChangeRange, /*aggressiveChecks:*/ true); Utils.assertInvariants(result, /*parent:*/ undefined); return result; } diff --git a/src/services/services.ts b/src/services/services.ts index fcb5c696a38..f1448a3ab0e 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1624,7 +1624,7 @@ module ts { export var disableIncrementalParsing = false; - export function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile { + export function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile { if (textChangeRange && Debug.shouldAssert(AssertionLevel.Normal)) { var oldText = sourceFile.scriptSnapshot; var newText = scriptSnapshot; @@ -1648,7 +1648,7 @@ module ts { if (version !== sourceFile.version) { // Once incremental parsing is ready, then just call into this function. if (!disableIncrementalParsing) { - var newSourceFile = updateSourceFile(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange); + var newSourceFile = updateSourceFile(sourceFile, scriptSnapshot.getText(0, scriptSnapshot.getLength()), textChangeRange, aggressiveChecks); setSourceFileFields(newSourceFile, scriptSnapshot, version); // after incremental parsing nameTable might not be up-to-date // drop it so it can be lazily recreated later diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 6840f079972..7d89d88b5b3 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -1404,7 +1404,7 @@ declare module "typescript" { function createNode(kind: SyntaxKind): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; function modifierToFlag(token: SyntaxKind): NodeFlags; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function isEvalOrArgumentsIdentifier(node: Node): boolean; function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; function isLeftHandSideExpression(expr: Expression): boolean; @@ -1895,7 +1895,7 @@ declare module "typescript" { } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; var disableIncrementalParsing: boolean; - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index d70172377ca..8cf789bf20f 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -4484,13 +4484,14 @@ declare module "typescript" { >SyntaxKind : SyntaxKind >NodeFlags : NodeFlags - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; ->updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange) => SourceFile + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >newText : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function isEvalOrArgumentsIdentifier(node: Node): boolean; @@ -5895,8 +5896,8 @@ declare module "typescript" { var disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; ->updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange) => SourceFile + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >scriptSnapshot : IScriptSnapshot @@ -5904,6 +5905,7 @@ declare module "typescript" { >version : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function createDocumentRegistry(): DocumentRegistry; diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index c8bec722309..0ce5a277968 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -1435,7 +1435,7 @@ declare module "typescript" { function createNode(kind: SyntaxKind): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; function modifierToFlag(token: SyntaxKind): NodeFlags; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function isEvalOrArgumentsIdentifier(node: Node): boolean; function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; function isLeftHandSideExpression(expr: Expression): boolean; @@ -1926,7 +1926,7 @@ declare module "typescript" { } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; var disableIncrementalParsing: boolean; - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index 26254c69d54..115a0f5a16b 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -4628,13 +4628,14 @@ declare module "typescript" { >SyntaxKind : SyntaxKind >NodeFlags : NodeFlags - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; ->updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange) => SourceFile + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >newText : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function isEvalOrArgumentsIdentifier(node: Node): boolean; @@ -6039,8 +6040,8 @@ declare module "typescript" { var disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; ->updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange) => SourceFile + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >scriptSnapshot : IScriptSnapshot @@ -6048,6 +6049,7 @@ declare module "typescript" { >version : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function createDocumentRegistry(): DocumentRegistry; diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index ad66d289eb7..6ecf4e7c395 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -1436,7 +1436,7 @@ declare module "typescript" { function createNode(kind: SyntaxKind): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; function modifierToFlag(token: SyntaxKind): NodeFlags; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function isEvalOrArgumentsIdentifier(node: Node): boolean; function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; function isLeftHandSideExpression(expr: Expression): boolean; @@ -1927,7 +1927,7 @@ declare module "typescript" { } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; var disableIncrementalParsing: boolean; - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index c6d74cc811d..e2797fe5267 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -4580,13 +4580,14 @@ declare module "typescript" { >SyntaxKind : SyntaxKind >NodeFlags : NodeFlags - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; ->updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange) => SourceFile + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >newText : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function isEvalOrArgumentsIdentifier(node: Node): boolean; @@ -5991,8 +5992,8 @@ declare module "typescript" { var disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; ->updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange) => SourceFile + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >scriptSnapshot : IScriptSnapshot @@ -6000,6 +6001,7 @@ declare module "typescript" { >version : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function createDocumentRegistry(): DocumentRegistry; diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index 2add8dfd45e..eb141f20672 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -1473,7 +1473,7 @@ declare module "typescript" { function createNode(kind: SyntaxKind): Node; function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; function modifierToFlag(token: SyntaxKind): NodeFlags; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function isEvalOrArgumentsIdentifier(node: Node): boolean; function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; function isLeftHandSideExpression(expr: Expression): boolean; @@ -1964,7 +1964,7 @@ declare module "typescript" { } function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; var disableIncrementalParsing: boolean; - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; function createDocumentRegistry(): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 3af8537fdb7..692e07f317a 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -4753,13 +4753,14 @@ declare module "typescript" { >SyntaxKind : SyntaxKind >NodeFlags : NodeFlags - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange): SourceFile; ->updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange) => SourceFile + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >newText : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function isEvalOrArgumentsIdentifier(node: Node): boolean; @@ -6164,8 +6165,8 @@ declare module "typescript" { var disableIncrementalParsing: boolean; >disableIncrementalParsing : boolean - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange): SourceFile; ->updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange) => SourceFile + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile >sourceFile : SourceFile >SourceFile : SourceFile >scriptSnapshot : IScriptSnapshot @@ -6173,6 +6174,7 @@ declare module "typescript" { >version : string >textChangeRange : TextChangeRange >TextChangeRange : TextChangeRange +>aggressiveChecks : boolean >SourceFile : SourceFile function createDocumentRegistry(): DocumentRegistry; From a82c57c4b936c64bd8377e2f5d50fa49b78e3830 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 8 Feb 2015 16:40:04 -0800 Subject: [PATCH 5/9] Make sure positions of child elements are consistent. --- src/compiler/parser.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 88fff6de959..adf123e6be0 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -393,6 +393,7 @@ module ts { } forEachChild(node, visitNode, visitArray); + checkNodePositions(node, aggressiveChecks); } function visitArray(array: IncrementalNodeArray) { @@ -479,8 +480,19 @@ module ts { } } + function checkNodePositions(node: Node, aggressiveChecks: boolean) { + if (aggressiveChecks) { + var pos = node.pos; + forEachChild(node, child => { + Debug.assert(child.pos >= pos); + pos = child.end; + }); + Debug.assert(pos <= node.end); + } + } + function updateTokenPositionsAndMarkElements( - node: IncrementalNode, + sourceFile: IncrementalNode, changeStart: number, changeRangeOldEnd: number, changeRangeNewEnd: number, @@ -489,7 +501,7 @@ module ts { newText: string, aggressiveChecks: boolean): void { - visitNode(node); + visitNode(sourceFile); return; function visitNode(child: IncrementalNode) { @@ -510,6 +522,8 @@ module ts { // Adjust the pos or end (or both) of the intersecting element accordingly. adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); forEachChild(child, visitNode, visitArray); + + checkNodePositions(child, aggressiveChecks); return; } From 1a17fd1daf5737d19defc25167f4ce64a0969284 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 8 Feb 2015 17:30:27 -0800 Subject: [PATCH 6/9] Move assertions into the parsing layer. --- src/compiler/parser.ts | 16 +++++++++++++++- src/services/services.ts | 17 ----------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index adf123e6be0..9ed2f62bf48 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -696,6 +696,21 @@ module ts { export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile { aggressiveChecks = aggressiveChecks || Debug.shouldAssert(AssertionLevel.Aggressive); + var oldText = sourceFile.text; + if (textChangeRange) { + Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); + + if (Debug.shouldAssert(AssertionLevel.VeryAggressive)) { + var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); + var newTextPrefix = newText.substr(0, textChangeRange.span.start); + Debug.assert(oldTextPrefix === newTextPrefix); + + var oldTextSuffix = oldText.substring(textSpanEnd(textChangeRange.span), oldText.length); + var newTextSuffix = newText.substring(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.length); + Debug.assert(oldTextSuffix === newTextSuffix); + } + } + if (textChangeRangeIsUnchanged(textChangeRange)) { // if the text didn't change, then we can just return our current source file as-is. return sourceFile; @@ -707,7 +722,6 @@ module ts { return parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion,/*syntaxCursor*/ undefined, /*setNodeParents*/ true) } - var oldText = sourceFile.text; var syntaxCursor = createSyntaxCursor(sourceFile); // Make the actual change larger so that we know to reparse anything whose lookahead diff --git a/src/services/services.ts b/src/services/services.ts index f1448a3ab0e..56e68b2f5a1 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1625,23 +1625,6 @@ module ts { export var disableIncrementalParsing = false; export function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile { - if (textChangeRange && Debug.shouldAssert(AssertionLevel.Normal)) { - var oldText = sourceFile.scriptSnapshot; - var newText = scriptSnapshot; - - Debug.assert((oldText.getLength() - textChangeRange.span.length + textChangeRange.newLength) === newText.getLength()); - - if (Debug.shouldAssert(AssertionLevel.VeryAggressive)) { - var oldTextPrefix = oldText.getText(0, textChangeRange.span.start); - var newTextPrefix = newText.getText(0, textChangeRange.span.start); - Debug.assert(oldTextPrefix === newTextPrefix); - - var oldTextSuffix = oldText.getText(textSpanEnd(textChangeRange.span), oldText.getLength()); - var newTextSuffix = newText.getText(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.getLength()); - Debug.assert(oldTextSuffix === newTextSuffix); - } - } - // If we were given a text change range, and our version or open-ness changed, then // incrementally parse this file. if (textChangeRange) { From ad7c77ea087a03c6ab9420fad7d00c8c149ddd5e Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 8 Feb 2015 17:35:54 -0800 Subject: [PATCH 7/9] Check the text change range before and after we expand it. --- src/compiler/parser.ts | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 9ed2f62bf48..9eace1946d3 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -683,6 +683,22 @@ module ts { } } + function checkChangeRange(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks: boolean) { + var oldText = sourceFile.text; + if (textChangeRange) { + Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); + + if (aggressiveChecks || Debug.shouldAssert(AssertionLevel.VeryAggressive)) { + var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); + var newTextPrefix = newText.substr(0, textChangeRange.span.start); + Debug.assert(oldTextPrefix === newTextPrefix); + + var oldTextSuffix = oldText.substring(textSpanEnd(textChangeRange.span), oldText.length); + var newTextSuffix = newText.substring(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.length); + Debug.assert(oldTextSuffix === newTextSuffix); + } + } + } // Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter // indicates what changed between the 'text' that this SourceFile has and the 'newText'. @@ -696,21 +712,7 @@ module ts { export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile { aggressiveChecks = aggressiveChecks || Debug.shouldAssert(AssertionLevel.Aggressive); - var oldText = sourceFile.text; - if (textChangeRange) { - Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); - - if (Debug.shouldAssert(AssertionLevel.VeryAggressive)) { - var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - var newTextPrefix = newText.substr(0, textChangeRange.span.start); - Debug.assert(oldTextPrefix === newTextPrefix); - - var oldTextSuffix = oldText.substring(textSpanEnd(textChangeRange.span), oldText.length); - var newTextSuffix = newText.substring(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.length); - Debug.assert(oldTextSuffix === newTextSuffix); - } - } - + checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); if (textChangeRangeIsUnchanged(textChangeRange)) { // if the text didn't change, then we can just return our current source file as-is. return sourceFile; @@ -722,11 +724,13 @@ module ts { return parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion,/*syntaxCursor*/ undefined, /*setNodeParents*/ true) } + var oldText = sourceFile.text; var syntaxCursor = createSyntaxCursor(sourceFile); // Make the actual change larger so that we know to reparse anything whose lookahead // might have intersected the change. var changeRange = extendToAffectedRange(sourceFile, textChangeRange); + checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); // Ensure that extending the affected range only moved the start of the change range // earlier in the file. From 9d6b6b422a9b0660a35a556a9b60c4cd9a908ec2 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 8 Feb 2015 17:48:56 -0800 Subject: [PATCH 8/9] Rename a few members and clean up comments. --- src/compiler/parser.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 9eace1946d3..b6a44229cb2 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -336,11 +336,16 @@ module ts { } function fixupParentReferences(sourceFile: SourceFile) { - // normally parent references are set during binding. - // however here SourceFile data is used only for syntactic features so running the whole binding process is an overhead. - // walk over the nodes and set parent references + // normally parent references are set during binding. However, for clients that only need + // a syntax tree, and no semantic features, then the binding process is an unnecessary + // overhead. This functions allows us to set all the parents, without all the expense of + // binding. + var parent: Node = sourceFile; - function walk(n: Node): void { + forEachChild(sourceFile, visitNode); + return; + + function visitNode(n: Node): void { // walk down setting parents that differ from the parent we think it should be. This // allows us to quickly bail out of setting parents for subtrees during incremental // parsing @@ -349,12 +354,10 @@ module ts { var saveParent = parent; parent = n; - forEachChild(n, walk); + forEachChild(n, visitNode); parent = saveParent; } } - - forEachChild(sourceFile, walk); } function shouldCheckNode(node: Node) { @@ -721,7 +724,7 @@ module ts { if (sourceFile.statements.length === 0) { // If we don't have any statements in the current source file, then there's no real // way to incrementally parse. So just do a full parse instead. - return parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion,/*syntaxCursor*/ undefined, /*setNodeParents*/ true) + return parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, /*syntaxCursor*/ undefined, /*setNodeParents*/ true) } var oldText = sourceFile.text; @@ -744,8 +747,8 @@ module ts { var delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length; // If we added or removed characters during the edit, then we need to go and adjust all - // the nodes after the edit. Those nodes may move forward down (if we inserted chars) - // or they may move backward (if we deleted chars). + // the nodes after the edit. Those nodes may move forward (if we inserted chars) or they + // may move backward (if we deleted chars). // // Doing this helps us out in two ways. First, it means that any nodes/tokens we want // to reuse are already at the appropriate position in the new text. That way when we @@ -1045,6 +1048,7 @@ module ts { fixupParentReferences(sourceFile); } + syntaxCursor = undefined; return sourceFile; function setContextFlag(val: Boolean, flag: ParserContextFlags) { From d0aa7891def3a5b848a06669304cd077169d3c7c Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 8 Feb 2015 18:02:13 -0800 Subject: [PATCH 9/9] Add additional incremental assert. --- src/compiler/parser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index b6a44229cb2..4ab8d9d1d5c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -580,6 +580,7 @@ module ts { // start of the tree. for (var i = 0; start > 0 && i <= maxLookahead; i++) { var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); + Debug.assert(nearestNode.pos <= start); var position = nearestNode.pos; start = Math.max(0, position - 1); @@ -936,7 +937,6 @@ module ts { var identifiers: Map = {}; var identifierCount = 0; var nodeCount = 0; - var scanner: Scanner; var token: SyntaxKind; var sourceFile = createNode(SyntaxKind.SourceFile, /*pos*/ 0); @@ -1029,7 +1029,7 @@ module ts { var parseErrorBeforeNextFinishedNode: boolean = false; // Create and prime the scanner before parsing the source elements. - scanner = createScanner(languageVersion, /*skipTrivia*/ true, sourceText, scanError); + var scanner = createScanner(languageVersion, /*skipTrivia*/ true, sourceText, scanError); token = nextToken(); processReferenceComments(sourceFile);