여기서는 그냥 type New = Start[]로 타이핑하면 되지 않을까요? 사실 그렇습니다. 단순한 상황에서는 never와 함께 쓸 이유가 없습니다. 보통은 제네릭과 더불어 쓸 때만 never가 의미가 있습니다.

    type ChooseArray<A> = A extends string ? string[] : never;
    type StringArray = ChooseArray<string>;
    // type StringArray = string[]
    type Never = ChooseArray<number>;
    // type Never = never
    

    참고로 never는 모든 타입에 대입할 수 있기에 모든 타입을 extends할 수 있습니다.

    type Result = never extends string ? true : false;
    // type Result = true
    
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.