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

TypeChecker.exactMatchAnnotationsOf #199

Closed
matanlurey opened this issue Jun 29, 2017 · 4 comments
Closed

TypeChecker.exactMatchAnnotationsOf #199

matanlurey opened this issue Jun 29, 2017 · 4 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@matanlurey
Copy link
Contributor

/cc @kevmoo for thoughts.

Basically, something like:

$Foo.annotationsOf(someElement, andAssignable: true);

Or we could make this the default behavior, and add onlyExact: true. WDUT?

@matanlurey matanlurey added the type-enhancement A request for a change that isn't a bug label Jun 29, 2017
@natebosch
Copy link
Member

What's the use case for onlyExact? Seems to me we'd always be interested in assignable?

@matanlurey
Copy link
Contributor Author

Angular specifically, at least right now, doesn't want to match sub-classes of @Component.

@natebosch
Copy link
Member

Ah ok sounds good.

I think it'd be nicer to have two separate methods rather than a method with a boolean argument.

I'm fine with either annotationsOf and exactMatchAnnotationsOf or annotationsOf and assignableAnnotationsOf depending on which we think is more common.

@matanlurey
Copy link
Contributor Author

That works for me! It's a FR.

@matanlurey matanlurey changed the title andAssignable: false|true to TypeChecker.annotationsOf TypeChecker.exactMatchAnnotationsOf Jun 29, 2017
@matanlurey matanlurey self-assigned this Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants