import { Function } from './Function.js'; import { Overloads } from './Overloads.js'; import './Unique.js'; /** * Extract the parameters of all functions in a tuple. */ type ExtractTupleParameters>> = { [K in keyof T]: T[K] extends (...args: infer P) => any ? P : never; }[number]; /** * Extract the parameters from the signatures of a function with overloads. * * @template T The function type. * @example * function add(a: number, b: number): number * function add(a: string, b: string): string * type Result = OverloadsParameters // [number, number] | [string, string] */ type OverloadsParameters> = ExtractTupleParameters>; export type { OverloadsParameters };