From 724894328f79556048fa9121ca5d928fe9da8fb3 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Wed, 14 Oct 2026 15:00:39 -0700 Subject: [PATCH] Use `any` for untyped `Object`/`Function` in flow-typed and debugger-shell Summary: X-link: https://github.com/react/react-native/pull/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` 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 --- flow-typed/npm/yargs_v17.x.x.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow-typed/npm/yargs_v17.x.x.js b/flow-typed/npm/yargs_v17.x.x.js index 07077c11f2..1c78d56a73 100644 --- a/flow-typed/npm/yargs_v17.x.x.js +++ b/flow-typed/npm/yargs_v17.x.x.js @@ -103,7 +103,7 @@ declare module 'yargs' { builder?: | {[key: string]: Options, ...} | ((yargsInstance: Yargs) => unknown), - handler?: Function, + handler?: any, ): this; command( cmd: string | Array,