-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Support TypeScript 3.8 #3937
Comments
dprint TypeScript 3.8 Support milestone: https://github.com/dsherret/dprint/milestone/1 |
I suspect it will take a little while for prettier to support ECMAScript Private Fields in TypeScript, mostly because there are a few upstream dependencies and it isn't just an upgrade for them. That means we might want to land adoption of that later and not concurrently with TS 3.8. The main reason to land TS 3.8 as early as feasible is proper support for TLA, including in bundles. |
|
I've got a branch working, but there was a change in behaviour in TypeScript 3.8. Previously, source maps generated by TypeScript utilised the I am going to have to move the logic we have from |
@kitsonk cool - if I can be of any help just point me at a branch. |
In regards to top-level-await, TypeScript will throw if the input does not look like a module (as top-level-await is not supported in scripts). TypeScript recommends adding `export {};` to the file, which is the current idomatic way of identifying a module as a module that otherwise has no imports or exports. Resolves denoland#3937 Resolves denoland#3301 Resolves denoland#3391
The release candidate for TypeScript 3.8 is available. I have a branch updating to TypeScript 3.8. The biggest feature we care about is that private fields and TLA are supported. We were ignoring the TLA errors, and should take advantage of the private fields, as V8 already supports them and they are the best way to ensure private data stays private.
There is one major problem, prettier can't handle private fields at the moment under TypeScript. The tracking issue is prettier/prettier#7263. That means putting private fields in causes prettier to throw when using
./tools/format.py --js
. So until prettier updates, it would be hard for us to update.I also wonder if SWC/dprint handle them as well (cc/ @dsherret) for
deno fmt
.The text was updated successfully, but these errors were encountered: