Type alias ReadOnlyArguments<Input>

ReadOnlyArguments<Input>: Input extends ((..._arguments) => infer _Output)
    ? ReadOnly<Arguments>
    : never

Read-only alternative to TypeScript's Parameters

Remarks

This type extracts the parameters of a function as a read-only tuple, similar to Parameters, but with the added benefit of making the parameters read-only.

Example

const example = (_foo: string, _bar: number) => undefined;
type ExampleArguments = ReadOnlyArguments<typeof example>; // readonly [string, number]

See

Type Parameters