- We [don't handle it correctly now](https://typescripttolua.github.io/play.html#src=function%20foo()%20%7B%0A%20%20%20%20%7B%20var%20x%20%3D%201%3B%20%7D%0A%20%20%20%20console.log(x)%3B%0A%7D) - It's pretty much deprecated in modern JS and especially TS - `var` scoping may confuse Lua developers that are new to JS/TS - Apparently, we'll be able to remove a lot of code: - Special `var` handling in `hoistVariableDeclarations` - ...which is the only place that uses `replaceStatementInParent` - ...which is the only place (except printer) that uses tstl.Node.parent - ...which is the main reason why nodes are mutated and the reason to use `cloneNode`
varscoping may confuse Lua developers that are new to JS/TSvarhandling inhoistVariableDeclarationsreplaceStatementInParentcloneNode