dart-archive / ts2dart

ts2dart TypeScript to Dart transpiler
Apache License 2.0
181 stars 62 forks source link

feat(Array): add support for some, find & filter #295

Closed vicb closed 9 years ago

vicb commented 9 years ago

@alexeagle @mprobst I would need some help with this one.

The tests currently fails with "access to untyped property..." If I add the Array interface with the find method as this is done for the the Map, the error disappears but find is not translated to firstWhere.

mprobst commented 9 years ago

I presume this doesn't work because:

If these are ES6-isms, do we actually have a shim/polyfill that implements them for Angular? Where is that defined? Should we just use those definitions as the location?

vicb commented 9 years ago

@mprobst could you please check the latest updates (thanks for the tips).

vicb commented 9 years ago

Hum interesting...

I had to revert to clang-format 1.0.29 locally because Travis would fail (I had 1.0.30 installed) on this PR.

Any idea ?

mprobst commented 9 years ago

Code LGTMs.

If you want to use a newer clang-format, you have to update the NPM version; clang-format should normally use the version that is installed to ./node_modules. I guess we should upgrade, we had some useful changes in clang-format.

vicb commented 9 years ago

I will check this version within Angular before merging.

vicb commented 9 years ago

Tested with Angular, works fine.

/cc @mprobst @alexeagle

alexeagle commented 9 years ago

Go ahead and merge (this repo doesn't have any presubmit fanciness)

vicb commented 9 years ago

@alexeagle I agree about the test and I think this has caused issues in the past. I have tested this particular PR within angular so I do not expect issue but I agree we could & should do a better job.

I'll amend the commit with Array.reduce & merge. Thanks for the review.