23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
tests/cases/compiler/letInLetOrConstDeclarations.ts(2,9): error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
|
|
tests/cases/compiler/letInLetOrConstDeclarations.ts(3,14): error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
|
|
tests/cases/compiler/letInLetOrConstDeclarations.ts(6,11): error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
|
|
|
|
|
|
==== tests/cases/compiler/letInLetOrConstDeclarations.ts (3 errors) ====
|
|
{
|
|
let let = 1; // should error
|
|
~~~
|
|
!!! error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
|
|
for (let let in []) { } // should error
|
|
~~~
|
|
!!! error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
|
|
}
|
|
{
|
|
const let = 1; // should error
|
|
~~~
|
|
!!! error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations.
|
|
}
|
|
{
|
|
function let() { // should be ok
|
|
}
|
|
} |