mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
Merge pull request #8730 from chrootsu/lodash-get
lodash: changed _.get
This commit is contained in:
Vendored
+71
-9
@@ -15502,28 +15502,90 @@ declare module _ {
|
||||
//_.get
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Gets the property value at path of object. If the resolved
|
||||
* value is undefined the defaultValue is used in its place.
|
||||
* Gets the property value at path of object. If the resolved value is undefined the defaultValue is used
|
||||
* in its place.
|
||||
*
|
||||
* @param object The object to query.
|
||||
* @param path The path of the property to get.
|
||||
* @param defaultValue The value returned if the resolved value is undefined.
|
||||
* @return Returns the resolved value.
|
||||
**/
|
||||
get<TResult>(object: Object,
|
||||
path: string|number|boolean|Array<string|number|boolean>,
|
||||
defaultValue?:TResult
|
||||
*/
|
||||
get<TObject, TResult>(
|
||||
object: TObject,
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: TResult
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see _.get
|
||||
*/
|
||||
get<TResult>(
|
||||
object: any,
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: TResult
|
||||
): TResult;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.get
|
||||
*/
|
||||
get<TResult>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: TResult
|
||||
): TResult;
|
||||
}
|
||||
|
||||
interface LoDashImplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.get
|
||||
*/
|
||||
get<TResult>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: TResult
|
||||
): TResult;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.get
|
||||
**/
|
||||
get<TResult>(path: string|number|boolean|Array<string|number|boolean>,
|
||||
defaultValue?: TResult
|
||||
*/
|
||||
get<TResult>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: TResult
|
||||
): TResult;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapper<T> {
|
||||
/**
|
||||
* @see _.get
|
||||
*/
|
||||
get<TResultWrapper>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: any
|
||||
): TResultWrapper;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.get
|
||||
*/
|
||||
get<TResultWrapper>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: any
|
||||
): TResultWrapper;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.get
|
||||
*/
|
||||
get<TResultWrapper>(
|
||||
path: StringRepresentable|StringRepresentable[],
|
||||
defaultValue?: any
|
||||
): TResultWrapper;
|
||||
}
|
||||
|
||||
//_.has
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user