type-alias / @typed/router/TypeFunction
Apply
Applies a unary type function to an input.
- Package version
- 1.0.0-beta.7
- Category
- Type function application
- Since
- 1.0.0
Import
import type { Apply } from "@typed/router/TypeFunction";
Signatures
export type Apply<F extends TypeFunction<never, unknown>, Input> = F & {
readonly argument: (_: Input extends Parameters<F["signature"]>[0] ? Input : never) => void;
} extends infer Applied extends {
readonly return: unknown;
} ? Applied["return"] : never;