0
在Visual Studio中,我創建了一個默認的TypeScript站點。將jquery.d.ts添加到項目後如何解決錯誤
然後我使用Nuget添加jquery.d.ts。
然後我編譯應用程序。
錯誤窗口顯示了我101個錯誤在jquery.d.ts文件如:
Error 341 ',' expected.
如何解決這些錯誤?
我錯誤地導入了文件,還是有一些設置需要設置?
如在UI中顯示的實際錯誤說:
A parameterized initializer is only allowed in a function or constructor implementation.
在此行中:
replaceAll(target: JQuery|any[]|Element|string): JQuery;
我有同樣的問題,但使用Visual Studio Update 5時。它建議不要手動更新TypeScript並堅持使用Updae 5中內置的版本。 – DrGriff