• Creates a function that invokes the method at object[key] with partials prepended to the arguments it receives. Allows bound functions to reference methods that may be redefined or don't yet exist. See Peter Michaux's article for more details.

    Differences from lodash:

    • there is no "placeholder" functionality
    • it will return plain functions; they will not inherit the prototype of object[key]

    Contribution to minified bundle size, when it is the only function imported:

    • Lodash: 10,812 bytes
    • Micro-dash: 70 bytes

    Type Parameters

    • K extends PropertyKey
    • T extends {
          [key in PropertyKey]: ((...args) => any)
      }

    Parameters

    • object: T
    • key: K

    Returns ((...args) => ReturnType<T[K]>)

      • (...args): ReturnType<T[K]>
      • Parameters

        • Rest ...args: Parameters<T[K]>

        Returns ReturnType<T[K]>

  • Type Parameters

    • K extends PropertyKey
    • A1
    • T extends {
          [key in PropertyKey]: ((...args) => any)
      }

    Parameters

    • object: T
    • key: K
    • arg1: A1

    Returns Drop1Arg<T[K]>

  • Type Parameters

    • K extends PropertyKey
    • A1
    • A2
    • T extends {
          [key in PropertyKey]: ((...args) => any)
      }

    Parameters

    • object: T
    • key: K
    • arg1: A1
    • arg2: A2

    Returns Drop2Args<T[K]>

  • Type Parameters

    • K extends PropertyKey
    • A1
    • A2
    • A3
    • T extends {
          [key in PropertyKey]: ((...args) => any)
      }

    Parameters

    Returns Drop3Args<T[K]>

  • Type Parameters

    • K extends PropertyKey
    • A1
    • A2
    • A3
    • A4
    • T extends {
          [key in PropertyKey]: ((...args) => any)
      }

    Parameters

    Returns Drop4Args<T[K]>

  • Type Parameters

    • K extends PropertyKey
    • A1
    • A2
    • A3
    • A4
    • T extends {
          [key in PropertyKey]: ((...args) => any)
      }

    Parameters

    • object: T
    • key: K
    • Rest ...partials: [A1, A2, A3, A4, ...any[]]

    Returns ((...args) => ReturnType<T[K]>)

      • (...args): ReturnType<T[K]>
      • Parameters

        • Rest ...args: any[]

        Returns ReturnType<T[K]>