Skip to content

Commit 4130ddd

Browse files
committed
Return PreviousRunInfo
1 parent f4aed5a commit 4130ddd

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

packages/react-native/src/NativeBdReactNative.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export type InitOptions = {
2828
crashReporting?: CrashReportingOptions;
2929
};
3030

31+
export type PreviousRunInfo = {
32+
hasFatallyTerminated: boolean;
33+
terminationReason?: string;
34+
} | null;
35+
3136
export interface Spec extends TurboModule {
3237
init(
3338
key: string,
@@ -47,10 +52,7 @@ export interface Spec extends TurboModule {
4752

4853
getSessionURL(): Promise<string>;
4954

50-
getPreviousRunInfo(): {
51-
hasFatallyTerminated: boolean;
52-
terminationReason?: string;
53-
} | null;
55+
getPreviousRunInfo(): PreviousRunInfo;
5456

5557
logScreenView(screenName: string): void;
5658

packages/react-native/src/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,7 @@ export async function getSessionURL(): Promise<string> {
227227
return NativeBdReactNative.getSessionURL();
228228
}
229229

230-
export type PreviousRunInfo = {
231-
hasFatallyTerminated: boolean;
232-
terminationReason?: string;
233-
};
230+
export type { PreviousRunInfo } from './NativeBdReactNative';
234231

235232
/**
236233
* Returns information about the previous app run, or `null` when not available.

0 commit comments

Comments
 (0)