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

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

Merged
merged 3 commits into from
Sep 10, 2020

Conversation

DanielRosenwasser
Copy link
Member

@HolgerJeromin
Copy link

HolgerJeromin commented Jul 15, 2020

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

@orta
Copy link
Contributor

orta commented Sep 10, 2020

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