We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
tsconfig 中开启 noEmitOnError: true,当代码中有类型错误时,taro 会正常编译。
tsconfig
noEmitOnError: true
tsconfig 配置
"compilerOptions": { "target": "es2017", "module": "commonjs", "removeComments": false, "preserveConstEnums": true, "moduleResolution": "node", "experimentalDecorators": true, "noImplicitAny": false, "allowSyntheticDefaultImports": true, "outDir": "lib", "noUnusedLocals": true, "noUnusedParameters": true, "strictNullChecks": true, "sourceMap": true, "baseUrl": ".", "rootDir": ".", "jsx": "preserve", "jsxFactory": "Taro.createElement", "allowJs": true, "resolveJsonModule": true, "typeRoots": ["node_modules/@types", "global.d.ts"], "paths": { "~/*": ["src/*"] } }
代码中有类型错误时控制台报错,编译不通过。
Taro CLI 2.0.0-beta.8 environment info: System: OS: macOS High Sierra 10.13.6 Shell: 5.3 - /bin/zsh Binaries: Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node Yarn: 1.16.0 - ~/.nvm/versions/node/v10.15.3/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm npmPackages: @tarojs/async-await: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/cli: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/components: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-babel: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-csso: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-sass: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-uglifyjs: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/redux: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/redux-h5: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/router: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-alipay: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-h5: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-qq: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-quickapp: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-swan: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-tt: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-weapp: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/webpack-runner: 2.0.0-beta.8 => 2.0.0-beta.8 eslint-config-taro: 2.0.0-beta.8 => 2.0.0-beta.8 eslint-plugin-taro: 2.0.0-beta.8 => 2.0.0-beta.8 nerv-devtools: ^1.5.6 => 1.5.6 nervjs: ^1.5.6 => 1.5.6 stylelint-config-taro-rn: 2.0.0-beta.8 => 2.0.0-beta.8 stylelint-taro-rn: 2.0.0-beta.8 => 2.0.0-beta.8 npmGlobalPackages: typescript: 3.6.3
如果您有功能上的建议,可以提到 FeatHub 使用上的问题,欢迎在「Taro 社区」一起交流
如果您有功能上的建议,可以提到 FeatHub
使用上的问题,欢迎在「Taro 社区」一起交流
The text was updated successfully, but these errors were encountered:
CC @luckyadam
Sorry, something went wrong.
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
有人帮忙看一下嘛
因为 Taro 的编译没有管 tsconfig 的配置,一般 typescript 出错编辑器都会有体现
luckyadam
No branches or pull requests
问题描述
tsconfig
中开启noEmitOnError: true
,当代码中有类型错误时,taro 会正常编译。复现步骤
tsconfig 配置
期望行为
代码中有类型错误时控制台报错,编译不通过。
报错信息
系统信息
Taro CLI 2.0.0-beta.8 environment info:
System:
OS: macOS High Sierra 10.13.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.16.0 - ~/.nvm/versions/node/v10.15.3/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
npmPackages:
@tarojs/async-await: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/cli: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/components: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/plugin-babel: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/plugin-csso: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/plugin-sass: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/plugin-uglifyjs: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/redux: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/redux-h5: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/router: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro-alipay: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro-h5: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro-qq: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro-quickapp: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro-swan: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro-tt: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/taro-weapp: 2.0.0-beta.8 => 2.0.0-beta.8
@tarojs/webpack-runner: 2.0.0-beta.8 => 2.0.0-beta.8
eslint-config-taro: 2.0.0-beta.8 => 2.0.0-beta.8
eslint-plugin-taro: 2.0.0-beta.8 => 2.0.0-beta.8
nerv-devtools: ^1.5.6 => 1.5.6
nervjs: ^1.5.6 => 1.5.6
stylelint-config-taro-rn: 2.0.0-beta.8 => 2.0.0-beta.8
stylelint-taro-rn: 2.0.0-beta.8 => 2.0.0-beta.8
npmGlobalPackages:
typescript: 3.6.3
补充信息
The text was updated successfully, but these errors were encountered: