log(arg.length) //报错,类型T上不存在length属性,所以得对泛型做约束
https://www.jianshu.com/p/91503f70d496(Typescript入门学习)