Skip to content

Comments

fix(transformer/class-properties): transform this in static prop initializers#7481

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-25-fix_transformer_class-properties_transform_this_in_static_prop_initializers
Nov 25, 2024
Merged

fix(transformer/class-properties): transform this in static prop initializers#7481
graphite-app[bot] merged 1 commit intomainfrom
11-25-fix_transformer_class-properties_transform_this_in_static_prop_initializers

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 25, 2024

Convert this in static property initializers to reference to class name.

class C { static prop = this; } -> class C {}; C.prop = C;

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 25, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-bug Category - Bug labels Nov 25, 2024
@overlookmotel overlookmotel marked this pull request as ready for review November 25, 2024 17:54
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 25, 2024

CodSpeed Performance Report

Merging #7481 will not alter performance

Comparing 11-25-fix_transformer_class-properties_transform_this_in_static_prop_initializers (97de0b7) with main (2a5954a)

Summary

✅ 30 untouched benchmarks

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 25, 2024

Merge activity

…itializers (#7481)

Convert `this` in static property initializers to reference to class name.

`class C { static prop = this; }` -> `class C {}; C.prop = C;`
@overlookmotel overlookmotel force-pushed the 11-25-fix_transformer_class-properties_stop_searching_for_super_in_tsmoduleblock_s branch from 56577d9 to d2745df Compare November 25, 2024 20:10
@overlookmotel
Copy link
Member Author

I think I know this transform better than anyone else at present, so merging without review to avoid wasting anyone else's time.

@overlookmotel overlookmotel force-pushed the 11-25-fix_transformer_class-properties_transform_this_in_static_prop_initializers branch from 0061a3d to 97de0b7 Compare November 25, 2024 20:10
Base automatically changed from 11-25-fix_transformer_class-properties_stop_searching_for_super_in_tsmoduleblock_s to main November 25, 2024 20:15
@graphite-app graphite-app bot merged commit 97de0b7 into main Nov 25, 2024
@graphite-app graphite-app bot deleted the 11-25-fix_transformer_class-properties_transform_this_in_static_prop_initializers branch November 25, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant