Skip to content

@pbvex/protocol / OptionalRestArgs

Type Alias: OptionalRestArgs<FuncRef>

OptionalRestArgs<FuncRef> = IsAny<FunctionArgs<FuncRef>> extends true ? [any] : [FunctionArgs<FuncRef>] extends [undefined | void] ? [] : FunctionArgs<FuncRef> extends EmptyObject ? [EmptyObject] : object extends FunctionArgs<FuncRef> ? [FunctionArgs<FuncRef>] : [FunctionArgs<FuncRef>]

Tuple of arguments for a FunctionReference suitable for a rest parameter.

  • void/undefined args take no slot.
  • Empty/all-optional object args may be omitted or supplied as an object.
  • Required args must be supplied exactly once.

Type Parameters

FuncRef

FuncRef extends FunctionReference<any, any, any, any>

Generated API reference. Source of truth is the codebase.