Skip to content
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
merged 13 commits into from
Apr 11, 2016

Conversation

gburdeti
Copy link
Contributor

Fixes #

  • Change the variable name to myValidator to avoid a duplicate conflict - Modules Section.
  • Typo fix for a module import using import =.

@@ -24,7 +24,7 @@ Just like strings, symbols can be used as keys for object properties.
```ts
let sym = Symbol();

let obj = {};
let obj: any = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change it to:

let obj = {
   [sym]: "value"
};

console.log(obj[sym]); // "value"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same idea actually, good call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only thing is that we never explained computer properties 😄

@gburdeti
Copy link
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.

@gburdeti gburdeti changed the title Add missing curly brace. Specify obj as any to avoid a compilation error. Add missing curly brace. Apr 10, 2016
@gburdeti gburdeti changed the title Add missing curly brace. Add missing curly brace. Typo fix for a module import. Apr 10, 2016
@sandersn
Copy link
Member

Actually, we try to have the handbook examples clean for "noImplicitAny": true. Can you re-add the any assertions in Advanced Types.md?

@sandersn
Copy link
Member

After you add the casts back in, 👍

@mhegazy
Copy link
Contributor

mhegazy commented Apr 11, 2016

👍

@gburdeti
Copy link
Contributor Author

Then, I will reopen issue #239, because the code doesn't work unless noImplicitAny is false.

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

Successfully merging this pull request may close these issues.

4 participants