Update TypeScript types for Libraries/Core/Devtools to match implementation#43566
Closed
kraenhansen wants to merge 3 commits into
Closed
Update TypeScript types for Libraries/Core/Devtools to match implementation#43566kraenhansen wants to merge 3 commits into
Libraries/Core/Devtools to match implementation#43566kraenhansen wants to merge 3 commits into
Conversation
parseErrorStack to match its implementationLibraries/Core/Devtools to match implementation
added 3 commits
March 20, 2024 15:58
The `parseErrorStack` function takes the stack as a string, as its only argument, not the `Error`: https://github.com/facebook/react-native/blob/ce4d8f2756841e1226cb1c773026413b63abdf85/packages/react-native/Libraries/Core/Devtools/parseErrorStack.js#L41
Collaborator
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
Author
|
I believe this is still relevant. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jun 2, 2025
Summary: - This is similar to #43566, but include also updated `StackFrame` type. The current `Devtools.d.ts` doesn't match the `parseErrorStack.js` and `symbolicateStackTrace.js` implementations. I've tried to run `build-types`, but only `symbolicateStackTrace.d.ts` was generated. I've not checked why. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [GENERAL] [FIXED] - Devtools TS Types Pull Request resolved: #51737 Test Plan: Call `parseErrorStack` and `symbolicateStackTrace` in TS. Reviewed By: rshest Differential Revision: D75782013 Pulled By: huntie fbshipit-source-id: 91fe560f079731af2a5834c8de8eafb723d00bf9
Collaborator
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
Author
|
Needs a rebase, but the still seem wrong on |
Collaborator
|
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Contributor
Author
|
Same as before - still relevant. |
|
@huntie has imported this pull request. If you are a Meta employee, you can view this in D110879262. |
Member
|
Sorry we totally missed this. Landing now. |
Member
|
Ah, merged already via #51737. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The
parseErrorStackfunction takes the stack as a string, as its only argument, not theError: https://github.com/facebook/react-native/blob/ce4d8f2756841e1226cb1c773026413b63abdf85/packages/react-native/Libraries/Core/Devtools/parseErrorStack.js#L41The
symbolicateStackTracereturns a promise of an object containing acodeFrameandstack, not an array of frames:https://github.com/facebook/react-native/blob/ce4d8f2756841e1226cb1c773026413b63abdf85/packages/react-native/Libraries/Core/Devtools/symbolicateStackTrace.js#L17-L30
Changelog:
[GENERAL] [FIXED] - Fixed TypeScript type of the
parseErrorStackandsymbolicateStackTracefunctions to match their implementation.Test Plan:
I patched the file locally and tested function to ensure its callable with a string.