Closed
Description
declare function foo(): string;
foo()
(document.getElementById("lelement") as HTMLDivElement).id;
@mousetraps just ran into this totally garbage error message
[ts] Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures.
Given
- A call expression with one argument
- whose open paren starts on the next line
- and whose sole argument is an
AsExpression
/TypeAssertionExpression
we should give a specialized error that ends in:
It is highly likely that you are missing a semicolon.