Skip to content

Commit 2ba9783

Browse files
committed
Update crash-reporter module
1 parent c43bf44 commit 2ba9783

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

github-electron/github-electron-main-tests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,9 @@ crashReporter.start({
527527
}
528528
});
529529

530+
console.log(crashReporter.getLastCrashReport());
531+
console.log(crashReporter.getUploadedReports());
532+
530533
// nativeImage
531534
// https://github.com/atom/electron/blob/master/docs/api/native-image.md
532535

github-electron/github-electron.crash-reporter.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55

66
declare namespace Electron {
7-
7+
/**
8+
* The crash-reporter module enables sending your app's crash reports.
9+
*/
810
interface CrashReporter {
11+
/**
12+
* You are required to call this method before using other crashReporter APIs.
13+
*/
914
start(options: CrashReporterStartOptions): void;
10-
1115
/**
1216
* @returns The date and ID of the last crash report. When there was no crash report
1317
* sent or the crash reporter is not started, null will be returned.
1418
*/
1519
getLastCrashReport(): CrashReporterPayload;
20+
/**
21+
* @returns All uploaded crash reports. Each report contains the date and uploaded ID.
22+
*/
23+
getUploadedReports(): CrashReporterPayload[];
1624
}
1725

1826
interface CrashReporterStartOptions {

0 commit comments

Comments
 (0)