angular6 Error:Debug Failure at typeToString解决分析
错误详情
如下:
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解决的资料请关注脚本之家其它相关文章!
相关文章
Angular 2父子组件数据传递之@ViewChild获取子组件详解
这篇文章主要给大家介绍了关于Angular 2父子组件数据传递之@ViewChild获取子组件的相关资料,文中通过示例代码介绍的非常详细,对大家具有一定参考学习价值,需要的朋友们下面来一起看看吧。2017-07-07angularjs实现table表格td单元格单击变输入框/可编辑状态示例
这篇文章主要介绍了angularjs实现table表格td单元格单击变输入框/可编辑状态,涉及AngularJS事件响应及页面table元素属性动态操作相关实现技巧,需要的朋友可以参考下2019-02-02AngularJS实现用户登录状态判断的方法(Model添加拦截过滤器,路由增加限制)
这篇文章主要介绍了AngularJS实现用户登录状态判断的方法,通过Model添加拦截过滤器,路由增加限制实现针对登陆状态的判断功能,需要的朋友可以参考下2016-12-12AngularJS操作键值对象类似java的hashmap(填坑小结)
我们知道java的hashmap中使用最多的是put(...),get(...)以及remove()方法,那么在angularJS中如何创造(使用)这样一个对象呢?今天小编通过本文给大家分享下,感兴趣的朋友一起学习吧2016-11-11BootStrap+Angularjs+NgDialog实现模式对话框
在完成一个后台管理系统时,需要用表格显示注册用户的信息。但是用户地址太长了,不好显示。所以想做一个模式对话框,点击详细地址按钮时,弹出对话框,显示地址。下面小编给大家分享下实现方法,一起看下吧2016-08-08详解Angular之constructor和ngOnInit差异及适用场景
这篇文章主要介绍了详解Angular之constructor和ngOnInit差异及适用场景的相关资料,有兴趣的可以了解一下2017-06-06
最新评论