Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Switch 'name' to 'void', mark as deprecated.#883

Merged
sandersn merged 3 commits into
mastermicrosoft/TypeScript-DOM-lib-generator:masterfrom
nameAsVoidAndDeprecatedmicrosoft/TypeScript-DOM-lib-generator:nameAsVoidAndDeprecatedCopy head branch name to clipboard
Sep 10, 2020
Merged

Switch 'name' to 'void', mark as deprecated.#883
sandersn merged 3 commits into
mastermicrosoft/TypeScript-DOM-lib-generator:masterfrom
nameAsVoidAndDeprecatedmicrosoft/TypeScript-DOM-lib-generator:nameAsVoidAndDeprecatedCopy head branch name to clipboard

Conversation

@DanielRosenwasser

Copy link
Copy Markdown
Member

@HolgerJeromin

HolgerJeromin commented Jul 15, 2020

Copy link
Copy Markdown
Contributor

What about "the others"?
The linked issue mentioned this list (I removed fdescribe from the list):
["closed", "event", "name", "length", "location", "parent", "top", ],

@orta

orta commented Sep 10, 2020

Copy link
Copy Markdown
Contributor

For someone looking at this, the change means that reads to name will now give an error

declare const name2: never;
declare const name3: void;

declare function f(str: string): void

f(name2) // Fine
f(name3) // Error

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

Successfully merging this pull request may close these issues.

Dangerous "name" (and potentially others) global

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.