mirror of
https://github.com/type-challenges/type-challenges.git
synced 2025-12-08 19:06:13 +00:00
8 lines
271 B
TypeScript
8 lines
271 B
TypeScript
import { Equal, Expect } from '@type-challenges/utils'
|
|
|
|
const tuple = ['tesla', 'model 3', 'model X', 'model Y'] as const
|
|
|
|
type cases = [
|
|
Expect<Equal<TupleToObject<typeof tuple>, { tesla: 'tesla'; 'model 3': 'model 3'; 'model X': 'model X'; 'model Y': 'model Y'}>>,
|
|
]
|