摘要:
Typescript 用接口模拟ajax请求 interface Config { type:string; url:string; data?:string; dataType:string } function ajax(config:Config){ var xhr = new XMLHttp 阅读全文
摘要:
Typescript方法重载实现系列二 function getInfo(name:string):string; function getInfo(name:string,age:number):string; function getInfo(name:any,age?:any):any{ if 阅读全文
摘要:
Typescript中方法重载的实现 function getInfo(name:string):string; function getInfo(age:number):string; function getInfo(str:any):any{ if (typeof str=='string') 阅读全文