Type alias GenericFunction<Arguments, Output>

GenericFunction<Arguments, Output>: ((..._arguments: Arguments) => Output)

Type Parameters

Type declaration

    • (..._arguments: Arguments): Output
    • Generic function type (safer than using any).

      Example

      const example = (callback: GenericFunction) => callback("test");
      

      Parameters

      • Rest ..._arguments: Arguments

      Returns Output