Skip to content

Commit b724611

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Remove NativeMethods exports (Strict API) (#57032)
Summary: Pull Request resolved: #57032 Actions the existing/pending deprecations in the preceding diff. **Other changes** - Deletes the intermediary `LegacyHostInstanceMethods` interface and migrates doc comments onto `ReactNativeElement`. - Add user facing doc comment to `HostInstance`. - For now, no other internal refactors to the `HostInstance` module. **Note**: In our Flow source / Strict TypeScript API, the `NativeMethods` type was already deprecated (differing from D107119545). Changelog: [General][Breaking] - **Strict TypeScript API**: Remove legacy `NativeMethods` and `NativeMethodsMixin` types Reviewed By: rubennorte Differential Revision: D107129357 fbshipit-source-id: 3e8b52db102fe18d528ac5a0d5d975dae06176df
1 parent 19f5691 commit b724611

6 files changed

Lines changed: 188 additions & 223 deletions

File tree

packages/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ import typeof deepFreezeAndThrowOnMutationInDev from '../Utilities/deepFreezeAnd
3737
import typeof deepDiffer from '../Utilities/differ/deepDiffer';
3838
import typeof Platform from '../Utilities/Platform';
3939

40-
// Expose these types to the React renderer
41-
export type {
42-
HostInstance as PublicInstance,
43-
// These types are only necessary for Paper
44-
NativeMethods as LegacyPublicInstance,
45-
MeasureOnSuccessCallback,
46-
MeasureInWindowOnSuccessCallback,
47-
MeasureLayoutOnSuccessCallback,
48-
} from '../../src/private/types/HostInstance';
49-
5040
export type {PublicRootInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
5141
export type PublicTextInstance = ReturnType<createPublicTextInstance>;
5242

packages/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@
1010

1111
import typeof {createPublicTextInstance as createPublicTextInstanceT} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
1212

13-
export type {
14-
HostInstance as PublicInstance,
15-
16-
// These types are only necessary for Paper
17-
NativeMethods as LegacyPublicInstance,
18-
MeasureOnSuccessCallback,
19-
MeasureInWindowOnSuccessCallback,
20-
MeasureLayoutOnSuccessCallback,
21-
} from '../../src/private/types/HostInstance';
22-
2313
export type {PublicRootInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
2414
export type PublicTextInstance = ReturnType<createPublicTextInstanceT>;
2515

0 commit comments

Comments
 (0)