/** * @description * - Internal utility to deduplicate a tuple */ export type Deduplicate = T extends readonly [infer Head, ...infer Tail] ? Head extends ACC[number] ? Deduplicate : Deduplicate : ACC; /** * @preserve * @description * - extract unique string from ArrayString[]; * - Takes an array/tuple type and returns a unique UNION of its elements. * ```ts * const a = ['hi', 'there'] as const; * const check = (aa:ArrayToKeys) => {}; * ``` * ```js * const a = /** [at]type {const} *[blank]/ (['hi', 'there']); * /** [at]param {ArrayToKeys} aa *[blank]/ * const check = (aa) => {}; * ``` * @template {readonly unknown[]} T * @[blank]typedef {import('./ArrayToKeys.mts').ArrayToKeys} ArrayToKeys */ export type ArrayToKeys = Deduplicate[number];