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

Type.getOwnProperties to get properties without base #1199

Open
derolf opened this issue Sep 9, 2021 · 2 comments
Open

Type.getOwnProperties to get properties without base #1199

derolf opened this issue Sep 9, 2021 · 2 comments

Comments

@derolf
Copy link

derolf commented Sep 9, 2021

Currently, Type.getProperties returns ALL properties of a Type.

Please provide a method Type.getOwnProperties that only return the properties of declared within Type excluding base types.

@dsherret
Copy link
Owner

dsherret commented Nov 6, 2021

I think the only way to do this with the compiler API is to look at the symbols instead of the types. I don't think there's a way to add this method on a type using the compiler api, but I'm not sure. If this is possible though I'll add it.

@derolf
Copy link
Author

derolf commented Nov 6, 2021

I think it’s not possible.

I ended up climbing the AST for my use case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants