19 lines
397 B
TypeScript
19 lines
397 B
TypeScript
|
//// [constDeclarationShadowedByVarDeclaration2.ts]
|
||
|
|
||
|
// No errors, const declaration is not shadowed
|
||
|
function outer() {
|
||
|
const x = 0;
|
||
|
function inner() {
|
||
|
var x = "inner";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//// [constDeclarationShadowedByVarDeclaration2.js]
|
||
|
// No errors, const declaration is not shadowed
|
||
|
function outer() {
|
||
|
const x = 0;
|
||
|
function inner() {
|
||
|
var x = "inner";
|
||
|
}
|
||
|
}
|