ezolenko / rollup-plugin-typescript2

Rollup plugin for typescript with compiler errors.
MIT License
820 stars 71 forks source link

refactor(cache): further condense `walkTree` #393

Closed agilgur5 closed 2 years ago

agilgur5 commented 2 years ago

Summary

Condense walkTree further to just 4 LoC

Details

ezolenko commented 2 years ago

Feels weird to return void, but I guess TS will warn if return types ever get out of sync 🤷

agilgur5 commented 2 years ago

Yea it's a stylistic thing; I thought it seemed odd in the context of this codebase but I've written code like this in other codebases where it doesn't seem as "out of place". Changing some of the style in this and #402 should make it feel more comfortable.

Should probably get prettier (or another formatter) into this codebase at some point to make everything more consistent (and switch to non-deprecated ESLint too 😅)