Type Alias Delayed<T, S>

Delayed<T, S>: [T] extends [((...args: any) => any)]
    ? never
    : T | ((...args: S) => T)

Type that extends any non-function entity--like a string, number, or array--into a itself and a no-input function that returns it. Used to interact with objects that could either be functions or static values.

Type Parameters

  • T
  • S extends any[] = never[]