-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Merge and align global.d.ts and globals.d.ts files #49516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This pull request was exported from Phabricator. Differential Revision: D69772463 |
This pull request was exported from Phabricator. Differential Revision: D69772463 |
Summary: Pull Request resolved: facebook#49516 Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations. Changelog: [General][Changed] - Improve TypeScript types for `global` objects Reviewed By: huntie Differential Revision: D69772463
b0f1102
to
43b4045
Compare
This pull request was exported from Phabricator. Differential Revision: D69772463 |
Summary: Pull Request resolved: facebook#49516 Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations. Changelog: [General][Changed] - Improve TypeScript types for `global` objects Reviewed By: huntie Differential Revision: D69772463
43b4045
to
63f16f4
Compare
This pull request was exported from Phabricator. Differential Revision: D69772463 |
Summary: Pull Request resolved: facebook#49516 Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations. Changelog: [General][Changed] - Improve TypeScript types for `global` objects Reviewed By: huntie Differential Revision: D69772463
63f16f4
to
2306fa8
Compare
Summary: dtslint throws an error when <reference path> is used to reference another package. The suggested approach is to use <reference types> instead. It requires that the [email protected] is used. Differential Revision: D69749044
This pull request was exported from Phabricator. Differential Revision: D69772463 |
2306fa8
to
14dcbd9
Compare
Summary: Pull Request resolved: facebook#49516 Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations. Changelog: [General][Changed] - Improve TypeScript types for `global` objects Reviewed By: huntie Differential Revision: D69772463
This pull request was exported from Phabricator. Differential Revision: D69772463 |
Summary: Pull Request resolved: facebook#49516 Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations. Changelog: [General][Changed] - Improve TypeScript types for `global` objects Reviewed By: huntie Differential Revision: D69772463
14dcbd9
to
4d2c867
Compare
Summary: Pull Request resolved: facebook#49516 Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations. Changelog: [General][Changed] - Improve TypeScript types for `global` objects Reviewed By: huntie Differential Revision: D69772463
This pull request was exported from Phabricator. Differential Revision: D69772463 |
4d2c867
to
45207bd
Compare
This pull request has been merged in 094c5be. |
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. ## 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] - 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
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. ## 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] - 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
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
Summary:
Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations.
Changelog:
[General][Changed] - Improve TypeScript types for
global
objectsReviewed By: huntie
Differential Revision: D69772463