24

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

2
  • 2
    To the googlers of the future: here is the solution for the general case. Commented Aug 19, 2016 at 15:02
  • @peterh Thank you for your time-traveling comment. Commented Oct 7, 2016 at 1:21

1 Answer 1

36

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.