错误详情
如下:
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解决的资料请关注代码网其它相关文章!
发表评论