Error declaring a variable in typescript

0

Hello I have the following error in TypeScript, when declaring a variable, the problem is that I only have that variable in the whole file, and no matter what the type of variable it throws me the same error and when compiling JavaScript throws me error in the browser.

My code:

let superman: boolean = false;

And it generates the following error:

  

[ts] Can not redeclare block-scoped variable 'superman'.

I've already updated my version of TypeScript and the matter remains the same.

Will I have to configure Visual studio code? or some plugin causes that failure.

Greetings and hopefully you can help me. Thanks

    
asked by CACZ 26.07.2018 в 21:13
source

1 answer

0

Since chrome runs by consolta

console.log(superman);

In case you return a value other than undefined You must change the variable name or move it from module.

link

    
answered by 26.07.2018 в 22:07