1. 泛型:任意类型
    2. 优点:兼顾了灵活性和类型检查
    1. //定义一个泛型函数
    2. function goTest<T>(s:T):T{
    3. console.log(s)
    4. return s
    5. }
    6. goTest<string>("hello")
    7. goTest<number>(10)
    8. goTest<object>({name:"cheng"})