This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Add missing curly brace. Typo fix for a module import. - #240
Merged
Conversation
| let sym = Symbol(); | ||
|
|
||
| let obj = {}; | ||
| let obj: any = {}; |
Contributor
There was a problem hiding this comment.
I would change it to:
let obj = {
[sym]: "value"
};
console.log(obj[sym]); // "value"
Member
There was a problem hiding this comment.
I had the same idea actually, good call.
Member
There was a problem hiding this comment.
Only thing is that we never explained computer properties 😄
Contributor
Author
|
@mhegazy made me realize that if noImplicitAny is set to false then the code works fine. I've set it in my tsconfig file. This kind of mistake won't happen again. Sorry. |
Member
|
Actually, we try to have the handbook examples clean for |
Member
|
After you add the casts back in, 👍 |
Contributor
|
👍 |
Contributor
Author
|
Then, I will reopen issue #239, because the code doesn't work unless noImplicitAny is false. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
import =.