Skip to content
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

Preserve declarations for private fields, static fields, and methods #574

Merged
merged 1 commit into from Dec 30, 2020

Conversation

alangpierce
Copy link
Owner

Fixes #560

Alternate approach to #570 where we emit the declarations as-is, e.g. #foo = 3;
in the class body. Note that this does not transpile these private fields, so
the underlying runtime still needs to support them and will give a syntax error
if it doesn't.

Fixes #560

Alternate approach to #570 where we emit the declarations as-is, e.g. `#foo = 3;`
in the class body. Note that this does *not* transpile these private fields, so
the underlying runtime still needs to support them and will give a syntax error
if it doesn't.
@codecov-io
Copy link

Codecov Report

Merging #574 (f8db417) into master (4ff153c) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #574      +/-   ##
==========================================
- Coverage   81.93%   81.86%   -0.07%     
==========================================
  Files          55       55              
  Lines        5800     5569     -231     
  Branches     1311     1313       +2     
==========================================
- Hits         4752     4559     -193     
+ Misses        764      726      -38     
  Partials      284      284              
Impacted Files Coverage Δ
src/util/getClassInfo.ts 89.14% <100.00%> (+2.53%) ⬆️
src/Options-gen-types.ts 75.00% <0.00%> (-25.00%) ⬇️
src/parser/index.ts 77.77% <0.00%> (-7.94%) ⬇️
src/computeSourceMap.ts 83.33% <0.00%> (-5.56%) ⬇️
src/util/getNonTypeIdentifiers.ts 94.44% <0.00%> (-5.56%) ⬇️
src/parser/plugins/types.ts 91.66% <0.00%> (-3.34%) ⬇️
src/parser/tokenizer/readWord.ts 82.35% <0.00%> (-3.02%) ⬇️
src/parser/traverser/util.ts 86.20% <0.00%> (-2.17%) ⬇️
src/parser/traverser/base.ts 95.45% <0.00%> (-1.69%) ⬇️
src/parser/traverser/statement.ts 82.18% <0.00%> (-0.44%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ff153c...f8db417. Read the comment docs.

@alangpierce alangpierce merged commit 18709a7 into master Dec 30, 2020
@alangpierce alangpierce deleted the preserve-private-fields branch December 30, 2020 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for private class fields
2 participants