Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript - cannot invoke an expression whose type lack of signature

Tags:

typescript

I am very new in typescript..

when Iam trying to invoke this javascript like this in typescript

window.location('http://localhost:1773/Repository/NetworkPlan/ExportPng');

I got compiler error message like this

cannot invoke an expression whose type lack of signature

Can anyone help me why I got this error?

Thanks

like image 250
wapt49 Avatar asked Sep 10 '14 09:09

wapt49


1 Answers

TypeScript is saving you from a slight coding error:

window.location.href = 'http://localhost:1773/Repository/NetworkPlan/ExportPng';

It isn't a method call, it is a property you set.

like image 160
Fenton Avatar answered Nov 09 '22 05:11

Fenton