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

Add ts-prune #4772

Merged
merged 13 commits into from
Jul 28, 2023
Merged

Add ts-prune #4772

merged 13 commits into from
Jul 28, 2023

Conversation

Latropos
Copy link
Contributor

@Latropos Latropos commented Jul 19, 2023

Summary

  • Ts-prune allows us to detect unused typescript code.
  • Advantages:
    • We can remove exports of all the functions and interfaces exported for no reason. This makes importing with cmd+enter shortcut easier, since you are less likely to get wrong suggestions from vscode.
    • We can see all the “forgotten” areas of code, and think about reasons to have them.

Note
I've removed the file MapperRegistry.ts which seems unnecessary since this PR: #3722

Test plan

Just CI

@Latropos Latropos requested a review from tjzel July 25, 2023 08:43
@Latropos Latropos marked this pull request as ready for review July 25, 2023 08:46
src/reanimated2/animation/util.ts Outdated Show resolved Hide resolved
src/reanimated2/helperTypes.ts Show resolved Hide resolved
src/reanimated2/hook/useReducedMotion.web.ts Outdated Show resolved Hide resolved
src/reanimated2/fabricUtils.web.ts Outdated Show resolved Hide resolved
src/reanimated2/jestUtils.web.ts Outdated Show resolved Hide resolved
src/reanimated2/js-reanimated/MapperRegistry.ts Outdated Show resolved Hide resolved
src/reanimated2/platform-specific/checkVersion.web.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, could you test it extensively with our examples before merging?

@Latropos Latropos added this pull request to the merge queue Jul 28, 2023
Merged via the queue into main with commit 856ba52 Jul 28, 2023
8 checks passed
@Latropos Latropos deleted the acynk/ts-prune branch July 28, 2023 07:45
piaskowyk pushed a commit that referenced this pull request Aug 4, 2023
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

* Ts-prune allows us to detect unused typescript code. 
* Advantages:
* We can remove exports of all the functions and interfaces exported for
no reason. This makes importing with cmd+enter shortcut easier, since
you are less likely to get wrong suggestions from vscode.
* We can see all the “forgotten” areas of code, and think about reasons
to have them.
<!-- Explain the motivation for this PR. Include "Fixes #<number>" if
applicable. -->

> **Note**
>I've removed the file `MapperRegistry.ts` which seems unnecessary since
this PR:
[#3722](#3722)


## Test plan

Just CI
<!-- Provide a minimal but complete code snippet that can be used to
test out this change along with instructions how to run it and a
description of the expected behavior. -->

---------

Co-authored-by: Aleksandra Cynk <aleksandracynk@swmansion.com>
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.

2 participants