Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why "let"? #5

Closed
mikecann opened this issue Nov 17, 2021 · 3 comments
Closed

Why "let"? #5

mikecann opened this issue Nov 17, 2021 · 3 comments

Comments

@mikecann
Copy link

Im wondering why you use "let" all over the ts codebase when const is generally preferred?

@lukeed
Copy link
Contributor

lukeed commented Nov 18, 2021

I really doesn't matter much. I plan to eventually come back through and update these while I implement #2, The short answer is that it comes down to code style

@lukeed lukeed closed this as completed Nov 18, 2021
@mikecann
Copy link
Author

Well const allows for literal types in TS and obviously prevents accidental mutability.

@lukeed
Copy link
Contributor

lukeed commented Nov 18, 2021

Yep! No argument here. Just didn't need or want either while developing this. For me I generally come back through and "lock in" please declaration hints once everything isn't really in transit anymore (since let-vs-const is really about knowledge share & long-term maintenance and let->const can be automated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants