Skip to content

Latest commit

History

History
12 lines (8 loc) 路 445 Bytes

parameters.md

File metadata and controls

12 lines (8 loc) 路 445 Bytes

Parameters

Same as the builtin-type but works also with nullable function type. Analogous to ReturnType.

import type { Parameters } from "tsafe/Parameters";

declare const myFunction: (a: string) => void | null;

type args = Parameters<typeof myFunction>;
// ^ args is [a: string]