diff --git a/packages/react-native/Libraries/Components/TextInput/__tests__/TextInput-itest.js b/packages/react-native/Libraries/Components/TextInput/__tests__/TextInput-itest.js index fc3984b6281c..7a9e2a47bc3c 100644 --- a/packages/react-native/Libraries/Components/TextInput/__tests__/TextInput-itest.js +++ b/packages/react-native/Libraries/Components/TextInput/__tests__/TextInput-itest.js @@ -10,8 +10,6 @@ import '@react-native/fantom/src/setUpDefaultReactNativeEnvironment'; -import type {TextInputInstance} from '../TextInput.flow'; - import * as Fantom from '@react-native/fantom'; import nullthrows from 'nullthrows'; import * as React from 'react'; @@ -45,7 +43,7 @@ describe('', () => { describe('onChange', () => { it('is called when the change native event is dispatched', () => { const root = Fantom.createRoot(); - const nodeRef = createRef(); + const nodeRef = createRef>(); const onChange = jest.fn(); Fantom.runTask(() => { @@ -76,7 +74,7 @@ describe('', () => { describe('onChangeText', () => { it('is called when the change native event is dispatched', () => { const root = Fantom.createRoot(); - const nodeRef = createRef(); + const nodeRef = createRef>(); const onChangeText = jest.fn(); Fantom.runTask(() => { @@ -100,7 +98,7 @@ describe('', () => { describe('onFocus', () => { it('is called when the focus native event is dispatched', () => { const root = Fantom.createRoot(); - const nodeRef = createRef(); + const nodeRef = createRef>(); let focusEvent = jest.fn(); @@ -126,7 +124,7 @@ describe('', () => { describe('onBlur', () => { it('is called when the blur native event is dispatched', () => { const root = Fantom.createRoot(); - const nodeRef = createRef(); + const nodeRef = createRef>(); let blurEvent = jest.fn(); @@ -284,7 +282,7 @@ describe('', () => { describe('ref', () => { it('is an element node', () => { - const ref = createRef(); + const ref = createRef>(); const root = Fantom.createRoot(); @@ -296,7 +294,7 @@ describe('', () => { }); it('provides additional methods: clear, isFocused, getNativeRef, setSelection', () => { - const ref = createRef(); + const ref = createRef>(); const root = Fantom.createRoot(); @@ -313,7 +311,7 @@ describe('', () => { describe('focus()', () => { it('dispatches the focus command', () => { const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render(); @@ -411,8 +409,8 @@ describe('', () => { it('unfocuses any previously focused TextInput when a new one is focused', () => { const root = Fantom.createRoot(); - const ref1 = createRef(); - const ref2 = createRef(); + const ref1 = createRef>(); + const ref2 = createRef>(); Fantom.runTask(() => { root.render( @@ -450,7 +448,7 @@ describe('', () => { describe('blur()', () => { it('does NOT dispatch any commands if the input is NOT focused', () => { const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render(); @@ -469,7 +467,7 @@ describe('', () => { it('does dispatches the blur command if the input is focused', () => { const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render(); @@ -496,7 +494,7 @@ describe('', () => { describe('clear()', () => { it('dispatches the clear command', () => { const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render( @@ -521,7 +519,7 @@ describe('', () => { describe('isFocused()', () => { it('returns true if the input is focused', () => { const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render(); @@ -546,7 +544,7 @@ describe('', () => { it('returns false if the input is unmounted', () => { const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render(); @@ -582,7 +580,7 @@ describe('', () => { expect(TextInput.State.currentlyFocusedInput()).toBe(null); const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render(); @@ -606,7 +604,7 @@ describe('', () => { describe('setSelection', () => { it('dispatches the setTextAndSelection command', () => { const root = Fantom.createRoot(); - const ref = createRef(); + const ref = createRef>(); Fantom.runTask(() => { root.render( diff --git a/packages/react-native/Libraries/Components/View/ViewNativeComponent.js b/packages/react-native/Libraries/Components/View/ViewNativeComponent.js index 600eee6fedb7..2a28cd4bd992 100644 --- a/packages/react-native/Libraries/Components/View/ViewNativeComponent.js +++ b/packages/react-native/Libraries/Components/View/ViewNativeComponent.js @@ -42,5 +42,3 @@ export const Commands: NativeCommands = codegenNativeCommands({ // Additional note: Our long term plan is to reduce the overhead of the // and wrappers so that we no longer have any reason to export these APIs. export default ViewNativeComponent; - -export type ViewNativeComponentType = HostComponent;