6 ms·
Funny how the conclusion is basically "Don't use `var`, use `let` instead" - even though almost all documentation/examples exclusively use the `var` keyword!
by tom-lord 11y ago
Funny how the conclusion is basically "Don't use `var`, use `let` instead" - even though almost all documentation/examples exclusively use the `var` keyword!
- egeozcan 11y agoFrom Ryan Cavanaugh's comment[1]: > (...) there's already the let keyword available for those who want saner scoping rules. We should definitely update the docs to use let everywhere, though. [1]: https://github.com/Microsoft/TypeScript/issues/5822#issuecomment-161079139 https://github.com/Microsoft/TypeScript/issues/5822#issuecom...
- tom-lord 11y agoYes, however that was 3 and a half months ago -- and as far as I can tell, there's been no movement towards doing so.
- RyanCavanaugh 11y agoIt's been fixed for a few months in the Handbook repo (https://github.com/Microsoft/TypeScript-Handbook/pull/119/files https://github.com/Microsoft/TypeScript-Handbook/pull/119/fi...), but the new updated Handbook hasn't been pushed to the website yet.