脚本宝典收集整理的这篇文章主要介绍了Error: Debug Failure at typeToString,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
错误详情如下:
ERROR in : Error: Debug Failure.
at tyPEToString (F:workAngularweb-idenode_modulestypescriptlibtypescript.js:28777:22)
at reportRelationError (F:workangularweb-idenode_modulestypescriptlibtypescript.js:34714:34)
at isRelatedTo (F:workangularweb-idenode_modulestypescriptlibtypescript.js:34860:21)
at checkTypeRelatedTo (F:workangularweb-idenode_modulestypescriptlibtypescript.js:34697:26)
at checkApplicableSignature (F:workangularweb-idenode_modulestypescriptlibtypescript.js:40608:26)
at resolveCall (F:workangularweb-idenode_modulestypescriptlibtypescript.js:41011:17)
at resolveCallExPression (F:workangularweb-idenode_modulestypescriptlibtypescript.js:41163:20)
at resolveSignature (F:workangularweb-idenode_modulestypescriptlibtypescript.js:41398:28)
at getResolvedSignature (F:workangularweb-idenode_modulestypescriptlibtypescript.js:41430:26)
at checkCallExPRession (F:workangularweb-idenode_modulestypescriptlibtypescript.js:41479:29)
at checkExpressionWorker (F:workangularweb-idenode_modulestypescriptlibtypescript.js:42950:28)
at checkExpression (F:workangularweb-idenode_modulestypescriptlibtypescript.js:42898:42)
at checkExpressionstatement (F:workangularweb-idenode_modulestypescriptlibtypescript.js:44962:13)
at checkSourceElement (F:workangularweb-idenode_modulestypescriptlibtypescript.js:46746:28)
at Object.foreach (F:workangularweb-idenode_modulestypescriptlibtypescript.js:1506:30)
at checkBlock (F:workangularweb-idenode_modulestypescriptlibtypescript.js:44563:16)
我代码里出现这个错误的原因是 在定义Map的时候,值为数组类型,但未给数组赋值泛型
,如下:
public renderStateMap = new Map<string, []>();
解决方案:
只需要给数组添加类型即可:
public renderStateMap = new Map<string, any[]>();
以上是脚本宝典为你收集整理的Error: Debug Failure at typeToString全部内容,希望文章能够帮你解决Error: Debug Failure at typeToString所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。