Skip to content

Commit 041c9bc

Browse files
committed
chore: remove new NativeDeviceInfo API
1 parent d751f4c commit 041c9bc

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

packages/react-native/ReactNativeApi.d.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<ef05fc886f8d100f6804885e645236f0>>
7+
* @generated SignedSource<<bffba0612c645ddb6166e1f5bb1187f2>>
88
*
99
* This file was generated by scripts/js-api/build-types/index.js.
1010
*/
@@ -316,7 +316,6 @@ declare const multiplyImpl: (
316316
declare const NativeAppEventEmitter: typeof RCTNativeAppEventEmitter_default
317317
declare const NativeDeviceInfo_default: {
318318
getConstants(): DeviceInfoConstants
319-
getInfo(): DeviceInfoConstants
320319
}
321320
declare const NativeDialogManagerAndroid: typeof $$NativeDialogManagerAndroid
322321
declare const NativeModules: typeof NativeModules_default
@@ -5994,7 +5993,7 @@ export {
59945993
DevMenu, // 21b8b7a9
59955994
DevSettings, // e55b91dc
59965995
DeviceEventEmitter, // 650e6394
5997-
DeviceInfo, // db02c838
5996+
DeviceInfo, // 521bfb71
59985997
DeviceInfoConstants, // 279e7858
59995998
DimensionValue, // b163a381
60005999
Dimensions, // 980ef68c

packages/react-native/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,9 @@ export interface Spec extends TurboModule {
4747
const NativeModule: Spec = TurboModuleRegistry.getEnforcing<Spec>('DeviceInfo');
4848

4949
const NativeDeviceInfo = {
50-
/**
51-
* Please note that on iOS, if the application is using SceneDelegate, the dimensions
52-
* may not be constant, in which case calling this method returns the dimensions valid
53-
* at the time of invocation.
54-
* @deprecated Use `NativeDeviceInfo.getInfo()` instead; this method will be removed in a future version of React Native.
55-
* @returns {DeviceInfoConstants} the dimensions at the moment of invocation
56-
*/
5750
getConstants(): DeviceInfoConstants {
5851
return NativeModule.getConstants();
5952
},
60-
getInfo(): DeviceInfoConstants {
61-
return NativeModule.getConstants();
62-
},
6353
};
6454

6555
export default NativeDeviceInfo;

0 commit comments

Comments
 (0)