import { startsWith } from '../../modules'; import { forceToString } from '../../modules/internals'; import { strToNumber } from '../numbers/infrastructure'; import { InternalAdd } from '../math/app/addition'; import { InternalSubstract } from '../math/app/sustraction'; export type __beta__At = T[startsWith<`${I}`, '-'> extends true ? InternalSubstract : never> : I]; /** * Converts properties numbers of an object to a tuple. * @example * type a = ObjectToTuple<{ 0: string; 1: number; }> * // ^? [string, number] */ export type ObjectToTuple = `${currentIndex}` extends forceToString ? [T[currentIndex], ...ObjectToTuple>] : [];