Skip to content

Commit 91cedb8

Browse files
huntiefacebook-github-bot
authored andcommitted
Remove legacy NativeMethods types
Summary: Long deprecated, drop from our public API. Relates to react-native-community/discussions-and-proposals#1003. Changelog: [General][Breaking] - Remove `NativeMethods` and `NativeMethodsMixin` types. Use `ReactNativeElement` instead. Differential Revision: D107108484
1 parent a18f53d commit 91cedb8

6 files changed

Lines changed: 0 additions & 23 deletions

File tree

packages/eslint-plugin-react-native/utils.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,6 @@ const publicAPIMapping = {
505505
default: null,
506506
types: [
507507
'HostInstance',
508-
'NativeMethods',
509-
'NativeMethodsMixin',
510508
'MeasureInWindowOnSuccessCallback',
511509
'MeasureLayoutOnSuccessCallback',
512510
'MeasureOnSuccessCallback',

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import typeof Platform from '../Utilities/Platform';
4141
export type {
4242
HostInstance as PublicInstance,
4343
// These types are only necessary for Paper
44-
NativeMethods as LegacyPublicInstance,
4544
MeasureOnSuccessCallback,
4645
MeasureInWindowOnSuccessCallback,
4746
MeasureLayoutOnSuccessCallback,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export type {
1414
HostInstance as PublicInstance,
1515

1616
// These types are only necessary for Paper
17-
NativeMethods as LegacyPublicInstance,
1817
MeasureOnSuccessCallback,
1918
MeasureInWindowOnSuccessCallback,
2019
MeasureLayoutOnSuccessCallback,

packages/react-native/index.js.flow

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,6 @@ export type * from './Libraries/Types/CodegenTypesNamespace';
455455

456456
export type {
457457
HostInstance,
458-
NativeMethods,
459-
NativeMethodsMixin,
460458
MeasureInWindowOnSuccessCallback,
461459
MeasureLayoutOnSuccessCallback,
462460
MeasureOnSuccessCallback,

packages/react-native/src/private/types/HostInstance.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,3 @@ export interface LegacyHostInstanceMethods {
109109
}
110110

111111
export type HostInstance = ReactNativeElement;
112-
113-
/** @deprecated Use HostInstance instead */
114-
export type NativeMethods = LegacyHostInstanceMethods;
115-
116-
/**
117-
* @deprecated Use HostInstance instead.
118-
*/
119-
export type NativeMethodsMixin = LegacyHostInstanceMethods;

packages/react-native/types/public/ReactNativeTypes.d.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,6 @@ export interface NativeMethods {
111111
blur(): void;
112112
}
113113

114-
/**
115-
* @deprecated Use NativeMethods instead.
116-
*/
117-
export type NativeMethodsMixin = NativeMethods;
118-
/**
119-
* @deprecated Use NativeMethods instead.
120-
*/
121-
export type NativeMethodsMixinType = NativeMethods;
122-
123114
/**
124115
* Represents a native component, such as those returned from `requireNativeComponent`.
125116
*

0 commit comments

Comments
 (0)