Typescript 如何获取html数据-*属性的类型安全性
如何获取html数据的typesafety-*属性Typescript 如何获取html数据-*属性的类型安全性,typescript,Typescript,如何获取html数据的typesafety-*属性 interface DivProps { id?:string class?:string // allow data-* ? } function div(props:DivProps) { } const d = div({"data-id":"1"}) 现在不行。目前没有办法。相关的
interface DivProps {
id?:string
class?:string
// allow data-* ?
}
function div(props:DivProps) {
}
const d = div({"data-id":"1"})
现在不行。目前没有办法。相关的