diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index b32de6865..568938d40 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -527,6 +527,9 @@ crashReporter.start({ } }); +console.log(crashReporter.getLastCrashReport()); +console.log(crashReporter.getUploadedReports()); + // nativeImage // https://github.com/atom/electron/blob/master/docs/api/native-image.md diff --git a/github-electron/github-electron.crash-reporter.d.ts b/github-electron/github-electron.crash-reporter.d.ts index 075f17efd..e26643938 100644 --- a/github-electron/github-electron.crash-reporter.d.ts +++ b/github-electron/github-electron.crash-reporter.d.ts @@ -4,15 +4,23 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Electron { - + /** + * The crash-reporter module enables sending your app's crash reports. + */ interface CrashReporter { + /** + * You are required to call this method before using other crashReporter APIs. + */ start(options: CrashReporterStartOptions): void; - /** * @returns The date and ID of the last crash report. When there was no crash report * sent or the crash reporter is not started, null will be returned. */ getLastCrashReport(): CrashReporterPayload; + /** + * @returns All uploaded crash reports. Each report contains the date and uploaded ID. + */ + getUploadedReports(): CrashReporterPayload[]; } interface CrashReporterStartOptions {