- invoke<K1, K2, K3, T>(object, path, ...args): Path3<K1, K2, K3, T> extends DefinedPath3<K1, K2, K3, T>
? ReturnType<DefinedPath3<K1, K2, K3, T>>
: ReturnType<DefinedPath3<K1, K2, K3, T>> | undefined Type Parameters
- K1 extends PropertyKey
- K2 extends PropertyKey
- K3 extends PropertyKey
- T extends Nil | Obj3<K1, K2, K3, Fn>
Parameters
- object: T
- path: readonly [K1, K2, K3]
Rest
...args: Parameters<NonUndefined<NonNullable<NonUndefined<NonNullable<NonUndefined<NonNullable<T>[K1]>>[K2]>>[K3]>>
Returns Path3<K1, K2, K3, T> extends DefinedPath3<K1, K2, K3, T>
? ReturnType<DefinedPath3<K1, K2, K3, T>>
: ReturnType<DefinedPath3<K1, K2, K3, T>> | undefined
- invoke<K1, K2, T>(object, path, ...args): Path2<K1, K2, T> extends DefinedPath2<K1, K2, T>
? ReturnType<DefinedPath2<K1, K2, T>>
: ReturnType<DefinedPath2<K1, K2, T>> | undefined Type Parameters
- K1 extends PropertyKey
- K2 extends PropertyKey
- T extends Nil | Obj2<K1, K2, Fn>
Parameters
- object: T
- path: readonly [K1, K2]
Rest
...args: Parameters<NonUndefined<NonNullable<NonUndefined<NonNullable<T>[K1]>>[K2]>>
Returns Path2<K1, K2, T> extends DefinedPath2<K1, K2, T>
? ReturnType<DefinedPath2<K1, K2, T>>
: ReturnType<DefinedPath2<K1, K2, T>> | undefined
- invoke<K1, T>(object, path, ...args): Path1<K1, T> extends DefinedPath1<K1, T>
? ReturnType<DefinedPath1<K1, T>>
: ReturnType<DefinedPath1<K1, T>> | undefined Type Parameters
- K1 extends PropertyKey
- T extends Nil | Obj1<K1, Fn>
Parameters
- object: T
- path: readonly [K1]
Rest
...args: Parameters<NonUndefined<NonNullable<T>[K1]>>
Returns Path1<K1, T> extends DefinedPath1<K1, T>
? ReturnType<DefinedPath1<K1, T>>
: ReturnType<DefinedPath1<K1, T>> | undefined
- invoke(object, path): undefined
Parameters
- object: object | Nil
- path: readonly []
Returns undefined
- invoke(object, path, ...args): any
Parameters
- object: object | Nil
- path: readonly PropertyKey[]
Rest
...args: any[]
Returns any
Invokes the method at
path
ofobject
.Differences from lodash:
path
, not a dot-separated stringContribution to minified bundle size, when it is the only function imported: