完成通用
function createPair@(6), @(6)(x: typeX, y: typeY): [typeX, typeY] { return [x, y]; } console.log(createPair<string, number>('Meaning', 42));
function createPair<typeX, typeY>(x: typeX, y: typeY): [typeX, typeY] { return [x, y]; } console.log(createPair<string, number>('Meaning', 42));