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

typeof members #1559

Closed
NN--- opened this issue Dec 25, 2014 · 1 comment
Closed

typeof members #1559

NN--- opened this issue Dec 25, 2014 · 1 comment
Labels
By Design Deprecated - use "Working as Intended" or "Design Limitation" instead

Comments

@NN---
Copy link

NN--- commented Dec 25, 2014

Why TypeScript doesn't allow this (tried in http://www.typescriptlang.org/Playground/ )

class A {
  a : number;
  b : typeof a; // Cannot find name 'a'
}
@DanielRosenwasser
Copy link
Member

Remember that in a class, you have to qualify member access with this..

Even so, this won't work (as discussed in #1554).

@DanielRosenwasser DanielRosenwasser added the By Design Deprecated - use "Working as Intended" or "Design Limitation" instead label Dec 27, 2014
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
By Design Deprecated - use "Working as Intended" or "Design Limitation" instead
Projects
None yet
Development

No branches or pull requests

2 participants