-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defineConstants在webstorm报错 #5220
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
|
@Garfield550 global.d.ts 里添加了声明 vscode依然提示 ts找不到变量
|
我写了个Taro Plugin来兼容 |
正解 |
问题描述
在config中定义了defineConstants,使用没有问题,但是ide会报错
代码
期望行为
不会报错,目前使用@ts-ignore
报错信息
TS2304: Cannot find name 'BASE_URL'.
系统信息
System:
OS: macOS 10.15.2
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
Yarn: 1.21.1 - ~/.yarn/bin/yarn
npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
npmPackages:
@tarojs/components: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/components-qa: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/mini-runner: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/mobx: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/mobx-h5: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/router: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro-alipay: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro-h5: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro-qq: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro-quickapp: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro-swan: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro-tt: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/taro-weapp: 2.0.0-beta.10 => 2.0.0-beta.10
@tarojs/webpack-runner: 2.0.0-beta.10 => 2.0.0-beta.10
eslint-config-taro: 2.0.0-beta.10 => 2.0.0-beta.10
eslint-plugin-taro: 2.0.0-beta.10 => 2.0.0-beta.10
nerv-devtools: ^1.5.6 => 1.5.6
nervjs: ^1.5.6 => 1.5.6
stylelint-config-taro-rn: 2.0.0-beta.10 => 2.0.0-beta.10
stylelint-taro-rn: 2.0.0-beta.10 => 2.0.0-beta.10
补充信息
The text was updated successfully, but these errors were encountered: