This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 232
Support generic types in a Component/Directive #68
Comments
We currently don't retain type information during the compile. Blocked by #48. |
Investigating feasibility for 4.0.0. One issue there isn't a way to express this: @Inject(Container<String>) /cc @kevmoo Is this something planned for the Dart language in the very near future? |
What about something like |
This is not planned for |
matanlurey
changed the title
template compiler: generic types are dropped
Support generic types in a Component/Directive
Jun 9, 2017
matanlurey
added
area: compiler
⚡new feature
⛹ feedback: discussion
and removed
⛔ state: blocked
labels
Jun 9, 2017
Open question: How should we implement this? |
We should try to gather internal data on how often generic components are used. |
I think based on how Dart2 works, this is not likely to happen for V5. I've marked this to revisit in V6+. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This occurs when I compile using dart2js,
Say I have a Component defined as such:
class MyComponent<T extends something>
and I want to inject the following property:
final Container<T> myContainer;
I use
@Inject(Container) this.myContainer;
(generic type is not allowed here)This generates the following warning:
The text was updated successfully, but these errors were encountered: