Skip to content

Commit 1e70d04

Browse files
SamChou19815meta-codesync[bot]
authored andcommitted
Use any where Flow Object/Function meant any (#59093)
Summary: Pull Request resolved: #59093 X-link: react/metro#2068 With `experimental.function_and_object_type_is_no_longer_any`, Flow resolves `Object` and `Function` to the builtin class types instead of `any`. These Metro annotations relied on the old meaning, so they become `any`, which keeps the current behavior: Changelog: [Internal] Reviewed By: panagosg7 Differential Revision: D125303050 fbshipit-source-id: 205770089107ddf26b258b0efdb8480ce1c2bcc9
1 parent 7f5df1d commit 1e70d04

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎flow-typed/npm/babel-types_v7.x.x.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,7 +3570,7 @@ declare module "@babel/types" {
35703570
declare export function isExportSpecifier(node: ?Object, opts?: ?Object): node is ExportSpecifier;
35713571
declare export function isForOfStatement(node: ?Object, opts?: ?Object): node is ForOfStatement;
35723572
declare export function isImportDeclaration(node: ?Object, opts?: ?Object): node is ImportDeclaration;
3573-
declare export function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): node is ImportDefaultSpecifier;
3573+
declare export function isImportDefaultSpecifier(node: ?Object, opts?: ?any): node is ImportDefaultSpecifier;
35743574
declare export function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): node is ImportNamespaceSpecifier;
35753575
declare export function isImportSpecifier(node: ?Object, opts?: ?Object): node is ImportSpecifier;
35763576
declare export function isImportExpression(node: ?Object, opts?: ?Object): node is ImportExpression;
@@ -3589,9 +3589,9 @@ declare module "@babel/types" {
35893589
declare export function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): node is ExportNamespaceSpecifier;
35903590
declare export function isOptionalMemberExpression(node: ?Object, opts?: ?Object): node is OptionalMemberExpression;
35913591
declare export function isOptionalCallExpression(node: ?Object, opts?: ?Object): node is OptionalCallExpression;
3592-
declare export function isClassProperty(node: ?Object, opts?: ?Object): node is ClassProperty;
3592+
declare export function isClassProperty(node: ?any, opts?: ?Object): node is ClassProperty;
35933593
declare export function isClassAccessorProperty(node: ?Object, opts?: ?Object): node is ClassAccessorProperty;
3594-
declare export function isClassPrivateProperty(node: ?Object, opts?: ?Object): node is ClassPrivateProperty;
3594+
declare export function isClassPrivateProperty(node: ?any, opts?: ?Object): node is ClassPrivateProperty;
35953595
declare export function isClassPrivateMethod(node: ?Object, opts?: ?Object): node is ClassPrivateMethod;
35963596
declare export function isPrivateName(node: ?Object, opts?: ?Object): node is PrivateName;
35973597
declare export function isStaticBlock(node: ?Object, opts?: ?Object): node is StaticBlock;
@@ -3699,9 +3699,9 @@ declare module "@babel/types" {
36993699
declare export function isTSQualifiedName(node: ?Object, opts?: ?Object): node is TSQualifiedName;
37003700
declare export function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): node is TSCallSignatureDeclaration;
37013701
declare export function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): node is TSConstructSignatureDeclaration;
3702-
declare export function isTSPropertySignature(node: ?Object, opts?: ?Object): node is TSPropertySignature;
3702+
declare export function isTSPropertySignature(node: ?any, opts?: ?Object): node is TSPropertySignature;
37033703
declare export function isTSMethodSignature(node: ?Object, opts?: ?Object): node is TSMethodSignature;
3704-
declare export function isTSIndexSignature(node: ?Object, opts?: ?Object): node is TSIndexSignature;
3704+
declare export function isTSIndexSignature(node: ?any, opts?: ?Object): node is TSIndexSignature;
37053705
declare export function isTSAnyKeyword(node: ?Object, opts?: ?Object): node is TSAnyKeyword;
37063706
declare export function isTSBooleanKeyword(node: ?Object, opts?: ?Object): node is TSBooleanKeyword;
37073707
declare export function isTSBigIntKeyword(node: ?Object, opts?: ?Object): node is TSBigIntKeyword;
@@ -3747,7 +3747,7 @@ declare module "@babel/types" {
37473747
declare export function isTSTypeAssertion(node: ?Object, opts?: ?Object): node is TSTypeAssertion;
37483748
declare export function isTSEnumBody(node: ?Object, opts?: ?Object): node is TSEnumBody;
37493749
declare export function isTSEnumDeclaration(node: ?Object, opts?: ?Object): node is TSEnumDeclaration;
3750-
declare export function isTSEnumMember(node: ?Object, opts?: ?Object): node is TSEnumMember;
3750+
declare export function isTSEnumMember(node: ?any, opts?: ?Object): node is TSEnumMember;
37513751
declare export function isTSModuleDeclaration(node: ?Object, opts?: ?Object): node is TSModuleDeclaration;
37523752
declare export function isTSModuleBlock(node: ?Object, opts?: ?Object): node is TSModuleBlock;
37533753
declare export function isTSImportType(node: ?Object, opts?: ?Object): node is TSImportType;
@@ -3775,7 +3775,7 @@ declare module "@babel/types" {
37753775
declare export function isExpressionWrapper(node: ?Object, opts?: ?Object): node is (ExpressionStatement | ParenthesizedExpression | TypeCastExpression);
37763776
declare export function isFor(node: ?Object, opts?: ?Object): node is (ForInStatement | ForStatement | ForOfStatement);
37773777
declare export function isForXStatement(node: ?Object, opts?: ?Object): node is (ForInStatement | ForOfStatement);
3778-
declare export function isFunction(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod);
3778+
declare export function isFunction(node: ?any, opts?: ?Object): node is (FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod);
37793779
declare export function isFunctionParent(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock);
37803780
declare export function isPureish(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral);
37813781
declare export function isDeclaration(node: ?Object, opts?: ?Object): node is (FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration);

‎flow-typed/npm/babel_v7.x.x.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ declare module '@babel/core' {
466466
constructor(descriptor: UnloadedDescriptor): ConfigItem;
467467
}
468468

469-
declare export type EntryTarget = string | {...} | Function;
469+
declare export type EntryTarget = string | {...} | any;
470470
declare export type EntryOptions = {...} | false | void;
471471
declare export type PluginEntry =
472472
| EntryTarget

0 commit comments

Comments
 (0)