TypeScript错误“接口'NodeBuffer'错误地扩展了接口'Uint8Array'”

时间:2017-02-20 16:58:54

标签: typescript typescript-typings

当我尝试编译我的Angular应用程序时,我收到此错误:

  

错误在... \ src \ page-sidebar \ typings \ browser \ ambient \ node \ index.d.ts   (426,11):错误TS2430:接口'NodeBuffer'错误地扩展了接口'Uint8Array'。     属性“填充”的类型不兼容。       输入'(值:any,offset?:number,end?:number)=>缓冲区'不能分配给类型'(值:数字,开始?:数字,结束?:数字)=>这个'。         类型'缓冲区'不能指定为'this'类型。

我的TypeScript和打字更新到最新版本:

"typescript": "2.1.6",
"typings": "2.1.0

有谁知道问题出在哪里?

1 个答案:

答案 0 :(得分:1)

尝试更新Node的输入定义。正在运行typings i env~node -SG为我工作。我在这里找到了解决方案https://github.com/typings/typings/issues/554

希望它有所帮助。

相关问题