如何扩展typescript内置类型中的类型
我想在如何扩展typescript内置类型中的类型,typescript,types,Typescript,Types,我想在typescript/lib/lib.dom.d.ts 我尝试使用这个代码 declare module "typescript/lib/lib.dom.d" { interface File { readonly filepath?: string readonly webkitRelativePath?: string } } 但这是失败的 有人知道怎么做吗
typescript/lib/lib.dom.d.ts
我尝试使用这个代码
declare module "typescript/lib/lib.dom.d"
{
interface File
{
readonly filepath?: string
readonly webkitRelativePath?: string
}
}
但这是失败的
有人知道怎么做吗