有代码为
interface checkline{
dir:string,
state:boolean
}
let object:Array<checkline> = [{dir:"asd",state:true}]
let o = object.map((o)=>{ o.dir = "1" })
我想让 o
的类型为 checkline[]
不知道要怎么写这个返回值
有代码为
interface checkline{
dir:string,
state:boolean
}
let object:Array<checkline> = [{dir:"asd",state:true}]
let o = object.map((o)=>{ o.dir = "1" })
我想让 o
的类型为 checkline[]
不知道要怎么写这个返回值