Skip to content

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
}

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

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 facebook:main Mar 22, 2024
@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