GeezerVison is showing github.com — Sync `ReactNativeTypes` from React Native (#21015) · react/react@c9f6d0a
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-native-renderer/src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactFabric.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -97,6 +97,7 @@ function findHostInstance_DEPRECATED<TElementType: ElementType>( |
97 | 97 | // Fabric |
98 | 98 | return (hostInstance: any).canonical; |
99 | 99 | } |
| 100 | + // $FlowFixMe[incompatible-return] |
100 | 101 | return hostInstance; |
101 | 102 | } |
102 | 103 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactFabricHostConfig.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -187,7 +187,7 @@ class ReactFabricHostComponent { |
187 | 187 | } |
188 | 188 |
|
189 | 189 | // eslint-disable-next-line no-unused-expressions |
190 | | -(ReactFabricHostComponent.prototype: NativeMethods); |
| 190 | +(ReactFabricHostComponent.prototype: $ReadOnly<{...NativeMethods, ...}>); |
191 | 191 |
|
192 | 192 | export * from 'react-reconciler/src/ReactFiberHostConfigWithNoMutation'; |
193 | 193 | export * from 'react-reconciler/src/ReactFiberHostConfigWithNoHydration'; |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactNativeFiberHostComponent.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -127,6 +127,6 @@ class ReactNativeFiberHostComponent { |
127 | 127 | } |
128 | 128 |
|
129 | 129 | // eslint-disable-next-line no-unused-expressions |
130 | | -(ReactNativeFiberHostComponent.prototype: NativeMethods); |
| 130 | +(ReactNativeFiberHostComponent.prototype: $ReadOnly<{...NativeMethods, ...}>); |
131 | 131 |
|
132 | 132 | export default ReactNativeFiberHostComponent; |
Collapse file
Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactNativeRenderer.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -96,6 +96,7 @@ function findHostInstance_DEPRECATED( |
96 | 96 | // Fabric |
97 | 97 | return (hostInstance: any).canonical; |
98 | 98 | } |
| 99 | + // $FlowFixMe[incompatible-return] |
99 | 100 | return hostInstance; |
100 | 101 | } |
101 | 102 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactNativeTypes.js +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -94,7 +94,7 @@ export type PartialViewConfig = $ReadOnly<{ |
94 | 94 | validAttributes?: PartialAttributeConfiguration, |
95 | 95 | }>; |
96 | 96 |
|
97 | | -export type NativeMethods = { |
| 97 | +export type NativeMethods = $ReadOnly<{| |
98 | 98 | blur(): void, |
99 | 99 | focus(): void, |
100 | 100 | measure(callback: MeasureOnSuccessCallback): void, |
@@ -105,8 +105,7 @@ export type NativeMethods = { |
105 | 105 | onFail?: () => void, |
106 | 106 | ): void, |
107 | 107 | setNativeProps(nativeProps: {...}): void, |
108 | | - ... |
109 | | -}; |
| 108 | +|}>; |
110 | 109 |
|
111 | 110 | export type HostComponent<T> = AbstractComponent<T, $ReadOnly<NativeMethods>>; |
112 | 111 |
|
|