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
mhegazy merged 13 commits into
microsoft:masterfrom
gburdeti:master
Apr 11, 2016
Merged

Add missing curly brace. Typo fix for a module import.#240
mhegazy merged 13 commits into
microsoft:masterfrom
gburdeti:master

Conversation

@gburdeti

Copy link
Copy Markdown
Contributor

Fixes #

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

Comment thread pages/Symbols.md Outdated
let sym = Symbol();

let obj = {};
let obj: any = {};

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

After you add the casts back in, 👍

@mhegazy

mhegazy commented Apr 11, 2016

Copy link
Copy Markdown
Contributor

👍

@gburdeti

Copy link
Copy Markdown
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