-
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
typescript 的 Optional chaining(?.) 运算符支持 #5183
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
希望多支持一些新的JS语法 |
@Yeeing 标题写反了,是 现在 taro 用的是 babel6,还不支持 optional chaining,但新版的 typescript 已经提供支持了,然而编译 ts 代码并不是用的 ts-loader,所以升级 typescript 版本也没用... 这块有计划支持么, |
@js-newbee Taro 2 小程序也是用 Webpack 编译了,所以理论上可以添加 babel 插件搞定,当然更希望 TS 的代码是用 ts-loader 编译。 cc @luckyadam |
问了一下老李,Taro 2 也还是基于 Babel 6 的,不过 Taro 3 是基于 Bable 7,Taro 3 就可以支持了。 |
先 close 咯 |
这个特性巨大提升生产力啊,建议优先考虑 |
same issue +1 |
why close it? not fragrant? |
taro2 也是可以支持的,目前wx-transformer中ts.transpile的target配置为ESNEXT,配置为<=ES2019即可开启 |
这个wx-transformer具体在什么地方配置呢 |
看了一下,没有开放配置,要深入到源码改 |
问题描述
是否应该支持typescript的
?.
运算符复现步骤
期望行为
报错信息
Unexpected token
系统信息
补充信息
The text was updated successfully, but these errors were encountered: