gpt4 book ai didi

jquery - 类型 “jQueryStatic” 的值不可调用

转载 作者:搜寻专家 更新时间:2023-10-30 21:08:27 25 4
gpt4 key购买 nike

问题:Visual Studio IntelliSense 在 $ 处大喊: Value of type “jQueryStatic<TElement extends Node>” is not callable

示例代码($ 的所有实例,真的):

const emaildiv = $("<div>", { "class": "email-item" });
$(containerid).append(emaildiv);

设置:

tsconfig.ts:

 {
"compilerOptions": {
"lib": [ "es2015", "es2015.iterable", "dom" ],
"noImplicitAny": true,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5"
},
"files": [
// a bunch of local files...
],
"compileOnSave": true
}

.csproj:

   <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TypeScriptToolsVersion>2.3</TypeScriptToolsVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<!-- other .ts files -->
<TypeScriptCompile Include="Scripts\Scripts.ts" />
</ItemGroup>

<ItemGroup>
<Folder Include="wwwroot\scripts\" />
</ItemGroup>

</Project>

一切都构建并运行良好。有人知道吗?

最佳答案

事实证明,问题又出在 Resharper 上 (Value of type "JqueryStatic" is not callable)。这是我所做的一切的列表:

关于jquery - 类型 “jQueryStatic<TElement extends Node>” 的值不可调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46208434/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com