You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(types): Reference global.d.ts using path not types (#51104)
Summary:
After #49516 TSC would not find the global types.
Types reference expect a package name but was given a path to a declaration.
TS doc: https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-path-
This PR changes `types` to `path` to fix the issue.
`dtslint` fails with `no-bad-reference` rule, but the `../src` lives in the same package in `react-native` package.
<!-- 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] - Reference `global.d.ts` using `path` so they can be resolved by TSC
Pull Request resolved: #51104
Test Plan:
Before the change with current RN 0.79.2 TSC would fail on resolving the global types (example from [Sentry RN SDK build](getsentry/sentry-react-native@134d810)):

After the change to path TSC finds the global types.
Using TSC Version 4.9.5
Reviewed By: huntie
Differential Revision: D74208815
Pulled By: coado
fbshipit-source-id: 2fd51d79061ffb356c047604213cff7a425f167e
0 commit comments