|
| 1 | +tests/cases/compiler/betterErrorForAccidentallyCallingTypeAssertionExpressions.ts(3,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 2 | +tests/cases/compiler/betterErrorForAccidentallyCallingTypeAssertionExpressions.ts(5,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 3 | +tests/cases/compiler/betterErrorForAccidentallyCallingTypeAssertionExpressions.ts(7,1): error TS2734: It is highly likely that you are missing a semicolon. |
| 4 | +tests/cases/compiler/betterErrorForAccidentallyCallingTypeAssertionExpressions.ts(7,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 5 | +tests/cases/compiler/betterErrorForAccidentallyCallingTypeAssertionExpressions.ts(10,1): error TS2734: It is highly likely that you are missing a semicolon. |
| 6 | +tests/cases/compiler/betterErrorForAccidentallyCallingTypeAssertionExpressions.ts(10,1): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 7 | + |
| 8 | + |
| 9 | +==== tests/cases/compiler/betterErrorForAccidentallyCallingTypeAssertionExpressions.ts (6 errors) ==== |
| 10 | + declare function foo(): string; |
| 11 | + |
| 12 | + foo()(1 as number).toString(); |
| 13 | + ~~~~~~~~~~~~~~~~~~ |
| 14 | +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 15 | + |
| 16 | + foo() (1 as number).toString(); |
| 17 | + ~~~~~~~~~~~~~~~~~~~~~ |
| 18 | +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 19 | + |
| 20 | + foo() |
| 21 | + ~~~~~ |
| 22 | +!!! error TS2734: It is highly likely that you are missing a semicolon. |
| 23 | + ~~~~~ |
| 24 | + (1 as number).toString(); |
| 25 | + ~~~~~~~~~~~~~ |
| 26 | +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 27 | + |
| 28 | + foo() |
| 29 | + ~~~~~ |
| 30 | +!!! error TS2734: It is highly likely that you are missing a semicolon. |
| 31 | + ~~~~~~~~ |
| 32 | + (1 as number).toString(); |
| 33 | + ~~~~~~~~~~~~~~~~~ |
| 34 | +!!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. |
| 35 | + |
0 commit comments