typescript 如果没有 jQuery,SignalR 是否可能?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18861651/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 02:51:37  来源:igfitidea点击:

Is SignalR possible without jQuery?

jqueryasp.netsignalrtypescript

提问by uSeRnAmEhAhAhAhAhA

Can TypeScript onlybe used to create SignalR web apps, or do we have to use jQuery? Or is there a TypeScript version of SignalR?

TypeScript只能用于创建 SignalR Web 应用程序,还是必须使用 jQuery?或者是否有 SignalR 的 TypeScript 版本?

回答by N. Taylor Mullen

SignalR has a dependency on JQuery therefore it is required that you use it.

SignalR 依赖于 JQuery,因此需要您使用它。

However, there is an issue filed on the SignalR source GitHub page to re-write the JS client without the JQuery dependency.

但是,SignalR 源 GitHub 页面上提交了一个问题,以重新编写没有 JQuery 依赖项的 JS 客户端。

https://github.com/SignalR/SignalR/issues/372

https://github.com/SignalR/SignalR/issues/372

回答by Pawel

I made this based on react-native-signalr but without adding jQuery to window object https://github.com/DVLP/signalr-no-jquery

我是基于 react-native-signalr 制作的,但没有将 jQuery 添加到窗口对象 https://github.com/DVLP/signalr-no-jquery

回答by Luká? Kmoch

It's possible to use TypeScript or Javascript client, but you have to use new version SignalR Core.

可以使用 TypeScript 或 Javascript 客户端,但您必须使用新版本的 SignalR Core。