I've following Typescript code and I can't really make sense of last line of code
const tuple = <T extends string[]>(...args: T) => args;
const ButtonTypes = tuple('default', 'primary', 'ghost', 'dashed', 'danger', 'link');
export type ButtonType = (typeof ButtonTypes)[number];
This is the line I'm talking to be more explicit.
(typeof ButtonTypes)[number]
Update:
This follows directly from Ways to get string literal type of array values without enum overhead