Created
May 7, 2017 05:36
-
-
Save azz/3ca82b8c5f5451fee18c638f5ff0a512 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../TypeScript/tests/cases/compiler/abstractPropertyNegative.ts: Error: Comment "error, not same type" was not printed. Please report this error! | |
at astComments.forEach.comment (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:69:13) | |
at Array.forEach (native) | |
at ensureAllCommentsPrinted (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:67:15) | |
at format (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:85:3) | |
at formatWithShebang (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:91:12) | |
at Object.module.exports.format (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:105:12) | |
at format (/mnt/c/Users/Lucas Azzola/Code/prettier/bin/prettier.js:217:25) | |
at err (/mnt/c/Users/Lucas Azzola/Code/prettier/bin/prettier.js:331:16) | |
at patterns.forEach.pattern (/mnt/c/Users/Lucas Azzola/Code/prettier/bin/prettier.js:375:7) | |
at Array.forEach (native) | |
../TypeScript/tests/cases/compiler/aliasErrors.ts: SyntaxError: Identifier expected. (13:11) | |
11 | import m = no; | |
12 | import m2 = no.mod; | |
> 13 | import n = 5; | |
| ^ | |
14 | import o = "s"; | |
15 | import q = null; | |
16 | import r = undefined; | |
../TypeScript/tests/cases/compiler/aliasUsageInGenericFunction.ts: SyntaxError: JSX element 'IHasVisualizationModel' has no corresponding closing tag. (23:19) | |
21 | } | |
22 | var r = foo({ a: moduleA }); | |
> 23 | var r2 = foo({ a: <IHasVisualizationModel>null }); | |
| ^ | |
24 | | |
../TypeScript/tests/cases/compiler/aliasUsageInOrExpression.ts: SyntaxError: Expression expected. (23:39) | |
21 | var d2: IHasVisualizationModel = i || moduleA; | |
22 | var d2: IHasVisualizationModel = moduleA || i; | |
> 23 | var e: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null || { x: moduleA }; | |
| ^ | |
24 | var f: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null ? { x: moduleA } : null; | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -8,4 +8,5 @@ | |
// @Filename: aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.ts | |
+ | |
import moduleA = require("./aliasWithInterfaceExportAssignmentUsedInVarInitializer_0"); | |
var d = b.q3; | |
../TypeScript/tests/cases/compiler/ambiguousGenericAssertion1.ts: SyntaxError: Identifier expected. (3:11) | |
1 | function f<T>(x: T): T { return null; } | |
2 | var r = <T>(x: T) => x; | |
> 3 | var r2 = < <T>(x: T) => T>f; // valid | |
| ^ | |
4 | var r3 = <<T>(x: T) => T>f; // ambiguous, appears to the parser as a << operation | |
5 | | |
../TypeScript/tests/cases/compiler/amdModuleName2.ts: SyntaxError: An AMD module cannot have multiple name assignments. (3:0) | |
1 | //@module: amd | |
2 | ///<amd-module name='FirstModuleName'/> | |
> 3 | ///<amd-module name='SecondModuleName'/> | |
| ^ | |
4 | class Foo { | |
5 | x: number; | |
6 | constructor() { | |
../TypeScript/tests/cases/compiler/anonymousModules.ts: SyntaxError: ';' expected. (1:7) | |
> 1 | module { | |
| ^ | |
2 | export var foo = 1; | |
3 | | |
4 | module { | |
../TypeScript/tests/cases/compiler/APISample_linter.ts: SyntaxError: '}' expected. (28:101) | |
26 | case ts.SyntaxKind.DoStatement: | |
27 | if ((<ts.IterationStatement>node).statement.kind !== ts.SyntaxKind.Block) { | |
> 28 | report(node, "A looping statement's contents should be wrapped in a block body."); | |
| ^ | |
29 | } | |
30 | break; | |
31 | | |
../TypeScript/tests/cases/compiler/argumentsObjectIterator01_ES5.ts: SyntaxError: Expression expected. (8:11) | |
6 | result.push(arg + arg); | |
7 | } | |
> 8 | return <[any, any, any]>result; | |
| ^ | |
9 | } | |
../TypeScript/tests/cases/compiler/argumentsObjectIterator01_ES6.ts: SyntaxError: Expression expected. (8:11) | |
6 | result.push(arg + arg); | |
7 | } | |
> 8 | return <[any, any, any]>result; | |
| ^ | |
9 | } | |
../TypeScript/tests/cases/compiler/argumentsObjectIterator02_ES5.ts: SyntaxError: Expression expected. (10:11) | |
8 | result.push(arg + arg); | |
9 | } | |
> 10 | return <[any, any, any]>result; | |
| ^ | |
11 | } | |
12 | | |
13 | | |
../TypeScript/tests/cases/compiler/argumentsObjectIterator02_ES6.ts: SyntaxError: Expression expected. (10:11) | |
8 | result.push(arg + arg); | |
9 | } | |
> 10 | return <[any, any, any]>result; | |
| ^ | |
11 | } | |
12 | | |
13 | | |
../TypeScript/tests/cases/compiler/arrayBestCommonTypes.ts: SyntaxError: '}' expected. (32:23) | |
30 | | |
31 | | |
> 32 | var t1: { x: number; y: base; }[] = [{ x: 7, y: new derived() }, { x: 5, y: new base() }]; | |
| ^ | |
33 | var t2: { x: boolean; y: base; }[] = [{ x: true, y: new derived() }, { x: false, y: new base() }]; | |
34 | var t3: { x: string; y: base; }[] = [{ x: undefined, y: new base() }, { x: '', y: new derived() }]; | |
35 | | |
../TypeScript/tests/cases/compiler/arrayCast.ts: SyntaxError: Expression expected. (3:0) | |
1 | // Should fail. Even though the array is contextually typed with { id: number }[], it still | |
2 | // has type { foo: string }[], which is not assignable to { id: number }[]. | |
> 3 | <{ id: number; }[]>[{ foo: "s" }]; | |
| ^ | |
4 | | |
5 | // Should succeed, as the {} element causes the type of the array to be {}[] | |
6 | <{ id: number; }[]>[{ foo: "s" }, {}]; | |
../TypeScript/tests/cases/compiler/arraySigChecking.ts: SyntaxError: Type expected. (11:28) | |
9 | } | |
10 | | |
> 11 | var foo: { [index: any]: }; | |
| ^ | |
12 | } | |
13 | | |
14 | interface myInt { | |
../TypeScript/tests/cases/compiler/arrowFunctionMissingCurlyWithSemicolon.ts: SyntaxError: Expression expected. (2:14) | |
1 | // Should error at semicolon. | |
> 2 | var f = () => ; | |
| ^ | |
3 | var b = 1 * 2 * 3 * 4; | |
4 | var square = (x: number) => x * x; | |
../TypeScript/tests/cases/compiler/arrowFunctionsMissingTokens.ts: SyntaxError: '=>' expected. (3:15) | |
1 | | |
2 | module missingArrowsWithCurly { | |
> 3 | var a = () { }; | |
| ^ | |
4 | | |
5 | var b = (): void { } | |
6 | | |
../TypeScript/tests/cases/compiler/arrowFunctionWithObjectLiteralBody1.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (1:14) | |
> 1 | var v = a => <any>{} | |
| ^ | |
../TypeScript/tests/cases/compiler/arrowFunctionWithObjectLiteralBody2.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (1:19) | |
> 1 | var v = a => <any><any>{} | |
| ^ | |
../TypeScript/tests/cases/compiler/arrowFunctionWithObjectLiteralBody3.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (2:14) | |
1 | // @target: es6 | |
> 2 | var v = a => <any>{} | |
| ^ | |
../TypeScript/tests/cases/compiler/arrowFunctionWithObjectLiteralBody4.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (2:19) | |
1 | // @target: es6 | |
> 2 | var v = a => <any><any>{} | |
| ^ | |
../TypeScript/tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts: SyntaxError: '}' expected. (1:27) | |
> 1 | var a = () => <Error>{ name: "foo", message: "bar" }; | |
| ^ | |
2 | | |
3 | var b = () => (<Error>{ name: "foo", message: "bar" }); | |
4 | | |
../TypeScript/tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts: SyntaxError: '}' expected. (2:27) | |
1 | // @target: es6 | |
> 2 | var a = () => <Error>{ name: "foo", message: "bar" }; | |
| ^ | |
3 | | |
4 | var b = () => (<Error>{ name: "foo", message: "bar" }); | |
5 | | |
../TypeScript/tests/cases/compiler/assertInWrapSomeTypeParameter.ts: SyntaxError: '>' expected. (2:25) | |
1 | class C<T extends C<T>> { | |
> 2 | foo<U extends C<C<T>>(x: U) { | |
| ^ | |
3 | return null; | |
4 | } | |
5 | } | |
../TypeScript/tests/cases/compiler/assignmentCompatability16.ts: SyntaxError: Identifier expected. (6:31) | |
4 | } | |
5 | module __test2__ { | |
> 6 | export var obj = {one: <any[]>[1]}; | |
| ^ | |
7 | export var __val__obj = obj; | |
8 | } | |
9 | __test2__.__val__obj = __test1__.__val__obj4 | |
../TypeScript/tests/cases/compiler/assignmentCompatability17.ts: SyntaxError: Identifier expected. (6:31) | |
4 | } | |
5 | module __test2__ { | |
> 6 | export var obj = {two: <any[]>[1]}; | |
| ^ | |
7 | export var __val__obj = obj; | |
8 | } | |
9 | __test2__.__val__obj = __test1__.__val__obj4 | |
../TypeScript/tests/cases/compiler/autoLift2.ts: SyntaxError: ';' expected. (5:16) | |
3 | { | |
4 | constructor() { | |
> 5 | this.foo: any; | |
| ^ | |
6 | this.bar: any; | |
7 | } | |
8 | | |
../TypeScript/tests/cases/compiler/badOverloadError.ts: SyntaxError: Expression expected. (2:21) | |
1 | function method() { | |
> 2 | var dictionary = <{ [index: string]: string; }>{}; | |
| ^ | |
3 | } | |
4 | | |
../TypeScript/tests/cases/compiler/baseIndexSignatureResolution.ts: SyntaxError: ',' expected. (12:22) | |
10 | [i: number]: Base | |
11 | } | |
> 12 | interface FooOf<TBase in Base> extends Foo { | |
| ^ | |
13 | [i: number]: TBase | |
14 | } | |
15 | var x: FooOf<Derived> = null; | |
../TypeScript/tests/cases/compiler/bases.ts: SyntaxError: ';' expected. (7:14) | |
5 | class B { | |
6 | constructor() { | |
> 7 | this.y: any; | |
| ^ | |
8 | } | |
9 | } | |
10 | | |
../TypeScript/tests/cases/compiler/bom-utf16be.ts: SyntaxError: Invalid character. (1:0) | |
> 1 | �� v a r x = 1 0 ; | |
| ^ | |
2 | | |
3 | | |
../TypeScript/tests/cases/compiler/bom-utf16le.ts: SyntaxError: Invalid character. (1:0) | |
> 1 | ��v a r x = 1 0 ; | |
| ^ | |
2 | | |
3 | | |
../TypeScript/tests/cases/compiler/callExpressionWithMissingTypeArgument1.ts: SyntaxError: Type expected. (1:6) | |
> 1 | Foo<a,,b>(); | |
| ^ | |
../TypeScript/tests/cases/compiler/callExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts: SyntaxError: ',' expected. (2:5) | |
1 | interface I<T> { | |
> 2 | <U in T>(u: U): U | |
| ^ | |
3 | } | |
4 | var i: I<string>; | |
5 | var y = i(""); // y should be string | |
../TypeScript/tests/cases/compiler/capturedParametersInInitializers1.ts: SyntaxError: JSX element 'typeof' has no corresponding closing tag. (13:24) | |
11 | // ok -used in type | |
12 | let a; | |
> 13 | function foo3(y = { x: <typeof z>a }, z = 1) { | |
| ^ | |
14 | | |
15 | } | |
../TypeScript/tests/cases/compiler/castExpressionParentheses.ts: SyntaxError: '}' expected. (5:8) | |
3 | // parentheses should be omitted | |
4 | // literals | |
> 5 | (<any>{a:0}); | |
| ^ | |
6 | (<any>[1,3,]); | |
7 | (<any>"string"); | |
8 | (<any>23.0); | |
../TypeScript/tests/cases/compiler/castNewObjectBug.ts: SyntaxError: JSX element 'Foo' has no corresponding closing tag. (2:10) | |
1 | interface Foo { } | |
> 2 | var xx = <Foo> new Object(); | |
| ^ | |
../TypeScript/tests/cases/compiler/castOfAwait.ts: SyntaxError: JSX element 'number' has no corresponding closing tag. (6:32) | |
4 | typeof await 0; | |
5 | void await 0; | |
> 6 | await void <string> typeof <number> void await 0; | |
| ^ | |
7 | await await 0; | |
8 | } | |
9 | | |
../TypeScript/tests/cases/compiler/castOfYield.ts: SyntaxError: JSX element 'number' has no corresponding closing tag. (4:5) | |
2 | <number> (yield 0); | |
3 | // Unlike await, yield is not allowed to appear in a simple unary expression. | |
> 4 | <number> yield 0; | |
| ^ | |
5 | } | |
6 | | |
../TypeScript/tests/cases/compiler/castParentheses.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (11:10) | |
9 | var b = (<any>new a); | |
10 | var b = (<any>new a.b); | |
> 11 | var b = (<any>new a).b | |
| ^ | |
../TypeScript/tests/cases/compiler/castTest.ts: SyntaxError: Identifier expected. (10:13) | |
8 | var s = <string>""; | |
9 | | |
> 10 | var ar = <any[]>null; | |
| ^ | |
11 | | |
12 | var f = <(res : number) => void>null; | |
13 | | |
../TypeScript/tests/cases/compiler/class2.ts: SyntaxError: Declaration or statement expected. (1:28) | |
> 1 | class foo { constructor() { static f = 3; } } | |
| ^ | |
../TypeScript/tests/cases/compiler/ClassDeclaration26.ts: SyntaxError: ';' expected. (2:21) | |
1 | class C { | |
> 2 | public const var export foo = 10; | |
| ^ | |
3 | | |
4 | var constructor() { } | |
5 | } | |
../TypeScript/tests/cases/compiler/classExpressionWithDecorator1.ts: SyntaxError: Expression expected. (2:8) | |
1 | // @experimentaldecorators: true | |
> 2 | var v = @decorate class C { static p = 1 }; | |
| ^ | |
../TypeScript/tests/cases/compiler/classMemberWithMissingIdentifier.ts: SyntaxError: Declaration expected. (2:10) | |
1 | class C { | |
> 2 | public {}; | |
| ^ | |
3 | } | |
../TypeScript/tests/cases/compiler/classMemberWithMissingIdentifier2.ts: SyntaxError: Declaration expected. (2:10) | |
1 | class C { | |
> 2 | public {[name:string]:VariableDeclaration}; | |
| ^ | |
3 | } | |
../TypeScript/tests/cases/compiler/classUpdateTests.ts: SyntaxError: Declaration or statement expected. (93:2) | |
91 | class O { | |
92 | constructor() { | |
> 93 | public p1 = 0; // ERROR | |
| ^ | |
94 | } | |
95 | } | |
96 | | |
../TypeScript/tests/cases/compiler/collisionCodeGenModuleWithUnicodeNames.ts: SyntaxError: Invalid character. (1:0) | |
> 1 | ��m o d u l e Mb���0+h!����0 M M ! M 0 > � 1_0l i JHFJCH/� � � � Mb���0+h!����0 M M ! M 0 > � 1_0l i JHFJCH/� � � � A b c d 1 2 3 { | |
| ^ | |
2 | | |
3 | e x p o r t c l a s s Mb���0+h!����0 M M ! M 0 > � 1_0l i JHFJCH/� � � � Mb���0+h!����0 M M ! M 0 > � 1_0l i JHFJCH/� � � � A b c d 1 2 3 { | |
4 | | |
../TypeScript/tests/cases/compiler/commentOnDecoratedClassDeclaration.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/commentOnParenthesizedExpressionOpenParen1.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (3:1) | |
1 | var j; | |
2 | var f: () => any; | |
> 3 | <any>( /* Preserve */ j = f()); | |
| ^ | |
4 | | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -48,5 +48,5 @@ | |
static set s3(/** this is value*/ value: number) { | |
c1.s1 = c1.s2(value); | |
- } /*setter*/ /*trailing comment 2 */ | |
+ } /*trailing comment 2 */ /*setter*/ | |
public nc_p1: number; | |
public nc_p2(b: number) { | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -38,18 +38,15 @@ | |
/// Triple slash comment | |
/** jsdoc comment */ function jsDocMixedComments2() {} | |
-jsDocMixedComments2(); /*** another jsDocComment*/ | |
+jsDocMixedComments2(); /*** another jsDocComment*/ /// Triple slash comment | |
-/** jsdoc comment */ /// Triple slash comment | |
-function jsDocMixedComments3() {} | |
-jsDocMixedComments3(); /*** another jsDocComment*/ | |
+/** jsdoc comment */ function jsDocMixedComments3() {} | |
+jsDocMixedComments3(); /*** another jsDocComment*/ /// Triple slash comment | |
-/** jsdoc comment */ /// Triple slash comment | |
-/// Triple slash comment 2 | |
+/** jsdoc comment */ /// Triple slash comment 2 | |
function jsDocMixedComments4() {} | |
-jsDocMixedComments4(); /*** another jsDocComment*/ | |
+jsDocMixedComments4(); /*** another jsDocComment*/ /// Triple slash comment | |
/// Triple slash comment 1 | |
-/** jsdoc comment */ /// Triple slash comment | |
-/// Triple slash comment 2 | |
+/** jsdoc comment */ /// Triple slash comment 2 | |
function jsDocMixedComments5() {} | |
jsDocMixedComments5(); | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -4,7 +4,6 @@ | |
/** Enum of colors*/ | |
-enum Colors /* blue */ { Cornflower, FancyPink } | |
+enum Colors /* blue */ { Cornflower, FancyPink } // trailing comment | |
/** Fancy name for 'blue'*/ | |
-/** Fancy name for 'pink'*/ // trailing comment | |
-var x = Colors.Cornflower; | |
+/** Fancy name for 'pink'*/ var x = Colors.Cornflower; | |
x = Colors.FancyPink; | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -40,5 +40,5 @@ | |
function blah2( | |
- a: string /* single line multiple trailing comments */ /* second */ | |
+ a: string /* second */ /* single line multiple trailing comments */ | |
) {} | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -3,8 +3,8 @@ | |
id1: /* c1 */ "hello", | |
id2: /*! @ngInject */ (details: any) => details.id, | |
- id3: /*! @ngInject */ | |
- (details: any) => details.id, | |
- id4: /*! @ngInject */ | |
- /* C2 */ | |
+ /*! @ngInject */ | |
+ id3: (details: any) => details.id, | |
+ /*! @ngInject */ | |
+ id4: /* C2 */ | |
(details: any) => details.id | |
}; | |
../TypeScript/tests/cases/compiler/commentsTypeParameters.ts: Error: Comment "*type" was not printed. Please report this error! | |
at astComments.forEach.comment (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:69:13) | |
at Array.forEach (native) | |
at ensureAllCommentsPrinted (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:67:15) | |
at format (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:85:3) | |
at formatWithShebang (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:91:12) | |
at Object.module.exports.format (/mnt/c/Users/Lucas Azzola/Code/prettier/index.js:105:12) | |
at format (/mnt/c/Users/Lucas Azzola/Code/prettier/bin/prettier.js:217:25) | |
at err (/mnt/c/Users/Lucas Azzola/Code/prettier/bin/prettier.js:331:16) | |
at patterns.forEach.pattern (/mnt/c/Users/Lucas Azzola/Code/prettier/bin/prettier.js:375:7) | |
at Array.forEach (native) | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -14,5 +14,5 @@ | |
/** this is multiline comment | |
* All these variables are of number type */ | |
-var anotherAnotherVariable = 70; /* multiple trailing comments */ /* these are multiple trailing comments */ | |
+var anotherAnotherVariable = 70; /* these are multiple trailing comments */ /* multiple trailing comments */ | |
/** Triple slash multiline comment*/ | |
../TypeScript/tests/cases/compiler/commonSourceDirectory.ts: SyntaxError: ';' expected. (22:21) | |
20 | // @filename: /app/tsconfig.json | |
21 | { | |
> 22 | "compilerOptions": { | |
| ^ | |
23 | "outDir": "bin", | |
24 | "typeRoots": ["../types"], | |
25 | "sourceMap": true, | |
../TypeScript/tests/cases/compiler/commonSourceDirectory_dts.ts: SyntaxError: ';' expected. (15:21) | |
13 | // @filename: /app/tsconfig.json | |
14 | { | |
> 15 | "compilerOptions": { | |
| ^ | |
16 | "outDir": "bin", | |
17 | "sourceMap": true, | |
18 | "mapRoot": "myMapRoot", | |
../TypeScript/tests/cases/compiler/computedPropertiesInDestructuring1.ts: SyntaxError: '=' expected. (8:10) | |
6 | | |
7 | let foo2 = () => "bar"; | |
> 8 | let { foo2(): bar3 } = { bar: "bar" }; | |
| ^ | |
9 | | |
10 | let [{ foo: bar4 }] = [{ bar: "bar" }]; | |
11 | let [{ foo2(): bar5 }] = [{ bar: "bar" }]; | |
../TypeScript/tests/cases/compiler/computedPropertiesInDestructuring1_ES6.ts: SyntaxError: '=' expected. (10:10) | |
8 | | |
9 | let foo2 = () => "bar"; | |
> 10 | let { foo2(): bar3 } = { bar: "bar" }; | |
| ^ | |
11 | | |
12 | let [{ foo: bar4 }] = [{ bar: "bar" }]; | |
13 | let [{ foo2(): bar5 }] = [{ bar: "bar" }]; | |
../TypeScript/tests/cases/compiler/computedPropertiesInDestructuring2.ts: SyntaxError: '=' expected. (2:10) | |
1 | let foo2 = () => "bar"; | |
> 2 | let { foo2(): bar3 } = {}; | |
| ^ | |
3 | | |
../TypeScript/tests/cases/compiler/computedPropertiesInDestructuring2_ES6.ts: SyntaxError: '=' expected. (4:10) | |
2 | | |
3 | let foo2 = () => "bar"; | |
> 4 | let { foo2(): bar3 } = {}; | |
| ^ | |
5 | | |
../TypeScript/tests/cases/compiler/conflictMarkerTrivia1.ts: SyntaxError: Merge conflict marker encountered. (2:0) | |
1 | class C { | |
> 2 | <<<<<<< HEAD | |
| ^ | |
3 | v = 1; | |
4 | ======= | |
5 | v = 2; | |
../TypeScript/tests/cases/compiler/conflictMarkerTrivia2.ts: SyntaxError: Merge conflict marker encountered. (3:0) | |
1 | class C { | |
2 | foo() { | |
> 3 | <<<<<<< B | |
| ^ | |
4 | a(); | |
5 | } | |
6 | ======= | |
../TypeScript/tests/cases/compiler/conflictMarkerTrivia4.ts: SyntaxError: Merge conflict marker encountered. (2:0) | |
1 | const x = <div> | |
> 2 | <<<<<<< HEAD | |
| ^ | |
../TypeScript/tests/cases/compiler/constraintReferencingTypeParameterFromSameTypeParameterList.ts: SyntaxError: ',' expected. (8:4) | |
6 | interface I1< | |
7 | T, | |
> 8 | U in I1<T, any> // Error, any does not satisfy the constraint I1<T, any> | |
| ^ | |
9 | > {} | |
10 | interface I2<T, U in T> {} | |
11 | | |
../TypeScript/tests/cases/compiler/constraints0.ts: SyntaxError: ',' expected. (9:14) | |
7 | } | |
8 | | |
> 9 | interface C<T in A> { | |
| ^ | |
10 | x: T | |
11 | } | |
12 | | |
ast(input) !== ast(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -18,15 +18,10 @@ | |
"params": [ | |
{ | |
- "type": "TSParameterProperty", | |
- "accessibility": null, | |
- "isReadonly": false, | |
- "parameter": { | |
- "type": "Identifier", | |
- "name": "a", | |
+ "type": "Identifier", | |
+ "name": "a", | |
+ "typeAnnotation": { | |
+ "type": "TypeAnnotation", | |
"typeAnnotation": { | |
- "type": "TypeAnnotation", | |
- "typeAnnotation": { | |
- "type": "TSNumberKeyword" | |
- } | |
+ "type": "TSNumberKeyword" | |
} | |
}, | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -1,4 +1,3 @@ | |
class foo { | |
- constructor (static a: number) { | |
- } | |
-} | |
\ No newline at end of file | |
+ constructor(a: number) {} | |
+} | |
ast(input) !== ast(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -18,15 +18,10 @@ | |
"params": [ | |
{ | |
- "type": "TSParameterProperty", | |
- "accessibility": null, | |
- "isReadonly": false, | |
- "parameter": { | |
- "type": "Identifier", | |
- "name": "a", | |
+ "type": "Identifier", | |
+ "name": "a", | |
+ "typeAnnotation": { | |
+ "type": "TypeAnnotation", | |
"typeAnnotation": { | |
- "type": "TypeAnnotation", | |
- "typeAnnotation": { | |
- "type": "TSNumberKeyword" | |
- } | |
+ "type": "TSNumberKeyword" | |
} | |
}, | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -1,4 +1,3 @@ | |
class foo { | |
- constructor (export a: number) { | |
- } | |
+ constructor(a: number) {} | |
} | |
../TypeScript/tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts: SyntaxError: ';' expected. (13:18) | |
11 | } | |
12 | | |
> 13 | import fs = module("fs"); | |
| ^ | |
14 | | |
15 | | |
16 | module TypeScriptAllInOne { | |
../TypeScript/tests/cases/compiler/contextualSignatureInstantiation1.ts: SyntaxError: '...' expected. (5:34) | |
3 | var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed | |
4 | | |
> 5 | declare function map2<S extends { length: number }, T>(f: (x: S) => T): (a: S[]) => T[]; | |
| ^ | |
6 | var e2 = <K>(x: string, y?: K) => x.length; | |
7 | var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } | |
../TypeScript/tests/cases/compiler/contextualSignatureInstantiation2.ts: SyntaxError: JSX element 'T' has no corresponding closing tag. (4:9) | |
2 | var dot: <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T) => (_: U) => S; | |
3 | dot = <T, S>(f: (_: T) => S) => <U>(g: (_: U) => T): (r:U) => S => (x) => f(g(x)); | |
> 4 | var id: <T>(x:T) => T; | |
| ^ | |
5 | var r23 = dot(id)(id); | |
../TypeScript/tests/cases/compiler/contextualSignatureInstatiationContravariance.ts: SyntaxError: ',' expected. (5:11) | |
3 | interface Elephant extends Animal { y2 } | |
4 | | |
> 5 | var f2: <T in Animal>(x: T, y: T) => void; | |
| ^ | |
6 | | |
7 | var g2: (g: Giraffe, e: Elephant) => void; | |
8 | g2 = f2; // valid because both Giraffe and Elephant satisfy the constraint. T is Animal | |
../TypeScript/tests/cases/compiler/contextualSignatureInstatiationCovariance.ts: SyntaxError: ',' expected. (5:11) | |
3 | interface Giraffe extends Animal, TallThing { y } | |
4 | | |
> 5 | var f2: <T in Giraffe>(x: T, y: T) => void; | |
| ^ | |
6 | | |
7 | var g2: (a: Animal, t: TallThing) => void; | |
8 | g2 = f2; // While neither Animal nor TallThing satisfy the constraint, T is at worst a Giraffe and compatible with both via covariance. | |
../TypeScript/tests/cases/compiler/contextualTyping.ts: SyntaxError: '}' expected. (31:5) | |
29 | var c3t1: (s: string) => string = (function(s) { return s }); | |
30 | var c3t2 = <IFoo>({ | |
> 31 | n: 1 | |
| ^ | |
32 | }) | |
33 | var c3t3: number[] = []; | |
34 | var c3t4: () => IFoo = function() { return <IFoo>({}) }; | |
../TypeScript/tests/cases/compiler/contextualTyping11.ts: SyntaxError: JSX element 'foo' has no corresponding closing tag. (1:42) | |
> 1 | class foo { public bar:{id:number;}[] = [<foo>({})]; } | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping18.ts: SyntaxError: Expression expected. (1:24) | |
> 1 | var foo: {id:number;} = <{id:number;}>({ }); foo = {id: 5}; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping25.ts: SyntaxError: Expression expected. (1:40) | |
> 1 | function foo(param:{id:number;}){}; foo(<{id:number;}>({})); | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping26.ts: SyntaxError: Expression expected. (1:40) | |
> 1 | function foo(param:{id:number;}){}; foo(<{id:number;}>({})); | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping27.ts: SyntaxError: Expression expected. (1:40) | |
> 1 | function foo(param:{id:number;}){}; foo(<{id:number;}>({})); | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping34.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{ id: number;}> ({id:4}); | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping35.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{ id: number;}> {id:4, name: "as"}; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping36.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{ id: number; }[]>[{ id: 4 }, <{ id: number; }>({ })]; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping37.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{ id: number; }[]>[{ foo: "s" }, { }]; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping38.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{ (): number; }> function(a) { return a }; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping39.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{ (): number; }> function() { return "err"; }; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping40.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{():number; (i:number):number; }> function(){return 1;}; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping41.ts: SyntaxError: Expression expected. (1:10) | |
> 1 | var foo = <{():number; (i:number):number; }> (function(){return "err";}); | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping7.ts: SyntaxError: Expression expected. (1:26) | |
> 1 | var foo:{id:number;}[] = [<{id:number;}>({})]; | |
| ^ | |
../TypeScript/tests/cases/compiler/contextualTyping8.ts: SyntaxError: Expression expected. (1:26) | |
> 1 | var foo:{id:number;}[] = [<{id:number;}>({})]; | |
| ^ | |
../TypeScript/tests/cases/compiler/controlFlowInstanceof.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -23,5 +23,5 @@ | |
* @param {string} string String to repeat | |
* @param {number} times Number of times to repeat string. Integer. | |
- * @see http://jsperf.com/string-repeater/2 | |
+ * @see http:jsperf.com/string-repeater/2 | |
*/ | |
function repeatString(string, times) { | |
../TypeScript/tests/cases/compiler/convertKeywordsYes.ts: SyntaxError: '(' expected. (177:21) | |
175 | | |
176 | class bigClass { | |
> 177 | public constructor = 0; | |
| ^ | |
178 | public any = 0; | |
179 | public boolean = 0; | |
180 | public implements = 0; | |
../TypeScript/tests/cases/compiler/declarationEmitFirstTypeArgumentGenericFunctionType.ts: SyntaxError: '=' expected. (6:13) | |
4 | | |
5 | class X<A> {} | |
> 6 | var prop11: X<<Tany>() => Tany>; // spaces before the first type argument | |
| ^ | |
7 | var prop12: X<(<Tany>() => Tany)>; // spaces before the first type argument | |
8 | function f1() { | |
9 | // Inferred return type | |
../TypeScript/tests/cases/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.ts: SyntaxError: Expression expected. (4:24) | |
2 | | |
3 | class A {} | |
> 4 | interface Class extends typeof A {} | |
| ^ | |
5 | | |
../TypeScript/tests/cases/compiler/declarationEmitInvalidExport.ts: SyntaxError: Declaration or statement expected. (7:0) | |
5 | } | |
6 | export type MyClass = typeof myClass; | |
> 7 | } | |
| ^ | |
8 | | |
../TypeScript/tests/cases/compiler/declarationEmitPromise.ts: SyntaxError: Identifier expected. (14:51) | |
12 | let func = <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T): T => | |
13 | f.apply(this, result); | |
> 14 | let rfunc: typeof func & {} = func as any; // <- This is the only difference | |
| ^ | |
15 | return rfunc | |
16 | } | |
17 | | |
../TypeScript/tests/cases/compiler/declarationEmitUnknownImport2.ts: SyntaxError: '=' expected. (5:11) | |
3 | // @declaration: true | |
4 | | |
> 5 | import Foo From './Foo'; // Syntax error | |
| ^ | |
6 | export default Foo | |
../TypeScript/tests/cases/compiler/declareIdentifierAsBeginningOfStatementExpression01.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/declFileCallSignatures.ts: SyntaxError: ',' expected. (33:5) | |
31 | | |
32 | export interface ICallSignatureWithOwnTypeParametes { | |
> 33 | <T in ICallSignature>(a: T): string | |
| ^ | |
34 | } | |
35 | | |
36 | // @Filename: declFileCallSignatures_1.ts | |
../TypeScript/tests/cases/compiler/declFileConstructSignatures.ts: SyntaxError: ',' expected. (33:9) | |
31 | | |
32 | export interface IConstructSignatureWithOwnTypeParametes { | |
> 33 | new <T in IConstructSignature>(a: T): T | |
| ^ | |
34 | } | |
35 | | |
36 | // @Filename: declFileConstructSignatures_1.ts | |
../TypeScript/tests/cases/compiler/declFileGenericType2.ts: SyntaxError: ',' expected. (7:34) | |
5 | } | |
6 | declare namespace templa.mvc { | |
> 7 | interface IController<ModelType in templa.mvc.IModel> {} | |
| ^ | |
8 | } | |
9 | declare namespace templa.mvc { | |
10 | class AbstractController<ModelType extends templa.mvc.IModel> | |
../TypeScript/tests/cases/compiler/declFileRestParametersOfFunctionAndFunctionType.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (8:26) | |
6 | function f4<T extends (...args) => void>() { } | |
7 | function f5<T extends { (...args): void }>() { } | |
> 8 | var f6 = () => { return [<any>10]; } | |
| ^ | |
9 | | |
10 | | |
11 | | |
../TypeScript/tests/cases/compiler/declInput.ts: SyntaxError: '}' expected. (9:41) | |
7 | public f() { return ''; } | |
8 | public g() { return {a: <bar>null, b: undefined, c: void 4 }; } | |
> 9 | public h(x = 4, y = null, z = '') { x++; } | |
| ^ | |
10 | } | |
11 | | |
../TypeScript/tests/cases/compiler/declInput3.ts: SyntaxError: '}' expected. (9:41) | |
7 | public f() { return ''; } | |
8 | public g() { return {a: <bar>null, b: undefined, c: void 4 }; } | |
> 9 | public h(x = 4, y = null, z = '') { x++; } | |
| ^ | |
10 | } | |
11 | | |
../TypeScript/tests/cases/compiler/decoratorInJsFile.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorInJsFile1.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/decoratorMetadataOnInferredType.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/decoratorMetadataPromise.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/decoratorMetadataRestParameterWithImportedType.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithConstructorType.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision2.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision3.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision4.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision5.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision6.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision8.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/decoratorWithUnderscoreMethod.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
ast(input) !== ast(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -82,16 +82,16 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "++", | |
- "prefix": false, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "Literal", | |
+ "value": 1 | |
+ }, | |
+ "right": { | |
+ "type": "UpdateExpression", | |
+ "operator": "++", | |
+ "prefix": false, | |
+ "argument": { | |
"type": "Literal", | |
- "value": 1 | |
- }, | |
- "right": { | |
- "type": "Literal", | |
"value": 2 | |
} | |
@@ -102,16 +102,16 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "--", | |
- "prefix": false, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "Literal", | |
+ "value": 1 | |
+ }, | |
+ "right": { | |
+ "type": "UpdateExpression", | |
+ "operator": "--", | |
+ "prefix": false, | |
+ "argument": { | |
"type": "Literal", | |
- "value": 1 | |
- }, | |
- "right": { | |
- "type": "Literal", | |
"value": 2 | |
} | |
@@ -122,18 +122,18 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "++", | |
- "prefix": true, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "UpdateExpression", | |
+ "operator": "++", | |
+ "prefix": true, | |
+ "argument": { | |
"type": "Literal", | |
"value": 1 | |
- }, | |
- "right": { | |
- "type": "Literal", | |
- "value": 2 | |
} | |
+ }, | |
+ "right": { | |
+ "type": "Literal", | |
+ "value": 2 | |
} | |
} | |
@@ -142,18 +142,18 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "--", | |
- "prefix": true, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "UpdateExpression", | |
+ "operator": "--", | |
+ "prefix": true, | |
+ "argument": { | |
"type": "Literal", | |
"value": 1 | |
- }, | |
- "right": { | |
- "type": "Literal", | |
- "value": 2 | |
} | |
+ }, | |
+ "right": { | |
+ "type": "Literal", | |
+ "value": 2 | |
} | |
} | |
@@ -162,17 +162,17 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "++", | |
- "prefix": false, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "Identifier", | |
+ "name": "x" | |
+ }, | |
+ "right": { | |
+ "type": "UpdateExpression", | |
+ "operator": "++", | |
+ "prefix": false, | |
+ "argument": { | |
"type": "Identifier", | |
"name": "x" | |
- }, | |
- "right": { | |
- "type": "Identifier", | |
- "name": "x" | |
} | |
} | |
@@ -182,17 +182,17 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "--", | |
- "prefix": false, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "Identifier", | |
+ "name": "x" | |
+ }, | |
+ "right": { | |
+ "type": "UpdateExpression", | |
+ "operator": "--", | |
+ "prefix": false, | |
+ "argument": { | |
"type": "Identifier", | |
"name": "x" | |
- }, | |
- "right": { | |
- "type": "Identifier", | |
- "name": "x" | |
} | |
} | |
@@ -202,18 +202,18 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "++", | |
- "prefix": true, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "UpdateExpression", | |
+ "operator": "++", | |
+ "prefix": true, | |
+ "argument": { | |
"type": "Identifier", | |
"name": "x" | |
- }, | |
- "right": { | |
- "type": "Identifier", | |
- "name": "x" | |
} | |
+ }, | |
+ "right": { | |
+ "type": "Identifier", | |
+ "name": "x" | |
} | |
} | |
@@ -222,18 +222,18 @@ | |
"type": "ExpressionStatement", | |
"expression": { | |
- "type": "UpdateExpression", | |
- "operator": "--", | |
- "prefix": true, | |
- "argument": { | |
- "type": "BinaryExpression", | |
- "operator": "+", | |
- "left": { | |
+ "type": "BinaryExpression", | |
+ "operator": "+", | |
+ "left": { | |
+ "type": "UpdateExpression", | |
+ "operator": "--", | |
+ "prefix": true, | |
+ "argument": { | |
"type": "Identifier", | |
"name": "x" | |
- }, | |
- "right": { | |
- "type": "Identifier", | |
- "name": "x" | |
} | |
+ }, | |
+ "right": { | |
+ "type": "Identifier", | |
+ "name": "x" | |
} | |
} | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -2,23 +2,23 @@ | |
// errors | |
-1 ++; | |
+1++; | |
-(1)++; | |
-(1)--; | |
+1++; | |
+1--; | |
-++(1); | |
---(1); | |
+++1; | |
+--1; | |
-(1 + 2)++; | |
-(1 + 2)--; | |
+1 + 2++; | |
+1 + 2--; | |
-++(1 + 2); | |
---(1 + 2); | |
+++1 + 2; | |
+--1 + 2; | |
-(x + x)++; | |
-(x + x)--; | |
+x + x++; | |
+x + x--; | |
-++(x + x); | |
---(x + x); | |
+++x + x; | |
+--x + x; | |
//OK | |
@@ -29,9 +29,9 @@ | |
--x; | |
-(x)++; | |
---(x); | |
+x++; | |
+--x; | |
-((x))++; | |
-((x))--; | |
+x++; | |
+x--; | |
x[x++]++; | |
../TypeScript/tests/cases/compiler/deeplyNestedCheck.ts: SyntaxError: ',' expected. (8:10) | |
6 | | |
7 | interface Snapshot<T> extends DataSnapshot { | |
> 8 | child<U in keyof T>(path: U): Snapshot<T[U]> | |
| ^ | |
9 | } | |
10 | | |
../TypeScript/tests/cases/compiler/defaultArgsInFunctionExpressions.ts: SyntaxError: Expression expected. (25:4) | |
23 | module T { } | |
24 | module U { | |
> 25 | export var x; | |
| ^ | |
26 | } | |
27 | | |
28 | var f6 = (t = T) => { }; | |
../TypeScript/tests/cases/compiler/defaultValueInFunctionTypes.ts: SyntaxError: Expression expected. (2:8) | |
1 | var x: (a: number = 1) => number; | |
> 2 | var y = <(a : string = "") => any>(undefined) | |
| ^ | |
../TypeScript/tests/cases/compiler/dontShowCompilerGeneratedMembers.ts: SyntaxError: Type parameter declaration expected. (3:5) | |
1 | var f: { | |
2 | x: number; | |
> 3 | <- | |
| ^ | |
4 | }; | |
../TypeScript/tests/cases/compiler/dottedModuleName.ts: SyntaxError: '{' or ';' expected. (3:28) | |
1 | module M { | |
2 | export module N { | |
> 3 | export function f(x:number)=>2*x; | |
| ^ | |
4 | export module X.Y.Z { | |
5 | export var v2=f(v); | |
6 | } | |
../TypeScript/tests/cases/compiler/downlevelLetConst1.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1121:20) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
../TypeScript/tests/cases/compiler/duplicateLocalVariable1.ts: SyntaxError: ';' expected. (3:3) | |
1 | | |
2 | // @allowUnreachableCode: true | |
> 3 | / /@module: commonjs | |
| ^ | |
4 | | |
5 | //import FileManager = require('filemanager'); | |
6 | //import App = require('app'); | |
../TypeScript/tests/cases/compiler/duplicateTypeParameters2.ts: SyntaxError: ',' expected. (8:14) | |
6 | } | |
7 | | |
> 8 | interface I<T in A, T in B> {} | |
| ^ | |
9 | | |
../TypeScript/tests/cases/compiler/emitBundleWithShebang1.ts: SyntaxError: Invalid character. (5:0) | |
3 | // @module: amd | |
4 | | |
> 5 | #!/usr/bin/env gjs | |
| ^ | |
6 | class Doo {} | |
7 | class Scooby extends Doo {} | |
../TypeScript/tests/cases/compiler/emitBundleWithShebang2.ts: SyntaxError: Invalid character. (6:0) | |
4 | | |
5 | // @Filename: test.ts | |
> 6 | #!/usr/bin/env gjs | |
| ^ | |
7 | class Doo {} | |
8 | class Scooby extends Doo {} | |
9 | | |
../TypeScript/tests/cases/compiler/emitBundleWithShebangAndPrologueDirectives1.ts: SyntaxError: Invalid character. (6:0) | |
4 | | |
5 | // @Filename: test.ts | |
> 6 | #!/usr/bin/env gjs | |
| ^ | |
7 | "use strict" | |
8 | class Doo {} | |
9 | class Scooby extends Doo {} | |
../TypeScript/tests/cases/compiler/emitBundleWithShebangAndPrologueDirectives2.ts: SyntaxError: Invalid character. (6:0) | |
4 | | |
5 | // @Filename: test.ts | |
> 6 | #!/usr/bin/env gjs | |
| ^ | |
7 | "use strict" | |
8 | class Doo {} | |
9 | class Scooby extends Doo {} | |
../TypeScript/tests/cases/compiler/emitDecoratorMetadata_object.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/emitDecoratorMetadata_restArgs.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/emptyMemberAccess.ts: SyntaxError: Expression expected. (3:4) | |
1 | function getObj() { | |
2 | | |
> 3 | ().toString(); | |
| ^ | |
4 | | |
5 | } | |
6 | | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -8,5 +8,5 @@ | |
function foo(e: E) {} | |
-foo(a); // shouldn't error | |
+foo(a); shouldn't error | |
../TypeScript/tests/cases/compiler/enumConflictsWithGlobalIdentifier.ts: SyntaxError: Identifier expected. (4:28) | |
2 | IgnoreRulesSpecific = 0, | |
3 | } | |
> 4 | var x = IgnoreRulesSpecific. | |
| ^ | |
5 | var y = Position.IgnoreRulesSpecific; | |
6 | | |
../TypeScript/tests/cases/compiler/enumMemberResolution.ts: SyntaxError: Identifier expected. (4:28) | |
2 | IgnoreRulesSpecific = 0 | |
3 | } | |
> 4 | var x = IgnoreRulesSpecific. // error | |
| ^ | |
5 | var y = 1; | |
6 | var z = Position2.IgnoreRulesSpecific; // no error | |
7 | | |
../TypeScript/tests/cases/compiler/enumWithParenthesizedInitializer1.ts: SyntaxError: ')' expected. (3:0) | |
1 | enum E { | |
2 | e = -(3 | |
> 3 | } | |
| ^ | |
../TypeScript/tests/cases/compiler/errorHandlingInInstanceOf.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/errorRecoveryInClassDeclaration.ts: SyntaxError: ',' expected. (4:19) | |
2 | public bar() { | |
3 | var v = foo( | |
> 4 | public blaz() {} | |
| ^ | |
5 | ); | |
6 | } | |
7 | } | |
../TypeScript/tests/cases/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.ts: SyntaxError: Identifier expected. (4:14) | |
2 | function foo() { | |
3 | if (true) { | |
> 4 | B. | |
| ^ | |
5 | | |
6 | | |
7 | namespace B { | |
../TypeScript/tests/cases/compiler/errorsInGenericTypeReference.ts: SyntaxError: ',' expected. (42:23) | |
40 | class testClass4<T extends { x: V }> {} // error: could not find symbol V | |
41 | | |
> 42 | interface testClass5<T in Foo<{ x: V }>> {} // error: could not find symbol V | |
| ^ | |
43 | | |
44 | class testClass6<T> { | |
45 | method<M extends { x: V }>(): void {} // error: could not find symbol V | |
../TypeScript/tests/cases/compiler/es5-asyncFunctionBinaryExpressions.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
ast(input) !== ast(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -88,5 +88,7 @@ | |
"implements": [], | |
"decorators": [] | |
- } | |
+ }, | |
+ "specifiers": [], | |
+ "source": null | |
}, | |
{ | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -4,13 +4,12 @@ | |
declare module "foo" { | |
- export var before: C; | |
+ export var before: C; | |
- export default class C { | |
- method(): C; | |
- } | |
+ export class C { | |
+ method(): C; | |
+ } | |
- export var after: C; | |
+ export var after: C; | |
- export var t: typeof C; | |
+ export var t: typeof C; | |
} | |
- | |
ast(input) !== ast(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -63,5 +63,7 @@ | |
} | |
} | |
- } | |
+ }, | |
+ "specifiers": [], | |
+ "source": null | |
}, | |
{ | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -4,8 +4,8 @@ | |
declare module "bar" { | |
- var before: typeof func; | |
+ var before: typeof func; | |
- export default function func(): typeof func; | |
+ export function func(): typeof func | |
\ No newline at end of file | |
- var after: typeof func; | |
-} | |
+ var after: typeof func; | |
+} | |
../TypeScript/tests/cases/compiler/es6ClassTest2.ts: SyntaxError: ',' expected. (20:23) | |
18 | | |
19 | class GetSetMonster { | |
> 20 | constructor(public name: string, private _health: number) { | |
| ^ | |
21 | | |
22 | } | |
23 | | |
../TypeScript/tests/cases/compiler/es6ClassTest9.ts: SyntaxError: '{' expected. (1:17) | |
> 1 | declare class foo(); | |
| ^ | |
2 | function foo() {} | |
3 | | |
../TypeScript/tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts: SyntaxError: Identifier expected. (4:9) | |
2 | | |
3 | import { yield } from "somemodule"; // Allowed | |
> 4 | import { default } from "somemodule"; // Error - as this is keyword that is not allowed as identifier | |
| ^ | |
5 | import { yield as default } from "somemodule"; // error to use default as binding name | |
6 | import { default as yield } from "somemodule"; // no error | |
7 | import { default as default } from "somemodule"; // default as is ok, error of default binding name | |
../TypeScript/tests/cases/compiler/es6ImportNamedImportParsingError.ts: SyntaxError: Identifier expected. (9:9) | |
7 | | |
8 | // @filename: es6ImportNamedImportParsingError_1.ts | |
> 9 | import { * } from "es6ImportNamedImportParsingError_0"; | |
| ^ | |
10 | import defaultBinding, from "es6ImportNamedImportParsingError_0"; | |
11 | import , { a } from "es6ImportNamedImportParsingError_0"; | |
12 | import { a }, from "es6ImportNamedImportParsingError_0"; | |
../TypeScript/tests/cases/compiler/es6ImportParseErrors.ts: SyntaxError: Declaration or statement expected. (3:0) | |
1 | // @target: es6 | |
2 | | |
> 3 | import 10; | |
| ^ | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -11,5 +11,5 @@ | |
declare function foo(...args: any[]): any | |
-foo | |
+foo; | |
export class D { | |
static s = 0; | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -4,5 +4,5 @@ | |
declare function foo(...args: any[]): any | |
-foo | |
+foo; | |
export default class C { | |
static x() { | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -4,5 +4,5 @@ | |
declare function foo(...args: any[]): any | |
-foo | |
+foo; | |
export default class D { | |
static s = 0; | |
../TypeScript/tests/cases/compiler/escapedIdentifiers.ts: SyntaxError: '}' expected. (63:50) | |
61 | } | |
62 | | |
> 63 | var interfaceType1Object1 = <interfaceType1>{ bar1: 0 }; | |
| ^ | |
64 | interfaceType1Object1.bar1 = 2; | |
65 | var interfaceType1Object2 = <interfaceType\u0031>{ bar1: 0 }; | |
66 | interfaceType1Object2.bar1 = 2; | |
../TypeScript/tests/cases/compiler/exportInFunction.ts: SyntaxError: '}' expected. (3:0) | |
1 | function f() { | |
2 | export = 0; | |
> 3 | | |
| ^ | |
../TypeScript/tests/cases/compiler/extendArray.ts: SyntaxError: Expression expected. (14:4) | |
12 | var arr = (<any>Array).prototype; | |
13 | arr.collect = function (fn) { | |
> 14 | var res = []; | |
| ^ | |
15 | for (var i = 0; i < this.length; ++i) { | |
16 | var tmp = fn(this[i]); | |
17 | for (var j = 0; j < tmp.length; ++j) { | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -7,4 +7,5 @@ | |
// @Filename: extendingClassFromAliasAndUsageInIndexer_moduleA.ts | |
+ | |
import Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); | |
export class VisualizationModel extends Backbone.Model { | |
@@ -14,4 +15,5 @@ | |
// @Filename: extendingClassFromAliasAndUsageInIndexer_moduleB.ts | |
+ | |
import Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); | |
export class VisualizationModel extends Backbone.Model { | |
@@ -21,4 +23,5 @@ | |
// @Filename: extendingClassFromAliasAndUsageInIndexer_main.ts | |
+ | |
import Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); | |
import moduleA = require("./extendingClassFromAliasAndUsageInIndexer_moduleA"); | |
../TypeScript/tests/cases/compiler/extendsUntypedModule.ts: SyntaxError: ';' expected. (6:5) | |
4 | | |
5 | // @Filename: /node_modules/foo/index.js | |
> 6 | This file is not read. | |
| ^ | |
7 | | |
8 | // @Filename: /node_modules/bar/index.js | |
9 | Nor is this one. | |
../TypeScript/tests/cases/compiler/extension.ts: SyntaxError: Declaration or statement expected. (16:4) | |
14 | | |
15 | declare module M { | |
> 16 | export extension class C { | |
| ^ | |
17 | public pe:string; | |
18 | } | |
19 | } | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -5,4 +5,5 @@ | |
// @Filename: externalModuleReferenceOfImportDeclarationWithExportModifier_1.ts | |
+ | |
export import file1 = require("externalModuleReferenceOfImportDeclarationWithExportModifier_0"); | |
file1.foo(); | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -11,4 +11,5 @@ | |
///<reference path='externalModuleRefernceResolutionOrderInImportDeclaration_file2.ts'/> | |
+ | |
import file1 = require("./externalModuleRefernceResolutionOrderInImportDeclaration_file1"); | |
file1.foo(); | |
../TypeScript/tests/cases/compiler/externModule.ts: SyntaxError: ';' expected. (1:8) | |
> 1 | declare module { | |
| ^ | |
2 | export class XDate { | |
3 | public getDay():number; | |
4 | public getXDate():number; | |
../TypeScript/tests/cases/compiler/fatarrowfunctionsErrors.ts: SyntaxError: ',' expected. (2:7) | |
1 | foo((...Far:any[])=>{return 0;}) | |
> 2 | foo((1)=>{return 0;}); | |
| ^ | |
3 | foo((x?)=>{return x;}) | |
4 | foo((x=0)=>{return x;}) | |
5 | var y = x:number => x*x; | |
../TypeScript/tests/cases/compiler/fatarrowfunctionsOptionalArgs.ts: SyntaxError: ';' expected. (88:22) | |
86 | | |
87 | //multiple levels | |
> 88 | (a?) => { return a; } ? (b)=>(c)=>81 : (c)=>(d)=>82; | |
| ^ | |
89 | | |
90 | | |
91 | // In Expressions | |
../TypeScript/tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts: SyntaxError: ';' expected. (1:22) | |
> 1 | var tt1 = (a, (b, c)) => a+b+c; | |
| ^ | |
2 | var tt2 = ((a), b, c) => a+b+c; | |
3 | | |
4 | var tt3 = ((a)) => a; | |
../TypeScript/tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors3.ts: SyntaxError: Identifier expected. (1:4) | |
> 1 | (...) => 105; | |
| ^ | |
2 | | |
../TypeScript/tests/cases/compiler/for.ts: SyntaxError: Expression expected. (31:5) | |
29 | } | |
30 | | |
> 31 | for () { // error | |
| ^ | |
32 | } | |
../TypeScript/tests/cases/compiler/functionDeclarationWithResolutionOfTypeNamedArguments01.ts: SyntaxError: JSX element 'arguments' has no corresponding closing tag. (5:5) | |
3 | | |
4 | function f() { | |
> 5 | <arguments>arguments; | |
| ^ | |
6 | } | |
../TypeScript/tests/cases/compiler/functionDeclarationWithResolutionOfTypeOfSameName01.ts: SyntaxError: JSX element 'f' has no corresponding closing tag. (5:5) | |
3 | | |
4 | function f() { | |
> 5 | <f>f; | |
| ^ | |
6 | } | |
../TypeScript/tests/cases/compiler/functionExpressionWithResolutionOfTypeNamedArguments01.ts: SyntaxError: JSX element 'arguments' has no corresponding closing tag. (5:5) | |
3 | | |
4 | var x = function f() { | |
> 5 | <arguments>arguments; | |
| ^ | |
6 | } | |
../TypeScript/tests/cases/compiler/functionExpressionWithResolutionOfTypeOfSameName01.ts: SyntaxError: JSX element 'f' has no corresponding closing tag. (5:5) | |
3 | | |
4 | var x = function f() { | |
> 5 | <f>f; | |
| ^ | |
6 | } | |
../TypeScript/tests/cases/compiler/functionsMissingReturnStatementsAndExpressions.ts: SyntaxError: Identifier expected. (131:4) | |
129 | throw null; | |
130 | throw undefined. | |
> 131 | } | |
| ^ | |
132 | } | |
../TypeScript/tests/cases/compiler/functionTypesLackingReturnTypes.ts: SyntaxError: '=>' expected. (3:16) | |
1 | | |
2 | // Error (no '=>') | |
> 3 | function f(x: ()) { | |
| ^ | |
4 | } | |
5 | | |
6 | // Error (no '=>') | |
../TypeScript/tests/cases/compiler/fuzzy.ts: SyntaxError: '}' expected. (17:33) | |
15 | } | |
16 | works():R { | |
> 17 | return <R>({ anything: 1 }); | |
| ^ | |
18 | } | |
19 | | |
20 | doesntWork():R { | |
../TypeScript/tests/cases/compiler/genericAssignmentCompatWithInterfaces1.ts: SyntaxError: Identifier expected. (17:22) | |
15 | } (); | |
16 | var a3: I<string> = z; | |
> 17 | var a4: I<string> = <K<number>>z; | |
| ^ | |
18 | | |
19 | | |
../TypeScript/tests/cases/compiler/genericCallsWithoutParens.ts: SyntaxError: '(' expected. (2:17) | |
1 | function f<T>() { } | |
> 2 | var r = f<number>; // parse error | |
| ^ | |
3 | | |
4 | class C<T> { | |
5 | foo: T; | |
../TypeScript/tests/cases/compiler/genericCallWithoutArgs.ts: SyntaxError: '(' expected. (4:16) | |
2 | } | |
3 | | |
> 4 | f<number,string>. | |
| ^ | |
../TypeScript/tests/cases/compiler/genericConstraint3.ts: SyntaxError: ',' expected. (2:17) | |
1 | interface C<P> { x: P } | |
> 2 | interface A<T, U in C<T>> { x: U } | |
| ^ | |
3 | interface B extends A<{}, { x: {} }> {} // Should not produce an error | |
4 | | |
../TypeScript/tests/cases/compiler/genericConstraintSatisfaction1.ts: SyntaxError: ',' expected. (2:8) | |
1 | interface I<S> { | |
> 2 | f: <T in S>(x: T) => void | |
| ^ | |
3 | } | |
4 | | |
5 | var x: I<{ s: string }>; | |
../TypeScript/tests/cases/compiler/genericConstructExpressionWithoutArgs.ts: SyntaxError: '(' expected. (10:0) | |
8 | var c = new C // C<any> | |
9 | var c2 = new C<number> // error, type params are actually part of the arg list so you need both | |
> 10 | | |
| ^ | |
../TypeScript/tests/cases/compiler/genericDefaults.ts: SyntaxError: Identifier expected. (399:20) | |
397 | interface i00<T = number> { a: T; } | |
398 | const i00c00 = (<i00>x).a; | |
> 399 | const i00c01 = (<i00<number>>x).a; | |
| ^ | |
400 | | |
401 | interface i01<T, U = T> { a: [T, U]; } | |
402 | const i01c00 = (<i01<number>>x).a; | |
../TypeScript/tests/cases/compiler/genericDefaultsErrors.ts: SyntaxError: ',' expected. (28:16) | |
26 | | |
27 | interface i04<T, U> {} // error | |
> 28 | interface i05<T in string> {} // error | |
| ^ | |
29 | interface i06<T in string, U in number> {} // error | |
30 | interface i07<T, U in number> {} // error | |
31 | interface i08<T, U in T> {} // error | |
../TypeScript/tests/cases/compiler/genericImplements.ts: SyntaxError: ',' expected. (8:6) | |
6 | } | |
7 | interface I { | |
> 8 | f<T in A>(): T | |
| ^ | |
9 | } // { f: () => { a; } } | |
10 | | |
11 | // OK | |
../TypeScript/tests/cases/compiler/genericInstanceOf.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts: SyntaxError: JSX element 'T' has no corresponding closing tag. (4:13) | |
2 | module foo { | |
3 | export var x: T; | |
> 4 | var y = <T>1; | |
| ^ | |
5 | } | |
6 | | |
../TypeScript/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts: SyntaxError: JSX element 'T' has no corresponding closing tag. (4:13) | |
2 | module foo { | |
3 | export var x: T; | |
> 4 | var y = <T>1; | |
| ^ | |
5 | } | |
6 | | |
../TypeScript/tests/cases/compiler/genericObjectCreationWithoutTypeArgs.ts: SyntaxError: '(' expected. (6:25) | |
4 | | |
5 | var x1 = new SS<number>(); // OK | |
> 6 | var x2 = new SS < number>; // Correctly give error | |
| ^ | |
7 | var x3 = new SS(); // OK | |
8 | var x4 = new SS; // Should be allowed, but currently give error ('supplied parameters do not match any signature of the call target') | |
9 | | |
../TypeScript/tests/cases/compiler/genericParameterAssignability1.ts: SyntaxError: JSX element 'T' has no corresponding closing tag. (2:9) | |
1 | function f<T>(x: T): T { return null; } | |
> 2 | var r = <T>(x: T) => x; | |
| ^ | |
3 | r = f; // should be allowed | |
../TypeScript/tests/cases/compiler/generics1.ts: SyntaxError: ',' expected. (4:17) | |
2 | interface B extends A { b: string } | |
3 | interface C extends B { c: string } | |
> 4 | interface G<T, U in B> { | |
| ^ | |
5 | x: T, | |
6 | y: U | |
7 | } | |
../TypeScript/tests/cases/compiler/generics1NoError.ts: SyntaxError: ',' expected. (5:17) | |
3 | interface B extends A { b: string } | |
4 | interface C extends B { c: string } | |
> 5 | interface G<T, U in B> { | |
| ^ | |
6 | x: T, | |
7 | y: U | |
8 | } | |
../TypeScript/tests/cases/compiler/generics2.ts: SyntaxError: ',' expected. (4:17) | |
2 | interface B extends A { b: string } | |
3 | interface C extends B { c: string } | |
> 4 | interface G<T, U in B> { | |
| ^ | |
5 | x: T, | |
6 | y: U | |
7 | } | |
../TypeScript/tests/cases/compiler/generics2NoError.ts: SyntaxError: ',' expected. (5:17) | |
3 | interface B extends A { b: string } | |
4 | interface C extends B { c: string } | |
> 5 | interface G<T, U in B> { | |
| ^ | |
6 | x: T, | |
7 | y: U | |
8 | } | |
../TypeScript/tests/cases/compiler/generics5.ts: SyntaxError: ',' expected. (5:17) | |
3 | | |
4 | interface C extends B { c: string } | |
> 5 | interface G<T, U in B> {} | |
| ^ | |
6 | | |
7 | var v3: G<A, A>; // Error, A not valid argument for U | |
8 | | |
../TypeScript/tests/cases/compiler/genericsAndHigherOrderFunctions.ts: SyntaxError: Identifier expected. (11:11) | |
9 | (x: U) => f(g(x)) | |
10 | | |
> 11 | var foo: <K, N>(g: (x: K) => N) => | |
| ^ | |
12 | (h: <M>(_: (_: K) => (_: M) => M) => (_: M) => M) => | |
13 | <R>(f: (_: N) => (_: R) => R) => (_: R) => R | |
14 | | |
../TypeScript/tests/cases/compiler/genericSignatureIdentity.ts: SyntaxError: ',' expected. (7:5) | |
5 | | |
6 | var x: { | |
> 7 | <T in Date>(x: T): T | |
| ^ | |
8 | }; | |
9 | | |
10 | var x: { | |
../TypeScript/tests/cases/compiler/genericTypeArgumentInference1.ts: SyntaxError: JSX element 'any' has no corresponding closing tag. (15:17) | |
13 | var r2 = _.all([true], _.identity); | |
14 | var r3 = _.all([], _.identity); | |
> 15 | var r4 = _.all([<any>true], _.identity); | |
| ^ | |
16 | | |
../TypeScript/tests/cases/compiler/genericTypeAssertions1.ts: SyntaxError: Identifier expected. (3:21) | |
1 | class A<T> { foo(x: T) { }} | |
2 | var foo = new A<number>(); | |
> 3 | var r: A<string> = <A<number>>new A(); // error | |
| ^ | |
4 | var r2: A<number> = <A<A<number>>>foo; // error | |
../TypeScript/tests/cases/compiler/genericTypeAssertions2.ts: SyntaxError: Identifier expected. (9:21) | |
7 | | |
8 | var foo = new A<number>(); | |
> 9 | var r: A<string> = <B<string>>new B(); | |
| ^ | |
10 | var r2: A<number> = <B<string>>new B(); // error | |
11 | var r3: B<number> = <A<number>>new B(); // error | |
12 | var r4: A<number> = <A<number>>new A(); | |
../TypeScript/tests/cases/compiler/genericTypeAssertions3.ts: SyntaxError: Expression expected. (1:8) | |
> 1 | var r = < <T>(x: T) => T > ((x) => { return null; }); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error | |
| ^ | |
2 | var s = < <T>(x: T) => T > ((x: any) => { return null; }); // no error | |
3 | | |
../TypeScript/tests/cases/compiler/genericTypeAssertions4.ts: SyntaxError: JSX element 'T' has no corresponding closing tag. (24:9) | |
22 | y = <T>a; | |
23 | y = <T>b; // error: cannot convert B to T | |
> 24 | y = <T>c; // error: cannot convert C to T | |
| ^ | |
25 | } | |
../TypeScript/tests/cases/compiler/genericTypeAssertions5.ts: SyntaxError: JSX element 'T' has no corresponding closing tag. (24:9) | |
22 | y = <T>a; | |
23 | y = <T>b; // error: cannot convert B to T | |
> 24 | y = <T>c; // error: cannot convert C to T | |
| ^ | |
25 | } | |
../TypeScript/tests/cases/compiler/genericTypeAssertions6.ts: SyntaxError: Identifier expected. (13:22) | |
11 | } | |
12 | | |
> 13 | class B<T extends Date, U extends Date> extends A<T, U> { | |
| ^ | |
14 | g(x: T) { | |
15 | var a: Date = x; | |
16 | var b = <Date>x; | |
../TypeScript/tests/cases/compiler/genericWithCallSignatures1.ts: SyntaxError: JSX element 'string' has no corresponding closing tag. (15:17) | |
13 | | |
14 | public myMethod() { | |
> 15 | var x = <string> this.callableThing(); | |
| ^ | |
16 | } | |
17 | } | |
../TypeScript/tests/cases/compiler/genericWithIndexerOfTypeParameterType1.ts: SyntaxError: Expression expected. (2:22) | |
1 | class LazyArray<T> { | |
> 2 | private objects = <{ [objectId: string]: T; }>{}; | |
| ^ | |
3 | array() { | |
4 | return this.objects; | |
5 | } | |
../TypeScript/tests/cases/compiler/genericWithOpenTypeParameters1.ts: SyntaxError: Expression expected. (7:26) | |
5 | var x: B<number>; | |
6 | x.foo(1); // no error | |
> 7 | var f = <T>(x: B<T>) => { return x.foo(1); } // error | |
| ^ | |
8 | var f2 = <T>(x: B<T>) => { return x.foo<T>(1); } // error | |
9 | var f3 = <T>(x: B<T>) => { return x.foo<number>(1); } // error | |
10 | var f4 = (x: B<number>) => { return x.foo(1); } // no error | |
../TypeScript/tests/cases/compiler/getterSetterNonAccessor.ts: SyntaxError: '}' expected. (5:13) | |
3 | | |
4 | Object.defineProperty({}, "0", <PropertyDescriptor>({ | |
> 5 | get: getFunc, | |
| ^ | |
6 | set: setFunc, | |
7 | configurable: true | |
8 | })); | |
../TypeScript/tests/cases/compiler/giant.ts: SyntaxError: Type expected. (64:16) | |
62 | //Index Signature | |
63 | p, | |
> 64 | [p1: string]: , | |
| ^ | |
65 | [p2: string, p3: number]: , | |
66 | | |
67 | //Property Signature | |
../TypeScript/tests/cases/compiler/implicitAnyAnyReturningFunction.ts: SyntaxError: Expression expected. (7:4) | |
5 | | |
6 | function B() { | |
> 7 | var someLocal: any = {}; | |
| ^ | |
8 | return someLocal; | |
9 | } | |
10 | | |
../TypeScript/tests/cases/compiler/implicitAnyCastedValue.ts: SyntaxError: Expression expected. (7:4) | |
5 | | |
6 | function foo() { | |
> 7 | return <any>"hello world"; // this should not be an error | |
| ^ | |
8 | } | |
9 | | |
10 | class C { | |
../TypeScript/tests/cases/compiler/implicitAnyFunctionInvocationWithAnyArguements.ts: SyntaxError: ',' expected. (29:26) | |
27 | | |
28 | class C { | |
> 29 | constructor(emtpyArray: any, variable: any) { | |
| ^ | |
30 | } | |
31 | } | |
32 | | |
../TypeScript/tests/cases/compiler/implicitAnyGenerics.ts: SyntaxError: Expression expected. (22:23) | |
20 | var d5: D<any> = new D(null); | |
21 | | |
> 22 | function foo<T>(): T { return null; }; | |
| ^ | |
23 | foo() | |
24 | foo<any>(); | |
25 | | |
../TypeScript/tests/cases/compiler/implicitAnyWidenToAny.ts: SyntaxError: Identifier expected. (22:17) | |
20 | var array3: any[] = [null, undefined]; | |
21 | var array4: number[] = [null, undefined]; | |
> 22 | var array5 = <any[]>[null, undefined]; | |
| ^ | |
23 | | |
24 | var objLit: { new (n: number): any; }; | |
25 | function anyReturnFunc(): any { } | |
../TypeScript/tests/cases/compiler/importHelpers.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printFunctionParams (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2715:22) | |
at parts.push.path.call.valuePath (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2547:9) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at printMethod (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2544:17) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:438:18) | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -4,5 +4,5 @@ | |
// @filename: a.ts | |
declare var dec: any; | |
-dec | |
+dec; | |
export class A {} | |
../TypeScript/tests/cases/compiler/importHelpersInIsolatedModules.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printFunctionParams (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2715:22) | |
at parts.push.path.call.valuePath (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2547:9) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at printMethod (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2544:17) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:438:18) | |
../TypeScript/tests/cases/compiler/importHelpersNoHelpers.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printFunctionParams (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2715:22) | |
at parts.push.path.call.valuePath (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2547:9) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at printMethod (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2544:17) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:438:18) | |
../TypeScript/tests/cases/compiler/importHelpersNoModule.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printFunctionParams (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2715:22) | |
at parts.push.path.call.valuePath (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2547:9) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at printMethod (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2544:17) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:438:18) | |
../TypeScript/tests/cases/compiler/incompleteDottedExpressionAtEOF.ts: SyntaxError: Identifier expected. (2:17) | |
1 | // used to leak __missing into error message | |
> 2 | var p2 = window. | |
| ^ | |
../TypeScript/tests/cases/compiler/incompleteObjectLiteral1.ts: SyntaxError: ':' expected. (1:13) | |
> 1 | var tt = { aa; } | |
| ^ | |
2 | var x = tt; | |
../TypeScript/tests/cases/compiler/indexedAccessTypeConstraints.ts: SyntaxError: ',' expected. (10:10) | |
8 | | |
9 | type Data<T> = { | |
> 10 | get: <K in keyof T>(prop: K) => T[K] | |
| ^ | |
11 | }; | |
12 | | |
13 | class Parent<M> { | |
../TypeScript/tests/cases/compiler/indexer2.ts: SyntaxError: JSX element 'IDirectChildrenMap' has no corresponding closing tag. (6:25) | |
4 | [objectId: number] : IHeapObjectProperty[]; | |
5 | } | |
> 6 | var directChildrenMap = <IDirectChildrenMap>{}; | |
| ^ | |
../TypeScript/tests/cases/compiler/indexer2A.ts: SyntaxError: JSX element 'IDirectChildrenMap' has no corresponding closing tag. (7:25) | |
5 | [objectId: number]: IHeapObjectProperty[] | |
6 | } | |
> 7 | var directChildrenMap = <IDirectChildrenMap>{}; | |
| ^ | |
../TypeScript/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts: SyntaxError: Type expected. (5:0) | |
3 | x: string, | |
4 | [x: string]: | |
> 5 | } | |
| ^ | |
6 | | |
7 | class C { | |
8 | // Used to be indexer, now it is a computed property | |
../TypeScript/tests/cases/compiler/indexSignatureTypeCheck.ts: SyntaxError: Type expected. (10:17) | |
8 | | |
9 | interface indexErrors { | |
> 10 | [p2?: string]: , | |
| ^ | |
11 | [...p3: any[]]: , | |
12 | [p4: string, p5?: string]: , | |
13 | [p6: string, ...p7: any[]]: | |
../TypeScript/tests/cases/compiler/indexSignatureTypeCheck2.ts: SyntaxError: Type expected. (10:17) | |
8 | | |
9 | interface indexErrors { | |
> 10 | [p2?: string]: , | |
| ^ | |
11 | [...p3: any[]]: , | |
12 | [p4: string, p5?: string]: , | |
13 | [p6: string, ...p7: any[]]: | |
../TypeScript/tests/cases/compiler/indexSignatureWithoutTypeAnnotation1.ts: SyntaxError: Type expected. (3:0) | |
1 | class C { | |
2 | [a: number]: | |
> 3 | } | |
| ^ | |
4 | | |
../TypeScript/tests/cases/compiler/indexTypeCheck.ts: SyntaxError: '}' expected. (58:11) | |
56 | class Benchmark { | |
57 | | |
> 58 | public results: { [x:string]: any; } = <{ [x:string]: any; }>{}; | |
| ^ | |
59 | | |
60 | public addTimingFor(name: string, timing: number) { | |
61 | this.results[name] = this.results[name]; | |
../TypeScript/tests/cases/compiler/indexWithoutParamType.ts: SyntaxError: Type expected. (1:14) | |
> 1 | var y: { []: }; // Error | |
| ^ | |
2 | | |
../TypeScript/tests/cases/compiler/inferentialTypingWithFunctionTypeSyntacticScenarios.ts: SyntaxError: JSX element 'typeof' has no corresponding closing tag. (29:13) | |
27 | | |
28 | // type assertion | |
> 29 | s = map("", <typeof identity>identity); | |
| ^ | |
30 | | |
31 | // parenthesized expression | |
32 | s = map("", (identity)); | |
../TypeScript/tests/cases/compiler/innerModExport1.ts: SyntaxError: ';' expected. (5:11) | |
3 | // inner mod 1 | |
4 | var non_export_var: number; | |
> 5 | module { | |
| ^ | |
6 | var non_export_var = 0; | |
7 | export var export_var = 1; | |
8 | | |
../TypeScript/tests/cases/compiler/innerModExport2.ts: SyntaxError: ';' expected. (5:11) | |
3 | // inner mod 1 | |
4 | var non_export_var: number; | |
> 5 | module { | |
| ^ | |
6 | var non_export_var = 0; | |
7 | export var export_var = 1; | |
8 | | |
../TypeScript/tests/cases/compiler/instanceOfAssignability.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/instanceOfInExternalModules.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/instanceofOperator.ts: SyntaxError: Invalid character. (1:0) | |
> 1 | ��/ / S p e c : | |
| ^ | |
2 | | |
3 | / / T h e i n s t a n c e o f o p e r a t o r r e q u i r e s t h e l e f t o p e r a n d t o b e o f t y p e A n y o r a n o b j e c t t y p e , a n d t h e r i g h t | |
4 | | |
../TypeScript/tests/cases/compiler/instanceofWithStructurallyIdenticalTypes.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/instantiateConstraintsToTypeArguments2.ts: SyntaxError: ',' expected. (1:14) | |
> 1 | interface A<T in A<T, S>, S in A<T, S>> {} | |
| ^ | |
2 | interface B<T in B<T, S>, S in B<T, S>> extends A<B<T, S>, B<T, S>> {} | |
3 | | |
../TypeScript/tests/cases/compiler/instantiatedBaseTypeConstraints.ts: SyntaxError: ',' expected. (1:16) | |
> 1 | interface Foo<T in Foo<T, C>, C> { | |
| ^ | |
2 | foo(bar: C): void | |
3 | } | |
4 | | |
../TypeScript/tests/cases/compiler/instantiatedBaseTypeConstraints2.ts: SyntaxError: ',' expected. (1:14) | |
> 1 | interface A<T in A<T, S>, S in A<T, S>> {} | |
| ^ | |
2 | interface B<U> extends A<B<U>, B<U>> {} | |
3 | | |
../TypeScript/tests/cases/compiler/instantiateTypeParameter.ts: SyntaxError: Property or signature expected. (2:4) | |
1 | interface Foo<T> { | |
> 2 | var x: T<>; | |
| ^ | |
3 | } | |
../TypeScript/tests/cases/compiler/interfaceDeclaration4.ts: SyntaxError: '{' expected. (39:13) | |
37 | | |
38 | // Negative case | |
> 39 | interface Foo.I1 { } | |
| ^ | |
40 | | |
../TypeScript/tests/cases/compiler/interfaceNaming1.ts: SyntaxError: ';' expected. (1:10) | |
> 1 | interface { } | |
| ^ | |
2 | interface interface{ } | |
3 | interface & { } | |
4 | | |
../TypeScript/tests/cases/compiler/interfaceWithMultipleDeclarations.ts: SyntaxError: ',' expected. (7:4) | |
5 | interface I1< | |
6 | T, | |
> 7 | U in T // Length mismatch | |
| ^ | |
8 | > {} | |
9 | interface I1< | |
10 | V in string // constraint present | |
../TypeScript/tests/cases/compiler/intersectionTypeInference1.ts: SyntaxError: '}' expected. (6:50) | |
4 | | |
5 | const parameterFn = (props:{store:string}) => alert(props.store) | |
> 6 | const brokenFunction = <OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o | |
| ^ | |
7 | export const Form3 = brokenFunction(parameterFn)({store: "hello"}) | |
8 | | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -13,4 +13,4 @@ | |
m1.__proto__ = 0; | |
-class Foo<___proto__> {} | |
+class Foo<____proto__> {} | |
var foo: (__proto__: number) => void; | |
../TypeScript/tests/cases/compiler/intTypeCheck.ts: SyntaxError: Expression expected. (117:34) | |
115 | var obj15: i2 = new Base; | |
116 | var obj16: i2 = null; | |
> 117 | var obj17: i2 = function ():any { return 0; }; | |
| ^ | |
118 | //var obj18: i2 = function foo() { }; | |
119 | var obj19: i2 = <i2> anyVar; | |
120 | var obj20: i2 = new <i2> anyVar; | |
../TypeScript/tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts: SyntaxError: '=' expected. (6:12) | |
4 | | |
5 | var let = 10; | |
> 6 | for (let of [1,2,3]) {} | |
| ^ | |
7 | | |
8 | for (let in [1,2,3]) {} | |
9 | | |
../TypeScript/tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts: SyntaxError: '=' expected. (6:12) | |
4 | | |
5 | var let = 10; | |
> 6 | for (let of [1,2,3]) {} | |
| ^ | |
7 | | |
8 | for (let in [1,2,3]) {} | |
9 | | |
../TypeScript/tests/cases/compiler/invalidReferenceSyntax1.ts: SyntaxError: Invalid 'reference' directive syntax. (1:0) | |
> 1 | /// <reference path="missingquote.ts /> | |
| ^ | |
2 | class C { | |
3 | | |
4 | } | |
../TypeScript/tests/cases/compiler/invalidUnicodeEscapeSequance.ts: SyntaxError: Invalid character. (1:7) | |
> 1 | var arg\u003 | |
| ^ | |
../TypeScript/tests/cases/compiler/invalidUnicodeEscapeSequance2.ts: SyntaxError: Invalid character. (1:7) | |
> 1 | var arg\uxxxx | |
| ^ | |
../TypeScript/tests/cases/compiler/invalidUnicodeEscapeSequance3.ts: SyntaxError: Invalid character. (1:1) | |
> 1 | a\u | |
| ^ | |
../TypeScript/tests/cases/compiler/invalidUnicodeEscapeSequance4.ts: SyntaxError: Invalid character. (2:4) | |
1 | var a\u0031; // a1 is a valid identifier | |
> 2 | var \u0031a; // 1a is an invalid identifier | |
| ^ | |
../TypeScript/tests/cases/compiler/jsFileCompilationBindMultipleDefaultExports.ts: SyntaxError: Expression expected. (7:15) | |
5 | export default class a { | |
6 | } | |
> 7 | export default var a = 10; | |
| ^ | |
../TypeScript/tests/cases/compiler/jsFileCompilationBindStrictModeErrors.ts: SyntaxError: ',' expected. (40:10) | |
38 | //@filename: d.js | |
39 | "use strict"; | |
> 40 | var x = 009; // error | |
| ^ | |
../TypeScript/tests/cases/compiler/jsFileCompilationDecoratorSyntax.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:165:18 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:164:14) | |
../TypeScript/tests/cases/compiler/jsFileCompilationTypeAssertions.ts: SyntaxError: JSX element 'string' has no corresponding closing tag. (3:9) | |
1 | // @allowJs: true | |
2 | // @filename: a.js | |
> 3 | var v = <string>undefined; | |
| ^ | |
../TypeScript/tests/cases/compiler/literals-negative.ts: SyntaxError: JSX element 'boolean' has no corresponding closing tag. (5:9) | |
3 | var n = <number>(null); | |
4 | var s = <string>(null); | |
> 5 | var b = <boolean>(n); | |
| ^ | |
6 | | |
7 | function isVoid() : void { } | |
8 | | |
../TypeScript/tests/cases/compiler/m7Bugs.ts: SyntaxError: '}' expected. (10:15) | |
8 | | |
9 | // scenario 2 | |
> 10 | interface A { x: string; } | |
| ^ | |
11 | | |
12 | interface B extends A { } | |
13 | | |
../TypeScript/tests/cases/compiler/maxConstraints.ts: SyntaxError: ',' expected. (5:5) | |
3 | } | |
4 | interface Comparer { | |
> 5 | <T in Comparable<T>>(x: T, y: T): T | |
| ^ | |
6 | } | |
7 | var max2: Comparer = (x, y) => { | |
8 | return x.compareTo(y) > 0 ? x : y; | |
../TypeScript/tests/cases/compiler/maxNodeModuleJsDepthDefaultsToZero.ts: SyntaxError: ';' expected. (9:19) | |
7 | // @filename: /tsconfig.json | |
8 | { | |
> 9 | "compileOnSave": true, | |
| ^ | |
10 | "compilerOptions": { | |
11 | "module": "commonjs", | |
12 | "moduleResolution": "node", | |
../TypeScript/tests/cases/compiler/metadataOfClassFromModule.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/metadataOfEventAlias.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/metadataOfStringLiteral.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/metadataOfUnion.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/metadataOfUnionWithNull.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at path.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2449:25) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printStatementSequence (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2434:8) | |
at /mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1544:26 | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:1543:22) | |
../TypeScript/tests/cases/compiler/methodContainingLocalFunction.ts: SyntaxError: '=>' expected. (31:25) | |
29 | exhibit() { | |
30 | var funcExpr = <U>(u?: U) => { }; | |
> 31 | var x: { (): void; }; | |
| ^ | |
32 | x = funcExpr; | |
33 | } | |
34 | } | |
ast(input) !== ast(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -18,11 +18,6 @@ | |
"params": [ | |
{ | |
- "type": "TSParameterProperty", | |
- "accessibility": null, | |
- "isReadonly": false, | |
- "parameter": { | |
- "type": "Identifier", | |
- "name": "p" | |
- }, | |
+ "type": "Identifier", | |
+ "name": "p", | |
"decorators": [] | |
} | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -1,3 +1,3 @@ | |
class C { | |
- constructor(declare p) { } | |
-} | |
\ No newline at end of file | |
+ constructor(p) {} | |
+} | |
../TypeScript/tests/cases/compiler/moduleAugmentationCollidingNamesInAugmentation1.ts: SyntaxError: '}' expected. (10:14) | |
8 | | |
9 | declare module "./observable" { | |
> 10 | interface I {x0} | |
| ^ | |
11 | } | |
12 | | |
13 | // @filename: map2.ts | |
../TypeScript/tests/cases/compiler/moduleAugmentationDeclarationEmit1.ts: SyntaxError: '}' expected. (10:14) | |
8 | | |
9 | declare module "./observable" { | |
> 10 | interface Observable<T> { | |
| ^ | |
11 | map<U>(proj: (e:T) => U): Observable<U> | |
12 | } | |
13 | namespace Observable { | |
../TypeScript/tests/cases/compiler/moduleAugmentationDeclarationEmit2.ts: SyntaxError: '}' expected. (10:14) | |
8 | | |
9 | declare module "./observable" { | |
> 10 | interface Observable<T> { | |
| ^ | |
11 | map<U>(proj: (e:T) => U): Observable<U> | |
12 | } | |
13 | namespace Observable { | |
../TypeScript/tests/cases/compiler/moduleAugmentationExtendAmbientModule1.ts: SyntaxError: '}' expected. (9:14) | |
7 | | |
8 | declare module "observable" { | |
> 9 | interface Observable<T> { | |
| ^ | |
10 | map<U>(proj: (e:T) => U): Observable<U> | |
11 | } | |
12 | namespace Observable { | |
../TypeScript/tests/cases/compiler/moduleAugmentationExtendAmbientModule2.ts: SyntaxError: '}' expected. (10:14) | |
8 | | |
9 | declare module "observable" { | |
> 10 | interface Observable<T> { | |
| ^ | |
11 | map<U>(proj: (e:T) => U): Observable<U> | |
12 | } | |
13 | namespace Observable { | |
../TypeScript/tests/cases/compiler/moduleAugmentationExtendFileModule1.ts: SyntaxError: '}' expected. (9:14) | |
7 | | |
8 | declare module "./observable" { | |
> 9 | interface Observable<T> { | |
| ^ | |
10 | map<U>(proj: (e:T) => U): Observable<U> | |
11 | } | |
12 | namespace Observable { | |
../TypeScript/tests/cases/compiler/moduleAugmentationExtendFileModule2.ts: SyntaxError: '}' expected. (9:14) | |
7 | | |
8 | declare module "./observable" { | |
> 9 | interface Observable<T> { | |
| ^ | |
10 | map<U>(proj: (e:T) => U): Observable<U> | |
11 | } | |
12 | namespace Observable { | |
../TypeScript/tests/cases/compiler/moduleAugmentationNoNewNames.ts: SyntaxError: '}' expected. (9:14) | |
7 | | |
8 | declare module "./observable" { | |
> 9 | interface Observable<T> { | |
| ^ | |
10 | map<U>(proj: (e:T) => U): Observable<U> | |
11 | } | |
12 | class Bar {} | |
../TypeScript/tests/cases/compiler/moduleAugmentationsBundledOutput1.ts: SyntaxError: Expression expected. (12:40) | |
10 | // @filename: m2.ts | |
11 | import {Cls} from "./m1"; | |
> 12 | (<any>Cls.prototype).foo = function() { return 1; }; | |
| ^ | |
13 | (<any>Cls.prototype).bar = function() { return "1"; }; | |
14 | | |
15 | declare module "./m1" { | |
../TypeScript/tests/cases/compiler/moduleKeywordRepeatError.ts: SyntaxError: ';' expected. (3:14) | |
1 | // "module.module { }" should raise a syntax error | |
2 | | |
> 3 | module.module { } | |
| ^ | |
../TypeScript/tests/cases/compiler/moduleProperty1.ts: SyntaxError: Declaration or statement expected. (9:4) | |
7 | module M2 { | |
8 | var x = 10; // variable local to this module body | |
> 9 | private y = x; // can't use private in modules | |
| ^ | |
10 | export var z = y; // property visible to any code | |
11 | } | |
../TypeScript/tests/cases/compiler/moduleResolutionWithExtensions_unexpected.ts: SyntaxError: ';' expected. (6:5) | |
4 | | |
5 | // @Filename: /node_modules/normalize.css/normalize.css | |
> 6 | This file is not read. | |
| ^ | |
7 | | |
8 | // @Filename: /node_modules/normalize.css/package.json | |
9 | { "main": "normalize.css" } | |
../TypeScript/tests/cases/compiler/moduleResolutionWithExtensions_unexpected2.ts: SyntaxError: ';' expected. (6:5) | |
4 | | |
5 | // @Filename: /node_modules/foo/foo.js | |
> 6 | This file is not read. | |
| ^ | |
7 | | |
8 | // @Filename: /node_modules/foo/package.json | |
9 | { "types": "foo.js" } | |
../TypeScript/tests/cases/compiler/moduleResolutionWithSymlinks_notInNodeModules.ts: SyntaxError: ';' expected. (19:21) | |
17 | // @filename: /src/tsconfig.json | |
18 | { | |
> 19 | "compilerOptions": { | |
| ^ | |
20 | "outDir": "bin" | |
21 | } | |
22 | } | |
../TypeScript/tests/cases/compiler/moduleResolutionWithSymlinks_referenceTypes.ts: SyntaxError: ';' expected. (23:21) | |
21 | // @filename: tsconfig.json | |
22 | { | |
> 23 | "compilerOptions": { | |
| ^ | |
24 | // If this is its default of node_modules/@types, | |
25 | // node_modules/@types/library-a will be looked up be fore node_modules/@types/library-b/node_modules/@types/library-a | |
26 | "typeRoots": [] | |
../TypeScript/tests/cases/compiler/moduleVisibilityTest1.ts: SyntaxError: JSX element 'M.I' has no corresponding closing tag. (60:20) | |
58 | } | |
59 | | |
> 60 | var cprime : M.I = <M.I>null; | |
| ^ | |
61 | | |
62 | var c = new M.C(); | |
63 | var z = M.x; | |
../TypeScript/tests/cases/compiler/moduleVisibilityTest2.ts: SyntaxError: JSX element 'M.I' has no corresponding closing tag. (61:20) | |
59 | } | |
60 | | |
> 61 | var cprime : M.I = <M.I>null; | |
| ^ | |
62 | | |
63 | var c = new M.C(); | |
64 | var z = M.x; | |
../TypeScript/tests/cases/compiler/narrowedConstInMethod.ts: SyntaxError: Expression expected. (7:8) | |
5 | const x: string | null = <any>{}; | |
6 | if (x !== null) { | |
> 7 | return { | |
| ^ | |
8 | bar() { return x.length; } // ok | |
9 | }; | |
10 | } | |
../TypeScript/tests/cases/compiler/narrowingOfDottedNames.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/narrowTypeByInstanceof.ts: Error: Value undefined is not a valid document | |
at assertDoc (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:7:11) | |
at Array.forEach (native) | |
at concat (/mnt/c/Users/Lucas Azzola/Code/prettier/src/doc-builders.js:14:9) | |
at printBinaryishExpressions (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:3711:19) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:206:21) | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:68:28) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
../TypeScript/tests/cases/compiler/newExpressionWithCast.ts: SyntaxError: Expression expected. (9:16) | |
7 | function Test2() { } | |
8 | // parse error | |
> 9 | var test2 = new <any>Test2(); | |
| ^ | |
10 | | |
11 | function Test3() { } | |
12 | // valid with noImplicitAny | |
../TypeScript/tests/cases/compiler/newExpressionWithTypeParameterConstrainedToOuterTypeParameter.ts: SyntaxError: ',' expected. (2:9) | |
1 | interface I<T> { | |
> 2 | new <U in T>(u: U): U | |
| ^ | |
3 | } | |
4 | var i: I<string>; | |
5 | var y = new i(""); // y should be string | |
../TypeScript/tests/cases/compiler/newMissingIdentifier.ts: SyntaxError: Expression expected. (1:13) | |
> 1 | var x = new (); | |
| ^ | |
2 | | |
../TypeScript/tests/cases/compiler/noEmitHelpers2.ts: TypeError: Cannot read property 'type' of undefined | |
at genericPrint (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:82:37) | |
at comments.printComments.p (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4174:12) | |
at Object.printComments (/mnt/c/Users/Lucas Azzola/Code/prettier/src/comments.js:898:17) | |
at printGenerically (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:4172:21) | |
at FastPath.map (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:173:19) | |
at printFunctionParams (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2715:22) | |
at parts.push.path.call.valuePath (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2547:9) | |
at FastPath.call (/mnt/c/Users/Lucas Azzola/Code/prettier/src/fast-path.js:119:16) | |
at printMethod (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:2544:17) | |
at genericPrintNoParens (/mnt/c/Users/Lucas Azzola/Code/prettier/src/printer.js:438:18) | |
../TypeScript/tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration2.ts: SyntaxError: '}' expected. (8:6) | |
6 | let [a4] = [<any>undefined], [b4] = [<any>null], c4 = <any>undefined, d4 = <any>null; // no error | |
7 | | |
> 8 | let {x, y, z} = { x: 1, y: 2, z: 3 }; // no error | |
| ^ | |
9 | let {x1 = 10, y1 = 10, z1 = 10} = { x1: 1, y1: 2, z1: 3 }; // no error | |
10 | let {x2 = undefined, y2 = undefined, z2 = undefined} = { x2: 1, y2: 2, z2: 3 }; // no error | |
11 | let {x3 = <any>undefined, y3 = <any>null, z3 = <any>undefined} = { x3: 1, y3: 2, z3: 3 }; // no error | |
../TypeScript/tests/cases/compiler/noImplicitAnyInCastExpression.ts: SyntaxError: '}' expected. (11:10) | |
9 | | |
10 | // Expr type not assignable to target type | |
> 11 | (<IFoo>{ a: null }); | |
| ^ | |
12 | | |
13 | // Expr type assignable to target type | |
14 | (<IFoo>{ a: 2, b: undefined }); | |
../TypeScript/tests/cases/compiler/noImplicitAnyIndexing.ts: SyntaxError: ',' expected. (36:8) | |
34 | | |
35 | interface MyMap<T> { | |
> 36 | [key: string]: T; | |
| ^ | |
37 | } | |
38 | | |
39 | var m: MyMap<number> = { | |
../TypeScript/tests/cases/compiler/noImplicitAnyIndexingSuppressed.ts: SyntaxError: ',' expected. (36:8) | |
34 | | |
35 | interface MyMap<T> { | |
> 36 | [key: string]: T; | |
| ^ | |
37 | } | |
38 | | |
39 | var m: MyMap<number> = { | |
../TypeScript/tests/cases/compiler/nonIdenticalTypeConstraints.ts: SyntaxError: ',' expected. (10:16) | |
8 | n: T; | |
9 | } | |
> 10 | interface Foo<T in Different> { | |
| ^ | |
11 | y: T | |
12 | } | |
13 | interface Qux<T in Different> { | |
../TypeScript/tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints01.ts: SyntaxError: ';' expected. (3:2) | |
1 | 1..toString(); | |
2 | 1.0.toString(); | |
> 3 | 1.toString(); | |
| ^ | |
4 | 1.+2.0 + 3. ; | |
5 | | |
6 | // Preserve whitespace where important for JS compatibility | |
../TypeScript/tests/cases/compiler/objectCreate.ts: SyntaxError: '}' expected. (12:25) | |
10 | | |
11 | var a = Object.create(null, {}); // any | |
> 12 | var a = Object.create({ a: 1, b: "" }, {}); | |
| ^ | |
13 | var a = Object.create(union, {}); | |
14 | var a = Object.create({}, {}); | |
15 | var a = Object.create(<object>{}, {}); | |
../TypeScript/tests/cases/compiler/objectCreate2.ts: SyntaxError: '}' expected. (12:25) | |
10 | | |
11 | var a = Object.create(null, {}); // any | |
> 12 | var a = Object.create({ a: 1, b: "" }, {}); | |
| ^ | |
13 | var a = Object.create(union, {}); | |
14 | var a = Object.create({}, {}); | |
15 | var a = Object.create(<object>{}, {}); | |
../TypeScript/tests/cases/compiler/objectCreationExpressionInFunctionParameter.ts: SyntaxError: Declaration or statement expected. (6:1) | |
4 | } | |
5 | function foo(x = new A(123)) { //should error, 123 is not string | |
> 6 | }} | |
| ^ | |
../TypeScript/tests/cases/compiler/objectLitArrayDeclNoNew.ts: SyntaxError: Declaration or statement expected. (27:0) | |
25 | } | |
26 | } | |
> 27 | } | |
| ^ | |
../TypeScript/tests/cases/compiler/objectLiteralWithSemicolons1.ts: SyntaxError: ':' expected. (1:11) | |
> 1 | var v = { a; b; c } | |
| ^ | |
../TypeScript/tests/cases/compiler/objectLiteralWithSemicolons2.ts: SyntaxError: ':' expected. (2:3) | |
1 | var v = { | |
> 2 | a; | |
| ^ | |
3 | b; | |
4 | c | |
5 | } | |
../TypeScript/tests/cases/compiler/objectLiteralWithSemicolons3.ts: SyntaxError: ':' expected. (2:3) | |
1 | var v = { | |
> 2 | a; | |
| ^ | |
3 | b; | |
4 | c; | |
5 | } | |
../TypeScript/tests/cases/compiler/objectLiteralWithSemicolons4.ts: SyntaxError: ':' expected. (3:0) | |
1 | var v = { | |
2 | a | |
> 3 | ; | |
| ^ | |
../TypeScript/tests/cases/compiler/objectLiteralWithSemicolons5.ts: SyntaxError: ',' expected. (1:19) | |
> 1 | var v = { foo() { }; a: b; get baz() { }; } | |
| ^ | |
../TypeScript/tests/cases/compiler/objectLitGetterSetter.ts: SyntaxError: '}' expected. (3:19) | |
1 | var obj = {}; | |
2 | Object.defineProperty(obj, "accProperty", <PropertyDescriptor>({ | |
> 3 | get: function () { | |
| ^ | |
4 | eval("public = 1;"); | |
5 | return 11; | |
6 | }, | |
../TypeScript/tests/cases/compiler/optionalPropertiesSyntax.ts: SyntaxError: ';' expected. (11:6) | |
9 | //Call signatures can't be optional | |
10 | (): any; | |
> 11 | ()?: any; //err | |
| ^ | |
12 | ?(): any; //err | |
13 | } | |
14 | | |
../TypeScript/tests/cases/compiler/overloadConsecutiveness.ts: SyntaxError: '{' or ';' expected. (3:13) | |
1 | // Making sure compiler won't break with declarations that are consecutive in the AST but not consecutive in the source. Syntax errors intentional. | |
2 | | |
> 3 | function f1(), function f1(); | |
| ^ | |
4 | function f2(), function f2() {} | |
5 | function f3() {}, function f3(); | |
6 | | |
../TypeScript/tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts: SyntaxError: '(' expected. (1:13) | |
> 1 | function boo { | |
| ^ | |
2 | static test() | |
3 | static test(name:string) | |
4 | static test(name?:any){ } | |
../TypeScript/tests/cases/compiler/overloadResolutionOverNonCTObjectLit.ts: SyntaxError: '}' expected. (19:65) | |
17 | var tokens:IToken[]= []; | |
18 | tokens.push({ startIndex: 1, type: '', bracket: 3 }); | |
> 19 | tokens.push(<IToken>({ startIndex: 1, type: '', bracket: 3, state: null, length: 10 })); | |
| ^ | |
20 | } | |
21 | } | |
../TypeScript/tests/cases/compiler/parse1.ts: SyntaxError: Identifier expected. (4:0) | |
2 | function foo() { | |
3 | bar. | |
> 4 | } | |
| ^ | |
5 | | |
../TypeScript/tests/cases/compiler/parse2.ts: SyntaxError: Argument expression expected. (3:0) | |
1 | function foo() { | |
2 | foo( | |
> 3 | } | |
| ^ | |
../TypeScript/tests/cases/compiler/parseErrorInHeritageClause1.ts: SyntaxError: Invalid character. (1:18) | |
> 1 | class C extends A # { | |
| ^ | |
2 | } | |
../TypeScript/tests/cases/compiler/parseTypes.ts: SyntaxError: Expression expected. (2:8) | |
1 | | |
> 2 | var x = <() => number>null; | |
| ^ | |
3 | var y = <{(): number; }>null; | |
4 | var z = <{new(): number; }>null | |
5 | var w = <{[x:number]: number; }>null | |
../TypeScript/tests/cases/compiler/partiallyDiscriminantedUnions.ts: SyntaxError: Expression expected. (23:4) | |
21 | | |
22 | if (ab.type === 'a') { | |
> 23 | if (ab.subtype === 2) { | |
| ^ | |
24 | ab.foo; | |
25 | } | |
26 | } | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution1_classic.ts: SyntaxError: ';' expected. (8:21) | |
6 | // @filename: c:/root/tsconfig.json | |
7 | { | |
> 8 | "compilerOptions": { | |
| ^ | |
9 | "paths": { | |
10 | "*": [ | |
11 | "*", | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution1_node.ts: SyntaxError: ';' expected. (7:21) | |
5 | // @filename: c:/root/tsconfig.json | |
6 | { | |
> 7 | "compilerOptions": { | |
| ^ | |
8 | "paths": { | |
9 | "*": [ | |
10 | "*", | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution2_classic.ts: SyntaxError: ';' expected. (9:21) | |
7 | // @filename: root/tsconfig.json | |
8 | { | |
> 9 | "compilerOptions": { | |
| ^ | |
10 | "baseUrl": "./src", | |
11 | "paths": { | |
12 | "*1*": [ "*2*" ] | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution2_node.ts: SyntaxError: ';' expected. (9:21) | |
7 | // @filename: root/tsconfig.json | |
8 | { | |
> 9 | "compilerOptions": { | |
| ^ | |
10 | "baseUrl": "./src", | |
11 | "paths": { | |
12 | "*1*": [ "*2*" ] | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution4_classic.ts: SyntaxError: ';' expected. (9:21) | |
7 | // @filename: c:/root/tsconfig.json | |
8 | { | |
> 9 | "compilerOptions": { | |
| ^ | |
10 | "baseUrl": "." | |
11 | } | |
12 | } | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution4_node.ts: SyntaxError: ';' expected. (9:21) | |
7 | // @filename: c:/root/tsconfig.json | |
8 | { | |
> 9 | "compilerOptions": { | |
| ^ | |
10 | "baseUrl": "." | |
11 | } | |
12 | } | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution5_classic.ts: SyntaxError: ';' expected. (7:21) | |
5 | // @filename: c:/root/tsconfig.json | |
6 | { | |
> 7 | "compilerOptions": { | |
| ^ | |
8 | "baseUrl": ".", | |
9 | "paths": { | |
10 | "*": [ | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution5_node.ts: SyntaxError: ';' expected. (7:21) | |
5 | // @filename: c:/root/tsconfig.json | |
6 | { | |
> 7 | "compilerOptions": { | |
| ^ | |
8 | "baseUrl": ".", | |
9 | "paths": { | |
10 | "*": [ | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution6_classic.ts: SyntaxError: ';' expected. (6:21) | |
4 | // @filename: c:/root/src/tsconfig.json | |
5 | { | |
> 6 | "compilerOptions": { | |
| ^ | |
7 | "rootDirs": [ | |
8 | ".", | |
9 | "../generated/src" | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution6_node.ts: SyntaxError: ';' expected. (6:21) | |
4 | // @filename: c:/root/src/tsconfig.json | |
5 | { | |
> 6 | "compilerOptions": { | |
| ^ | |
7 | "rootDirs": [ | |
8 | ".", | |
9 | "../generated/src" | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution7_classic.ts: SyntaxError: ';' expected. (6:21) | |
4 | // @filename: c:/root/src/tsconfig.json | |
5 | { | |
> 6 | "compilerOptions": { | |
| ^ | |
7 | "baseUrl": "../", | |
8 | "paths": { | |
9 | "*": [ | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution7_node.ts: SyntaxError: ';' expected. (6:21) | |
4 | // @filename: c:/root/src/tsconfig.json | |
5 | { | |
> 6 | "compilerOptions": { | |
| ^ | |
7 | "baseUrl": "../", | |
8 | "paths": { | |
9 | "*": [ | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution_withExtension.ts: SyntaxError: ';' expected. (17:21) | |
15 | // @Filename: /tsconfig.json | |
16 | { | |
> 17 | "compilerOptions": { | |
| ^ | |
18 | "baseUrl": ".", | |
19 | "paths": { | |
20 | "foo": ["foo/foo.ts"], | |
../TypeScript/tests/cases/compiler/pathMappingBasedModuleResolution_withExtension_failedLookup.ts: SyntaxError: ';' expected. (9:21) | |
7 | // @Filename: /tsconfig.json | |
8 | { | |
> 9 | "compilerOptions": { | |
| ^ | |
10 | "baseUrl": ".", | |
11 | "paths": { | |
12 | "foo": ["foo/foo.ts"] | |
../TypeScript/tests/cases/compiler/pathsValidation1.ts: SyntaxError: ';' expected. (3:21) | |
1 | // @filename: tsconfig.json | |
2 | { | |
> 3 | "compilerOptions": { | |
| ^ | |
4 | "baseUrl": ".", | |
5 | "paths": { | |
6 | "*": "*" | |
../TypeScript/tests/cases/compiler/pathsValidation2.ts: SyntaxError: ';' expected. (3:21) | |
1 | // @filename: tsconfig.json | |
2 | { | |
> 3 | "compilerOptions": { | |
| ^ | |
4 | "baseUrl": ".", | |
5 | "paths": { | |
6 | "*": [1] | |
../TypeScript/tests/cases/compiler/pathsValidation3.ts: SyntaxError: ';' expected. (3:21) | |
1 | // @filename: tsconfig.json | |
2 | { | |
> 3 | "compilerOptions": { | |
| ^ | |
4 | "baseUrl": ".", | |
5 | "paths": { | |
6 | "foo": [] | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -9,4 +9,5 @@ | |
// @Filename: privacyCheckExternalModuleExportAssignmentOfGenericClass_1.ts | |
+ | |
import Foo = require("./privacyCheckExternalModuleExportAssignmentOfGenericClass_0"); | |
export default Bar; | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -37,4 +37,5 @@ | |
///<reference path='privacyFunctionCannotNameParameterTypeDeclFile_GlobalWidgets.ts'/> | |
+ | |
import Widgets = require("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets"); | |
import Widgets1 = require("GlobalWidgets"); | |
@@ -54,4 +55,5 @@ | |
// @Filename:privacyFunctionCannotNameParameterTypeDeclFile_consumer.ts | |
+ | |
import exporter = require("./privacyFunctionCannotNameParameterTypeDeclFile_exporter"); | |
export class publicClassWithWithPrivateParmeterTypes { | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -33,6 +33,8 @@ | |
// Privacy errors - importing private elements | |
+ | |
export import im_public_mi_private = require("./privacyTopLevelAmbientExternalModuleImportWithExport_require"); | |
+ | |
export import im_public_mu_private = require("./privacyTopLevelAmbientExternalModuleImportWithExport_require1"); | |
export import im_public_mi_public = require("m"); | |
prettier(input) !== prettier(prettier(input)) | |
Index: | |
=================================================================== | |
--- | |
+++ | |
@@ -36,6 +36,8 @@ | |
import im_private_mu_private = require("m2"); | |
+ | |
import im_private_mi_public = require("privacyTopLevelAmbientExternalModuleImportWithoutExport_require"); | |
+ | |
import im_private_mu_public = require("privacyTopLevelAmbientExternalModuleImportWithoutExport_require1"); | |
../TypeScript/tests/cases/compiler/privacyTypeParameterOfFunction.ts: SyntaxError: ',' expected. (8:9) | |
6 | export interface publicInterfaceWithPrivateTypeParameters { | |
7 | // TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1 | |
> 8 | new <T in privateClass>(): privateClass, | |
| ^ | |
9 | | |
10 | // TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1 | |
11 | <T in privateClass>(): privateClass, | |
../TypeScript/tests/cases/compiler/privacyTypeParameterOfFunctionDeclFile.ts: SyntaxError: ',' expected. (8:9) | |
6 | | |
7 | export interface publicInterfaceWithPrivateTypeParameters { | |
> 8 | new <T in privateClass>(): privateClass, // Error | |
| ^ | |
9 | <T in privateClass>(): privateClass, // Error | |
10 | myMethod<T in privateClass>(): privateClass // Error | |
11 | } | |
../TypeScript/tests/cases/compiler/privacyTypeParametersOfInterface.ts: SyntaxError: ',' expected. (11:60) | |
9 | | |
10 | // TypeParameter_0_of_exported_interface_1_has_or_is_using_private_type_2 | |
> 11 | export interface publicInterfaceWithPrivateTypeParameters<T in privateClass> { | |
| ^ | |
12 | myMethod( | |
13 | val: T | |
14 | ): T, // Error | |
../TypeScript/tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts: SyntaxError: ',' expected. (12:4) | |
10 | | |
11 | export interface publicInterfaceWithPrivateTypeParameters< | |
> 12 | T in privateClass // Error | |
| ^ | |
13 | > { | |
14 | myMethod(val: T): T, | |
15 | myMethod0(): publicClassT<T>, | |
../TypeScript/tests/cases/compiler/promiseIdentityWithConstraints.ts: SyntaxError: ',' expected. (2:9) | |
1 | export interface IPromise<T, V> { | |
> 2 | then<U in T, W in V>(callback: (x: T) => IPromise<U, W>): IPromise<U, W> | |
| ^ | |
3 | } | |
4 | export interface Promise<T, V> { | |
5 | then<U in T, W in V>(callback: (x: T) => Promise<U, W>): Promise<U, W> | |
../TypeScript/tests/cases/compiler/promisesWithConstraints.ts: SyntaxError: ',' expected. (5:21) | |
3 | } | |
4 | | |
> 5 | interface CPromise<T in { x: any }> { | |
| ^ | |
6 | then<U in { x: any }>(cb: (x: T) => Promise<U>): Promise<U> | |
7 | } | |
8 | | |
../TypeScript/tests/cases/compiler/promiseTest.ts: SyntaxError: Invalid character. (1:0) | |
> 1 | �� | |
| ^ | |
2 | i n t e r f a c e P r o m i s e < |