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

emitDecoratorMetadata should include abstract-ness #4781

Closed
qc00 opened this issue Sep 14, 2015 · 5 comments
Closed

emitDecoratorMetadata should include abstract-ness #4781

qc00 opened this issue Sep 14, 2015 · 5 comments
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript

Comments

@qc00
Copy link

qc00 commented Sep 14, 2015

Before TS 1.6, I "annotated" many classes with a static boolean property named abstract to tell some introspection code not to use them. However, it seems there is no run-time equilavent of this for TS 1.6 abstract classes. Can something like this be added?

Maybe this could be done as an implicit decorator that does nothing by default?

@danquirk
Copy link
Member

Could you give a more concrete example of why your own decorator function isn't sufficient here?

@qc00
Copy link
Author

qc00 commented Sep 14, 2015

If I use my own, I'll have to use on the same class a keyword and a decorator that seems to mean the same thing. This is confusing and error prone, so definitely not good for maintainability. The decorators proposal allow additional type info to be exposed through decorators, so why not the abstract-ness?

@danquirk
Copy link
Member

So would it be sufficient if this flag #2577 included the abstractness?

@qc00
Copy link
Author

qc00 commented Sep 14, 2015

Yeah, that would work I guess.

@danquirk danquirk changed the title Allow programmatic detection of abstract classes? emitDecoratorMetadata should include abstract-ness Sep 14, 2015
@danquirk danquirk added Suggestion An idea for TypeScript Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. labels Sep 14, 2015
@RyanCavanaugh
Copy link
Member

Doesn't seem to be sufficient demand to warrant further investigation here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants