Skip to content

Use any for untyped Object/Function in flow-typed and debugger-shell - #2069

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D125303674
Oct 14, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
export-D125303674

Conversation

@SamChou19815

Copy link
Copy Markdown
Member

Summary:
X-link: react/react-native#59092

With experimental.function_and_object_type_is_no_longer_any, Flow resolves Object and Function to the builtin class types instead of any. These annotations relied on the old meaning, so they become any:

  • cli-types: the CommandFunction<Object> of Command.func. Commands with exact arg types no longer fit it.
  • yargs: the command handler, which gave handlers an any context. js1 fox handlers rely on it.
  • debugger-shell: SettingsStore's default values, which are read by key.

Changelog: [Internal]

Differential Revision: D125303674

…shell

Summary:
X-link: react/react-native#59092

With `experimental.function_and_object_type_is_no_longer_any`, Flow resolves `Object` and `Function` to the builtin class types instead of `any`. These annotations relied on the old meaning, so they become `any`:
- `cli-types`: the `CommandFunction<Object>` of `Command.func`. Commands with exact arg types no longer fit it.
- `yargs`: the `command` handler, which gave handlers an `any` context. `js1 fox` handlers rely on it.
- `debugger-shell`: `SettingsStore`'s default values, which are read by key.

Changelog: [Internal]

Differential Revision: D125303674
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 14, 2026
@meta-codesync

meta-codesync Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@SamChou19815 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D125303674.

meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Oct 14, 2026
…shell (#59092)

Summary:
X-link: react/metro#2069


With `experimental.function_and_object_type_is_no_longer_any`, Flow resolves `Object` and `Function` to the builtin class types instead of `any`. These annotations relied on the old meaning, so they become `any`:
- `cli-types`: the `CommandFunction<Object>` of `Command.func`. Commands with exact arg types no longer fit it.
- `yargs`: the `command` handler, which gave handlers an `any` context. `js1 fox` handlers rely on it.
- `debugger-shell`: `SettingsStore`'s default values, which are read by key.

Changelog: [Internal]

Differential Revision: D125303674
@meta-codesync
meta-codesync Bot merged commit 5e4c250 into main Oct 14, 2026
18 of 19 checks passed
meta-codesync Bot pushed a commit to react/react-native that referenced this pull request Oct 14, 2026
…shell (#59092)

Summary:
X-link: react/metro#2069

Pull Request resolved: #59092

With `experimental.function_and_object_type_is_no_longer_any`, Flow resolves `Object` and `Function` to the builtin class types instead of `any`. These annotations relied on the old meaning, so they become `any`:
- `cli-types`: the `CommandFunction<Object>` of `Command.func`. Commands with exact arg types no longer fit it.
- `yargs`: the `command` handler, which gave handlers an `any` context. `js1 fox` handlers rely on it.
- `debugger-shell`: `SettingsStore`'s default values, which are read by key.

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D125303674

fbshipit-source-id: 042b5ef6f84dc3d10190d14a4239b8f4cff7cadc
@SamChou19815
SamChou19815 deleted the export-D125303674 branch October 14, 2026 23:34
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. meta-exported needs-meta-import

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant