我正在使用wdio创建UI测试。Wdio使用$和$$全局变量来搜索如下元素:
private get logo() { return $("#logo") }
private get menuItems() { return $$("nav .nav-item") }VSCode自动将$全局识别为JQueryStatic<HTMLElement>。作为WebdriverIO.Client<WebdriverIO.RawResult<WebdriverIO.Element>>[],$$工作正常。编译器没有问题,我们没有在项目中安装jQuery类型。
有没有办法禁用本机类型,或者强制VSCode只使用package.json中的类型
发布于 2018-08-15 16:57:59
在settings is field typescript.disableAutomaticTypeAcquisition中,将其设置为true。
https://stackoverflow.com/questions/51855736
复制相似问题