索引类型
同时个索引和值设置类型限制
Interface Obj = {[id: number]: string}Interface obj2 ={readonly [id: number]: string}
继承接口
混合类型接口
Interface Counter ={ //混合类型接口。():voidcount:number}const getCounter = ():Counter =>{const c= ()=>{c.count++;};c.count = 0;return c}cont counter:Counter = getCounter()

