Give an array, transform into an object type and the key/value must in the given array.
For example
const tuple = ['tesla', 'model 3', 'model X', 'model Y'] as const
type result = TupleToObject<typeof tuple> // expected { tesla: 'tesla', 'model 3': 'model 3', 'model X': 'model X', 'model Y': 'model Y'}
배열로 가지고오는 것을 객체 타입에 키와 값으로서 배열의 인덱스를 가져오면된다
result
type TupleToObject<T extends string[](any로해도되는데 우선 스트링타입으로하고있어서 명확하게)>
= {
k in T[number] : K
}