-
-
Notifications
You must be signed in to change notification settings - Fork 359
Expand file tree
/
Copy pathrnlibrariesinterface.ts
More file actions
32 lines (29 loc) · 1.2 KB
/
rnlibrariesinterface.ts
File metadata and controls
32 lines (29 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// This interface contains all of react-native internals Libraries used in Sentry RN SDK.
//
// Containing the internals in one place enables us to handle platforms
// that don't have all the internals available. For example react-native-web.
//
import type * as ReactNative from '../vendor/react-native';
export type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
export type { EmitterSubscription } from 'react-native/Libraries/vendor/emitter/EventEmitter';
export interface ReactNativeLibrariesInterface {
Devtools?: {
parseErrorStack?: (errorStack: string) => Array<ReactNative.StackFrame>;
symbolicateStackTrace: (
stack: Array<ReactNative.StackFrame>,
extraData?: Record<string, unknown>,
) => Promise<ReactNative.SymbolicatedStackTrace>;
getDevServer: () => ReactNative.DevServerInfo;
};
Utilities?: {
polyfillGlobal: <T>(name: string, getValue: () => T) => void;
};
Promise?: typeof Promise;
ReactNativeVersion?: ReactNative.ReactNativeVersion;
TurboModuleRegistry?: ReactNative.TurboModuleRegistry;
AppRegistry?: ReactNative.AppRegistry;
ReactNative?: {
requireNativeComponent?: <T>(viewName: string) => ReactNative.HostComponent<T>;
};
}