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)
原因分析
我代碼里出現(xiàn)這個錯誤的原因是在定義Map的時候,值為數(shù)組類型,但未給數(shù)組賦值泛型
如下:
public renderStateMap = new Map<string, []>();
解決方案
只需要給數(shù)組添加類型即可:
public renderStateMap = new Map<string, any[]>();
以上就是angular6 Error:Debug Failure at typeToString解決分析的詳細內(nèi)容,更多關(guān)于angular6 Error解決的資料請關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
Angular指令封裝jQuery日期時間插件datetimepicker實現(xiàn)雙向綁定示例
這篇文章主要介紹了Angular指令封裝jQuery日期時間插件datetimepicker實現(xiàn)雙向綁定示例,具有一定的參考價值,有興趣的可以了解一下。2017-01-01

