( value: T, )
| 26 | * @category Function |
| 27 | */ |
| 28 | export function constant<const T>( |
| 29 | value: T, |
| 30 | ): // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- There is no other way to make typescript infer the function arguments "backwards" in data-last invocations without the Args type parameter. @see: https://github.com/typescript-eslint/typescript-eslint/issues/9887 |
| 31 | <Args extends readonly unknown[]>(...args: Args) => T { |
| 32 | return () => value; |
| 33 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…