mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> (#17265)
* Types: findHostInstance_DEPRECATED returns React.ElementRef<HostComponent<mixed>> * Prettier
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
|
||||
function findHostInstance_DEPRECATED(
|
||||
componentOrHandle: any,
|
||||
): ?HostComponent<mixed> {
|
||||
): ?React$ElementRef<HostComponent<mixed>> {
|
||||
if (__DEV__) {
|
||||
const owner = ReactCurrentOwner.current;
|
||||
if (owner !== null && owner.stateNode !== null) {
|
||||
|
||||
@@ -49,7 +49,7 @@ const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
|
||||
function findHostInstance_DEPRECATED(
|
||||
componentOrHandle: any,
|
||||
): ?HostComponent<mixed> {
|
||||
): ?React$ElementRef<HostComponent<mixed>> {
|
||||
if (__DEV__) {
|
||||
const owner = ReactCurrentOwner.current;
|
||||
if (owner !== null && owner.stateNode !== null) {
|
||||
|
||||
+3
-1
@@ -141,7 +141,9 @@ type SecretInternalsFabricType = {
|
||||
*/
|
||||
export type ReactNativeType = {
|
||||
NativeComponent: typeof ReactNativeComponent,
|
||||
findHostInstance_DEPRECATED(componentOrHandle: any): ?HostComponent<mixed>,
|
||||
findHostInstance_DEPRECATED(
|
||||
componentOrHandle: any,
|
||||
): ?ElementRef<HostComponent<mixed>>,
|
||||
findNodeHandle(componentOrHandle: any): ?number,
|
||||
dispatchCommand(handle: any, command: string, args: Array<any>): void,
|
||||
render(
|
||||
|
||||
Reference in New Issue
Block a user