Skip to content

Array support in __TS__Iterator#556

Merged
Perryvw merged 1 commit intomasterfrom
array-as-iterable
May 3, 2019
Merged

Array support in __TS__Iterator#556
Perryvw merged 1 commit intomasterfrom
array-as-iterable

Conversation

@tomblind
Copy link
Copy Markdown
Collaborator

@tomblind tomblind commented May 3, 2019

__TS__Iterator now performs standard array traversal if there is no Symbol.iterator property, so that arrays typed as generic Iterables will still work:

const arr: Iterable<string> = ["A", "B", "C"];
for (const x of arr) { ... }

@Perryvw Perryvw merged commit 720a4dc into master May 3, 2019
@Perryvw Perryvw deleted the array-as-iterable branch May 3, 2019 14:27
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

Successfully merging this pull request may close these issues.

2 participants