mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-11 12:40:15 +00:00
added _.has definition
This commit is contained in:
@@ -579,7 +579,9 @@ _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
});
|
||||
|
||||
_.functions(_);
|
||||
_.methods(_);
|
||||
_.methods(_);
|
||||
|
||||
_.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
|
||||
var mergeNames = {
|
||||
'stooges': [
|
||||
|
||||
18
lodash/lodash.d.ts
vendored
18
lodash/lodash.d.ts
vendored
@@ -2330,6 +2330,15 @@ declare module _ {
|
||||
**/
|
||||
export function methods(object: any): string[];
|
||||
|
||||
/**
|
||||
* Checks if the specified object property exists and is a direct property, instead of an
|
||||
* inherited property.
|
||||
* @param object The object to check.
|
||||
* @param property The property to check for.
|
||||
* @return True if key is a direct property, else false.
|
||||
**/
|
||||
export function has(object: any, property: string): boolean;
|
||||
|
||||
/**
|
||||
* Recursively merges own enumerable properties of the source object(s), that don't resolve
|
||||
* to undefined into the destination object. Subsequent sources will overwrite property
|
||||
@@ -2551,15 +2560,6 @@ declare module _ {
|
||||
**/
|
||||
export function tap<T>(object: T, intercepter: Function): T;
|
||||
|
||||
/**
|
||||
* Does the object contain the given key? Identical to object.hasOwnProperty(key), but uses a safe
|
||||
* reference to the hasOwnProperty function, in case it's been overridden accidentally.
|
||||
* @param object Object to check for `key`.
|
||||
* @param key The key to check for on `object`.
|
||||
* @return True if `key` is a property on `object`, otherwise false.
|
||||
**/
|
||||
export function has(object: any, key: string): boolean;
|
||||
|
||||
/**
|
||||
* Performs an optimized deep comparison between the two objects,
|
||||
* to determine if they should be considered equal.
|
||||
|
||||
Reference in New Issue
Block a user