-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Enable useDefineForClassFields #59646
base: main
Are you sure you want to change the base?
Conversation
@typescript-bot perf test this faster |
@DanielRosenwasser Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
This is the diff in Because our target doesn't support define fields, esbuild is downleveling them with helpers. That doesn't seem so great. However, if we instead target just Node 14.17 and not |
Honestly, just saying our minimum is Node 14.17 would probably be acceptable; all browsers can handle this, so it's really just Node, and we already declare |
Been meaning to send this one for a bit. Unfortunately, our target is still too low to get this without runtime helpers.
I also had to add
declare
to our object allocators to prevent some very confusing crashes. I suspect that it'd be better to merge the allocators together and then just use defined properties in a specific order to make the shape consistent, which this PR does not do.