Summary:
For the contentType Parameter of the method slice in Class Blob which was fixed for
https://github.com/facebook/react-native/pull/38078
the typescript declaration is missing.
## Changelog:
[GENERAL] [ADDED] - Added contentType parameter to Blob declaration
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/38163
Test Plan: I ran yarn run test-typescript and check with Webstorm and VSCode.
Reviewed By: rshest
Differential Revision: D47228992
Pulled By: javache
fbshipit-source-id: fd767bb47c5e64657bfafba4c84d1d8671857109
Summary:
In Webstorm or VSCode when using Typescript the declaration of the class "File" is missing. So both IDEs show "File" as error. With this change it fixes the issue https://github.com/facebook/react-native/issues/38061 .
## Changelog:
[GENERAL] [FIXED] Fixed missing File declaration in Typescript global.d.ts
<!-- 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
Pull Request resolved: https://github.com/facebook/react-native/pull/38165
Test Plan:
I ran
`yarn run test-typescript`
with no error
After that i initialized a new react-native project and installed the react-native library with my local changes of global.d.ts. Webstorm and VSCode now find the declaration of "File" and don't show "File" as error and suggest the right parameters.
Reviewed By: rshest
Differential Revision: D47209461
Pulled By: cortinico
fbshipit-source-id: 0884dfe786ea3a5070aa0a487a8e74463c8f1a0f
Summary:
Changelog: [Internal] - Noticed when I was cutting 0.72 types there was some types not exported and also some duplicate.
I'm not sure why our lint didn't catch this, I can look into that next
bypass-github-export-checks
Reviewed By: NickGerleman
Differential Revision: D45294027
fbshipit-source-id: addf5a5d7af10e3087edaaf660ff99e46932bc3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36632
Discovered when bumping the RN documentation to typecheck against 0.72, https://github.com/facebook/react-native/pull/36109 removed the `EmitterSubscription` type which should be kept public.
Changelog:
[General][Fixed] - Export EmitterSubscription TypeScript Type
Reviewed By: cortinico
Differential Revision: D44375081
fbshipit-source-id: c8dbd5694d3a728a0a2091210894d27c9d84a012
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36819
X-link: https://github.com/facebook/metro/pull/964
This diff creates a new hook to the Metro symbolicator. `customizeStack` aims to provide a whole stack modification hook on the output of the `/symbolicate` endpoint.
The purpose of this hook is to be able to apply callsite-based modifications to the stack trace. One such example is user-facing frame skipping APIs like FBLogger internally.
Consider the following API:
```
FBLogger('my_project')
.blameToPreviousFile()
.mustfix(
'This error should refer to the callsite of this method',
);
```
In this particular case, we'd want to skip all frames from the top that come from the same source file. To do that, we need knowledge of the entire symbolicated stack, neither a hook before symbolication nor an implementation in `symbolicator.customizeFrame` are sufficient to be able to apply this logic.
This diff creates the new hook, which allows for mutations of the entire symbolicated stack via a `symbolicator.customizeStack` hook. The default implementation of this simply returns the same stack, but it can be wrapped similar to `symbolicator.customizeFrame`.
To actually have information for this hook to act on, I've created the possibility to send additional data to the metro `/symbolicate` endpoint via an `extraData` object. This mirrors the `extraData` from https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/NativeExceptionsManager.js#L33, and I've wired up LogBox to send that object along with the symbolicate call.
Changelog:
[General][Added] - Added customizeStack hook to Metro's `/symbolicate` endpoint to allow custom frame skipping logic on a stack level.
Reviewed By: motiz88
Differential Revision: D44257733
fbshipit-source-id: 05cd57f5917a1e97b0520e772692ce64029fbf8a