How can you create a type in TypeScript that only accepts arrays with two or more elements?
needsTwoOrMore([\"onlyOne\"]) // should have error needsTwoOrMore
type FixedTwoArray = [T,T] interface TwoOrMoreArray extends Array { 0: T 1: T } let x: FixedTwoArray = [1,2]; let y: TwoOrMoreArray = ['a','b','c'];
TypeScript Playground