Type alias Callbacktype<T, TPosition>

Callbacktype<T, TPosition>: GetFunctionType<Parameters<T>, TPosition>

CallbackType<T, TPosition> Extracts a function type from the arguments of a function T, where the function is at a specific position (TPosition) in the argument list.

Type Parameters

  • T extends AnyFunction

    A function type to extract another function type from.

  • TPosition extends number | "auto" = 0

    The position of the target function in the argument list ('auto' to auto-detect the first function type, or a specific number for a fixed position).

Returns

The function type found at position TPosition in the arguments of T.

Generated using TypeDoc