Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 475 Bytes

no-shadowed-variable.md

File metadata and controls

32 lines (25 loc) · 475 Bytes
sidebarDepth categories tags
0
TypeScript
TSLint
TypeScript

no-shadowed-variable

禁止变量名与上层作用域内的定义过的变量名重复。

function foo(item: string[]) {
  let baz = item.filter(item => item.length > 10);
}
function foo(item: string[]) {
  let baz = item.filter(subitem => subitem.length > 10);
}