Skip to content

Commit 363bb30

Browse files
Correctly extends the global Event interface
1 parent 251eaa1 commit 363bb30

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

base/base_header.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
// Definitions: https://github.com/electron/electron-typescript-definitions
55

66
/// <reference types="node" />
7+
8+
type GlobalEvent = Event;

base/base_inner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919
}
2020

21-
interface Event {
22-
preventDefault: Function;
21+
interface Event extends GlobalEvent {
22+
preventDefault: () => void;
2323
sender: WebContents;
24-
returnValue?: any;
24+
returnValue: any;
2525
ctrlkey?: boolean;
2626
metaKey?: boolean;
2727
shiftKey?: boolean;

0 commit comments

Comments
 (0)