一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

angular6 Error:Debug Failure at typeToString解决分析

时间:2026-06-10 10:16:47 编辑:袖梨 来源:一聚教程网

错误详情

如下:

angular6 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[]>();

以上就是angular6 Error:Debug Failure at typeToString解决分析的详细内容,更多关于angular6 Error解决的资料请关注其它相关文章!

热门栏目