react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Update TypeScript types for `Libraries/Core/Devtools` to match implementation

Open kraenhansen opened this issue 1 year ago • 2 comments

Summary:

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

The symbolicateStackTrace returns a promise of an object containing a codeFrame and stack, 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 parseErrorStack and symbolicateStackTrace functions to match their implementation.

Test Plan:

I patched the file locally and tested function to ensure its callable with a string.

kraenhansen avatar Mar 20 '24 10:03 kraenhansen

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.

react-native-bot avatar Sep 17 '24 05:09 react-native-bot

I believe this is still relevant.

kraenhansen avatar Sep 17 '24 13:09 kraenhansen

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.

react-native-bot avatar Aug 14 '25 05:08 react-native-bot

Needs a rebase, but the still seem wrong on main if the implementation wasn't adjusted since.

kraenhansen avatar Aug 18 '25 10:08 kraenhansen