Fix a few readonly 10/n (#56948)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56948

```
js1 flow-runner codemod flow/transformAllVariance --variance readonly --format-files=false
```

drop-conflicts

landed-with-radar-review

Reviewed By: SamChou19815

Differential Revision: D106144499

fbshipit-source-id: 85493334eae630d3dec7e5920633c076f8f09729
This commit is contained in:
Marco Wang authored and meta-codesync[bot] committed 2026-05-22 22:27:46 -07:00
1 parent 0676eb63a2
commit 09fc0432d1
193 files changed
+1473 -1312

No files matched your search

@@ -14,8 +14,8 @@ import type {NodePath, Visitor} from '@babel/traverse';
const t = require('@babel/types');
export type GatherTypeAliasesVisitorState = {
+aliasToPathMap: Map<string, NodePath<t.TSTypeAliasDeclaration>>,
+interfaceToPathMap?: Map<string, NodePath<t.TSInterfaceDeclaration>>,
readonly aliasToPathMap: Map<string, NodePath<t.TSTypeAliasDeclaration>>,
readonly interfaceToPathMap?: Map<string, NodePath<t.TSInterfaceDeclaration>>,
};
/**
@@ -21,7 +21,7 @@ const debug = require('debug')('build-types:transforms:inlineTypes');
// TODO: Handle more builtin TS types
const builtinTypeResolvers: {
+[K: string]: (
readonly [K: string]: (
path: NodePath<t.TSTypeReference>,
state: BaseVisitorState,
tsTypeResolver?: TSTypeResolver,
@@ -18,7 +18,7 @@ const t = require('@babel/types');
const debug = require('debug')('build-types:transforms:inlineTypes');
const typeOperatorResolvers: {
+[K: string]: (
readonly [K: string]: (
path: NodePath<t.TSTypeOperator>,
state: BaseVisitorState,
) => void,