Skip to content

Commit

Permalink
Add externs for Object.values().
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127596301
  • Loading branch information
dbeam authored and blickly committed Jul 18, 2016
1 parent 44af005 commit 8e08ab7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions externs/es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,16 @@ Number.isSafeInteger = function(value) {};
*/
Object.assign = function(target, var_args) {};

/**
* TODO(dbeam): find a better place for ES2017 externs like this one.
* @param {!Object<T>} obj
* @return {!Array<T>} values
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values
* @throws {Error}
* @template T
*/
Object.values = function(obj) {};



/**
Expand Down

3 comments on commit 8e08ab7

@phistuck
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incidentally and unfortunately, V8 is removing support (again) for this property for that time being, due to incompatibility with Microsoft Dynamics CRM Lookup. See crbug.com/615873.

@MatrixFrog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT that's about Array.prototype.values, not Object.values. Good to know, though, thanks.

@phistuck
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops!

Please sign in to comment.