@truenas/api-client
    Preparing search index...

    Type Alias ArgsOf<P>

    ArgsOf: [] extends P ? [params?: P] : [params: P]

    The argument list a directory entry's params implies.

    Params are required when the method takes any, and omissible when it does not — which is not the same as "the tuple is empty". Much of the directory declares tuples like [filters?: …, options?: …], where passing nothing is legal; [] extends P covers both, where a check for an empty tuple would force those callers to write an explicit [].

    A single optional params? would be simpler, and is what this replaced. It let call('pool.dataset.delete') through with no arguments at all — that method needs a dataset id — because the directory's word on what is required was never consulted.

    Type Parameters

    • P