Skip to content

Break out URLSearchParams, require typedef for unparsable files#45783

Closed
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:export-D60376327
Closed

Break out URLSearchParams, require typedef for unparsable files#45783
huntie wants to merge 1 commit intofacebook:mainfrom
huntie:export-D60376327

Conversation

@huntie
Copy link
Copy Markdown
Member

@huntie huntie commented Jul 29, 2024

Summary:
Improves type strictness in the react-native package.

  • Break out URLSearchParams from URL.js into its own module, to isolate a $FlowFixMe[unsupported-syntax] suppression within that definition.
  • Update public-api-test to require an adjacent <module>.js.flow type definition file whenever a $FlowFixMe[unsupported-syntax]is present.
  • Add URLSearchParams.js.flow with a Flow parser compatible typedef (@iterator instead of [Symbol.iterator]).

The result of these changes is to add missing typedef test coverage for Libraries/Blob/URL.js (see updated test snapshots).

Changelog: [Internal]

Differential Revision: D60376327

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 29, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@react-native-bot
Copy link
Copy Markdown
Collaborator

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against 6224365cae4a3ac37345f69e31b723a3e4bcb0be

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from 6224365 to ccae31e Compare July 29, 2024 13:09
@react-native-bot
Copy link
Copy Markdown
Collaborator

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against ccae31e92be30ad1393920a1727f33dade1d55ef

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from ccae31e to 4a98a88 Compare July 30, 2024 11:12
@react-native-bot
Copy link
Copy Markdown
Collaborator

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against 4a98a8844a813726fcd742f0c4433d46e2c2167c

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from 4a98a88 to e4b4d22 Compare August 2, 2024 10:14
@react-native-bot
Copy link
Copy Markdown
Collaborator

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against e4b4d22e0e02cbd82dc86daae96e7251f2bced2e

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from e4b4d22 to c9426d5 Compare August 7, 2024 14:24
@react-native-bot
Copy link
Copy Markdown
Collaborator

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against c9426d5fb2141e0ca0ce0da1bbbaff11d36b7252

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from c9426d5 to 458fe03 Compare August 8, 2024 10:58
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from 458fe03 to 81c94c1 Compare August 8, 2024 12:17
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from 81c94c1 to d23c8e5 Compare August 8, 2024 13:28
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from d23c8e5 to f59f3ab Compare August 8, 2024 13:34
…book#45783)

Summary:
Pull Request resolved: facebook#45783

Improves type strictness in the `react-native` package.

- Break out `URLSearchParams` from `URL.js` into its own module, to isolate a `$FlowFixMe[unsupported-syntax]` suppression within that definition.
- Update `public-api-test` to require an adjacent `<module>.js.flow` type definition file whenever a `$FlowFixMe[unsupported-syntax]`is present.
- Add `URLSearchParams.js.flow` with a Flow parser compatible typedef (`@iterator` instead of `[Symbol.iterator]`).

The result of these changes is to add missing typedef test coverage for `Libraries/Blob/URL.js` (see updated test snapshots).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D60376327
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60376327

@huntie huntie force-pushed the export-D60376327 branch from f59f3ab to 8be0ddf Compare August 8, 2024 15:41
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 8, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 51ffc5c.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @huntie in 51ffc5c

When will my fix make it into a release? | How to file a pick request?

@huntie huntie deleted the export-D60376327 branch September 9, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants