mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
betterErrorForAccidentalCall.ts(3,1): error TS2349: This expression is not callable.
|
|
Type 'String' has no call signatures.
|
|
betterErrorForAccidentalCall.ts(5,1): error TS2349: This expression is not callable.
|
|
Type 'String' has no call signatures.
|
|
betterErrorForAccidentalCall.ts(7,1): error TS2349: This expression is not callable.
|
|
Type 'String' has no call signatures.
|
|
betterErrorForAccidentalCall.ts(10,1): error TS2349: This expression is not callable.
|
|
Type 'String' has no call signatures.
|
|
betterErrorForAccidentalCall.ts(13,1): error TS2349: This expression is not callable.
|
|
Type 'String' has no call signatures.
|
|
|
|
|
|
==== betterErrorForAccidentalCall.ts (5 errors) ====
|
|
declare function foo(): string;
|
|
|
|
foo()(1 as number).toString();
|
|
~~~~~
|
|
!!! error TS2349: This expression is not callable.
|
|
!!! error TS2349: Type 'String' has no call signatures.
|
|
|
|
foo() (1 as number).toString();
|
|
~~~~~
|
|
!!! error TS2349: This expression is not callable.
|
|
!!! error TS2349: Type 'String' has no call signatures.
|
|
|
|
foo()
|
|
~~~~~
|
|
!!! error TS2349: This expression is not callable.
|
|
!!! error TS2349: Type 'String' has no call signatures.
|
|
!!! related TS2734 betterErrorForAccidentalCall.ts:7:1: Are you missing a semicolon?
|
|
(1 as number).toString();
|
|
|
|
foo()
|
|
~~~~~
|
|
!!! error TS2349: This expression is not callable.
|
|
!!! error TS2349: Type 'String' has no call signatures.
|
|
!!! related TS2734 betterErrorForAccidentalCall.ts:10:1: Are you missing a semicolon?
|
|
(1 + 2).toString();
|
|
|
|
foo()
|
|
~~~~~
|
|
!!! error TS2349: This expression is not callable.
|
|
!!! error TS2349: Type 'String' has no call signatures.
|
|
!!! related TS2734 betterErrorForAccidentalCall.ts:13:1: Are you missing a semicolon?
|
|
(<number>1).toString();
|
|
|