mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
492 B
TypeScript
21 lines
492 B
TypeScript
//// [tests/cases/compiler/constDeclarationShadowedByVarDeclaration2.ts] ////
|
|
|
|
//// [constDeclarationShadowedByVarDeclaration2.ts]
|
|
// No errors, const declaration is not shadowed
|
|
function outer() {
|
|
const x = 0;
|
|
function inner() {
|
|
var x = "inner";
|
|
}
|
|
}
|
|
|
|
//// [constDeclarationShadowedByVarDeclaration2.js]
|
|
"use strict";
|
|
// No errors, const declaration is not shadowed
|
|
function outer() {
|
|
const x = 0;
|
|
function inner() {
|
|
var x = "inner";
|
|
}
|
|
}
|