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)文章
Angular2.0/4.0 使用Echarts圖表的示例代碼
本篇文章主要介紹了Angular2.0/4.0 使用Echarts的示例代碼,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-12-12angularjs實現(xiàn)table表格td單元格單擊變輸入框/可編輯狀態(tài)示例
這篇文章主要介紹了angularjs實現(xiàn)table表格td單元格單擊變輸入框/可編輯狀態(tài),涉及AngularJS事件響應(yīng)及頁面table元素屬性動態(tài)操作相關(guān)實現(xiàn)技巧,需要的朋友可以參考下2019-02-02詳解Angular調(diào)試技巧之報錯404(not found)
本篇文章主要介紹了詳解Angular調(diào)試技巧之報錯404(not found),小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-01-01Angular組件庫ng-zorro-antd實現(xiàn)radio單選框選擇
這篇文章主要為大家介紹了Angular組件庫ng-zorro-antd實現(xiàn)radio單選框取消選擇實現(xiàn)問題解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2023-05-05Angular.js跨controller實現(xiàn)參數(shù)傳遞的兩種方法
這篇文章主要給大家介紹了關(guān)于Angular.js跨controller實現(xiàn)參數(shù)傳遞的兩種方法,文中給出了詳細的介紹和示例代碼,相信對大家具有一定的參考價值,需要的朋友們下面來一起看看吧。2017-02-02AngularJS通過$location獲取及改變當(dāng)前頁面的URL
本篇將介紹AngularJS中的$location服務(wù)的基本用法,$location服務(wù)的主要作用是用于獲取當(dāng)前url以及改變當(dāng)前的url,并且存入歷史記錄。本文通過示例代碼介紹的很詳細,有需要的朋友們可以參考借鑒,下面來一起看看吧。2016-09-09詳解Angular Forms中自定義ngModel綁定值的方式
在Angular應(yīng)用中有兩種方式來實現(xiàn)表單綁定,但是對于一些特殊的表單控件沒法實現(xiàn),這篇文章主要介紹了詳解Angular Forms中自定義ngModel綁定值的方式,具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-12-12