19. implement FirstItem<T>
シェアしよう
- accepted / - tried
16. FirstChar<T>のように、tuple typeの首位のタイプを返すFirstItem<T>
を実装してください。
type A = FirstItem<[string, number, boolean]> // stringtype B = FirstItem<['B', 'F', 'E']> // 'B'
- accepted / - tried
16. FirstChar<T>のように、tuple typeの首位のタイプを返すFirstItem<T>
を実装してください。
type A = FirstItem<[string, number, boolean]> // stringtype B = FirstItem<['B', 'F', 'E']> // 'B'