Skip to content

Commit

Permalink
Make Arguments implement Iterable<?>
Browse files Browse the repository at this point in the history
According to MDN Arguments does always have an @@iterator property:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/@@iterator

This will prevent typecheck errors when iterating over `arguments` in a for-of loop

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195700284
  • Loading branch information
lauraharker authored and tjgq committed May 8, 2018
1 parent da41460 commit 1a9c860
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions externs/es3.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ IArrayLike.prototype.length;
/**
* @constructor
* @implements {IArrayLike<T>}
* @implements {Iterable<?>}
* @template T
* @see http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments
*/
Expand Down
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/resources.json

Large diffs are not rendered by default.

0 comments on commit 1a9c860

Please sign in to comment.