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

rm interface from RNPerfMetrics #26

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

EdmondChuiHW
Copy link

@EdmondChuiHW EdmondChuiHW commented Mar 20, 2024

Summary

Remove unnecessary interface. Base PR for stack #27 and #28

Test plan

npm run build

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

This was referenced Mar 20, 2024
@EdmondChuiHW EdmondChuiHW marked this pull request as ready for review March 21, 2024 01:26
}
return instance;
}

class RNPerfMetricsImpl implements RNPerfMetrics {
type UnsunscribeFn = () => void;
Copy link

Choose a reason for hiding this comment

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

misspelling. Also can this be inlined, since it's not exported?

Copy link
Author

Choose a reason for hiding this comment

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

Oof, fixed typo later in the stack but missed this one.

This is still exported transitively via RNPerfMetrics. I couldn't find a way to type-name the returned function inline at addListener(…).

Can put it in a comment instead if you mean the while type alias should be removed. I think it's good to document the intent somewhere. useEffect names their clean up function as Destructor, for example.

@EdmondChuiHW EdmondChuiHW requested a review from huntie March 22, 2024 16:01
@EdmondChuiHW EdmondChuiHW merged commit 72fb914 into facebookexperimental:main Mar 22, 2024
3 checks passed
@EdmondChuiHW EdmondChuiHW deleted the simplify-type branch May 29, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants