javascript 在 index.d.ts 构建错误中找不到名称“记录”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48745028/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot find name 'Record' in index.d.ts build error
提问by FllnAngl
I ran into an The index is outside the matrix limits.error while adding a bundle to my bundleConfig while following thistutorial about the fullCalendarjQuery plugin
我遇到了一个The index is outside the matrix limits.错误,同时增加了束以我bundleConfig而下面这个教程对fullCalendarjQuery插件
these are the bundles. The files are a little bit different than the ones in the tutorial because of newer versions. note: I also tried the older versions after getting the errors
这些是捆绑包。由于版本较新,这些文件与教程中的文件略有不同。注意:我在收到错误后也尝试了旧版本
//Calendar css
bundles.Add(new StyleBundle("~/Content/fullcalendarcss").Include(
"~/Content/themes/base/jquery.ui.all.css",
"~/Content/fullcalendar.css"));
//Calendar script
bundles.Add(new StyleBundle("~/bundles/fullcalendarjs").Include(
"~/Scripts/jquery-ui-1.8.11.min.js",
"~/Scripts/moment.min.js",
"~/Scripts/fullcalendar.min.js"));
while googling for a fix for the error, I came upon thisstackoverflow page where the fix was to update the packages. so I did and got the following errors:
在谷歌搜索修复错误时,我发现了这个stackoverflow 页面,其中修复程序是更新包。所以我做了并得到了以下错误:
Cannot find *projectname* name 'Record'& Cannot find *projectname* name 'undefined'which are both inside the index.d.tsfile.
Cannot find *projectname* name 'Record'&Cannot find *projectname* name 'undefined'两者都在index.d.ts文件中。
while googling for a fix for those errors, I came upon several pages like this oneand this oneto name a few, but to no avail.
而对于谷歌搜索这些错误修复,我来到后几页像这一个和这一个仅举几例,但无济于事。
I'm so confused and I can't find a solution to the Cannot find *projectname* name 'Record'& Cannot find *projectname* name 'undefined'errors.
我很困惑,我找不到Cannot find *projectname* name 'Record'&Cannot find *projectname* name 'undefined'错误的解决方案。
EDIT编辑
also I tried to simply take out the line which was giving the error: [name: string]: (BaseModifier & Record<string, any>) | undefined;but that just gave me an System.OutOfMemoryException.
我也试图简单地取出给出错误的行:[name: string]: (BaseModifier & Record<string, any>) | undefined;但这只是给了我一个System.OutOfMemoryException.
Does anybody know what I should do to resolve this problem?
有谁知道我应该怎么做才能解决这个问题?
Thank you kindly.
非常感谢你。
采纳答案by nanonerd
Here is the answer. You need to update Typescript to the lastest.
这是答案。您需要将 Typescript 更新为最新版本。

