-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor(ts-estree): add types to converter #156
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
refactor(ts-estree): add types to converter #156
Conversation
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
- Coverage 95.82% 95.68% -0.15%
==========================================
Files 51 51
Lines 2541 2458 -83
Branches 373 372 -1
==========================================
- Hits 2435 2352 -83
- Misses 63 65 +2
+ Partials 43 41 -2
|
we should really raise a separate PR to remove all of the JSDoc types from the codebase... |
both PR adds same file (ast structure), and they are not blocking each other. On spectrum i was referring to different change :) |
@bradzacher @JamesHenry i aligned types ( |
I manually ran some real-world "benchmarks" by building from this PR and including it in a build of Prettier and running it on a real codebase (angular.io documentation website) and can confirm there are not any performance regressions/issues |
Thanks for all the work on this! |
This is prototype of converter with types, with small improvement to performance (this is not goal of this PR).
Changes:
temp-types-based-on-js-source.ts
toparser-options.ts
...
before
Complex File:
ts-estree x 238 ops/sec ±2.14% (86 runs sampled)
Simple File:
ts-estree x 10,706 ops/sec ±3.19% (87 runs sampled)
after
Complex File:
ts-estree x 262 ops/sec ±1.78% (84 runs sampled)
Simple File:
ts-estree x 11,049 ops/sec ±3.26% (80 runs sampled)