I would like to create a type called OnClick that accepts a variable number of types as arguments. How would I go about to make this work? I want to be able to use parameters of different types.
type OnClick<..> = (..) => void;
// usage:
const onClick: OnClick<string, number> = (key, value) => {...}
const onClick2: OnClick<SomeType, AnotherType> = (someThing, anotherThing) => {...}