当前位置: 代码网 > it编程>前端脚本>AngularJs > angular6 Error:Debug Failure at typeToString解决分析

angular6 Error:Debug Failure at typeToString解决分析

2024年05月15日 AngularJs 我要评论
错误详情如下:error in : error: debug failure. at typetostring (f:workangularweb-ide ode_modules ypes

错误详情

如下:

error in : error: debug failure.
    at typetostring (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:28777:22)
    at reportrelationerror (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:34714:34)
    at isrelatedto (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:34860:21)
    at checktyperelatedto (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:34697:26)
    at checkapplicablesignature (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:40608:26)
    at resolvecall (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41011:17)
    at resolvecallexpression (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41163:20)
    at resolvesignature (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41398:28)
    at getresolvedsignature (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41430:26)
    at checkcallexpression (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:41479:29)
    at checkexpressionworker (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:42950:28)
    at checkexpression (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:42898:42)
    at checkexpressionstatement (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:44962:13)
    at checksourceelement (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:46746:28)
    at object.foreach (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:1506:30)
    at checkblock (f:\work\angular\web-ide\node_modules\typescript\lib\typescript.js:44563:16)

原因分析

我代码里出现这个错误的原因是在定义map的时候,值为数组类型,但未给数组赋值泛型

如下:

public renderstatemap = new map<string, []>();

解决方案

只需要给数组添加类型即可:

public renderstatemap = new map<string, any[]>();

以上就是angular6 error:debug failure at typetostring解决分析的详细内容,更多关于angular6 error解决的资料请关注代码网其它相关文章!

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com