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

Add BuiltIterable for return values of Iterable #82

Closed
davidmorgan opened this issue Dec 1, 2016 · 3 comments
Closed

Add BuiltIterable for return values of Iterable #82

davidmorgan opened this issue Dec 1, 2016 · 3 comments

Comments

@davidmorgan
Copy link
Contributor

By wrapping in a new class we can provide extra utility methods, e.g. toBuiltList, toBuiltSet.

This will be helpful for the "map" method on built collections, to allow you to map then convert immediately into another built collection.

@davidmorgan
Copy link
Contributor Author

This actually doesn't work right now, except with DDC. The problem is that although generic methods can enforce the type of the returned iterable for "map" statically, the type is dropped at runtime. Will need to wait for Dart improvements.

@lohnicky
Copy link

lohnicky commented Jul 7, 2017

BuiltIterable would be also useful for the input interfaces in the angular components. This way we could force the component users to pass immutable values via the interface which would prevents them to pass normal lists, changing them and expecting that the change will be reflected in the component.

@davidmorgan
Copy link
Contributor Author

I think this is obsoleted by extension methods.

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

No branches or pull requests

2 participants