//数组 array function geyao<T>(arg:T[]):T[]{ console.log(arg.length) return arg } interface IWithLength{ length:number } function haha<T extends IWithLength>(arg:T):T{ console.log(arg.length) return arg }
//数组 array function geyao<T>(arg:T[]):T[]{ console.log(arg.length) return arg } interface IWithLength{ length:number } function haha<T extends IWithLength>(arg:T):T{ console.log(arg.length) return arg }