electron 31.6.0 → 31.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/electron.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for Electron 31.6.0
1
+ // Type definitions for Electron 31.7.0
2
2
  // Project: http://electronjs.org/
3
3
  // Definitions by: The Electron Team <https://github.com/electron/electron>
4
4
  // Definitions: https://github.com/electron/typescript-definitions
@@ -474,11 +474,11 @@ declare namespace Electron {
474
474
  /**
475
475
  * Emitted whenever there is a GPU info update.
476
476
  */
477
- on(event: 'gpu-info-update', listener: Function): this;
478
- off(event: 'gpu-info-update', listener: Function): this;
479
- once(event: 'gpu-info-update', listener: Function): this;
480
- addListener(event: 'gpu-info-update', listener: Function): this;
481
- removeListener(event: 'gpu-info-update', listener: Function): this;
477
+ on(event: 'gpu-info-update', listener: () => void): this;
478
+ off(event: 'gpu-info-update', listener: () => void): this;
479
+ once(event: 'gpu-info-update', listener: () => void): this;
480
+ addListener(event: 'gpu-info-update', listener: () => void): this;
481
+ removeListener(event: 'gpu-info-update', listener: () => void): this;
482
482
  /**
483
483
  * Emitted when `webContents` wants to do basic auth.
484
484
  *
@@ -941,11 +941,11 @@ declare namespace Electron {
941
941
  *
942
942
  * In most cases, you should do everything in the `ready` event handler.
943
943
  */
944
- on(event: 'will-finish-launching', listener: Function): this;
945
- off(event: 'will-finish-launching', listener: Function): this;
946
- once(event: 'will-finish-launching', listener: Function): this;
947
- addListener(event: 'will-finish-launching', listener: Function): this;
948
- removeListener(event: 'will-finish-launching', listener: Function): this;
944
+ on(event: 'will-finish-launching', listener: () => void): this;
945
+ off(event: 'will-finish-launching', listener: () => void): this;
946
+ once(event: 'will-finish-launching', listener: () => void): this;
947
+ addListener(event: 'will-finish-launching', listener: () => void): this;
948
+ removeListener(event: 'will-finish-launching', listener: () => void): this;
949
949
  /**
950
950
  * Emitted when all windows have been closed and the application will quit. Calling
951
951
  * `event.preventDefault()` will prevent the default behavior, which is terminating
@@ -972,11 +972,11 @@ declare namespace Electron {
972
972
  * `will-quit` event, and in this case the `window-all-closed` event would not be
973
973
  * emitted.
974
974
  */
975
- on(event: 'window-all-closed', listener: Function): this;
976
- off(event: 'window-all-closed', listener: Function): this;
977
- once(event: 'window-all-closed', listener: Function): this;
978
- addListener(event: 'window-all-closed', listener: Function): this;
979
- removeListener(event: 'window-all-closed', listener: Function): this;
975
+ on(event: 'window-all-closed', listener: () => void): this;
976
+ off(event: 'window-all-closed', listener: () => void): this;
977
+ once(event: 'window-all-closed', listener: () => void): this;
978
+ addListener(event: 'window-all-closed', listener: () => void): this;
979
+ removeListener(event: 'window-all-closed', listener: () => void): this;
980
980
  /**
981
981
  * Adds `path` to the recent documents list.
982
982
  *
@@ -1832,19 +1832,19 @@ declare namespace Electron {
1832
1832
  * perform actions before the windows are closed while a process is quitting, as
1833
1833
  * well as listening to `before-quit`.
1834
1834
  */
1835
- on(event: 'before-quit-for-update', listener: Function): this;
1836
- off(event: 'before-quit-for-update', listener: Function): this;
1837
- once(event: 'before-quit-for-update', listener: Function): this;
1838
- addListener(event: 'before-quit-for-update', listener: Function): this;
1839
- removeListener(event: 'before-quit-for-update', listener: Function): this;
1835
+ on(event: 'before-quit-for-update', listener: () => void): this;
1836
+ off(event: 'before-quit-for-update', listener: () => void): this;
1837
+ once(event: 'before-quit-for-update', listener: () => void): this;
1838
+ addListener(event: 'before-quit-for-update', listener: () => void): this;
1839
+ removeListener(event: 'before-quit-for-update', listener: () => void): this;
1840
1840
  /**
1841
1841
  * Emitted when checking if an update has started.
1842
1842
  */
1843
- on(event: 'checking-for-update', listener: Function): this;
1844
- off(event: 'checking-for-update', listener: Function): this;
1845
- once(event: 'checking-for-update', listener: Function): this;
1846
- addListener(event: 'checking-for-update', listener: Function): this;
1847
- removeListener(event: 'checking-for-update', listener: Function): this;
1843
+ on(event: 'checking-for-update', listener: () => void): this;
1844
+ off(event: 'checking-for-update', listener: () => void): this;
1845
+ once(event: 'checking-for-update', listener: () => void): this;
1846
+ addListener(event: 'checking-for-update', listener: () => void): this;
1847
+ removeListener(event: 'checking-for-update', listener: () => void): this;
1848
1848
  /**
1849
1849
  * Emitted when there is an error while updating.
1850
1850
  */
@@ -1857,11 +1857,11 @@ declare namespace Electron {
1857
1857
  * Emitted when there is an available update. The update is downloaded
1858
1858
  * automatically.
1859
1859
  */
1860
- on(event: 'update-available', listener: Function): this;
1861
- off(event: 'update-available', listener: Function): this;
1862
- once(event: 'update-available', listener: Function): this;
1863
- addListener(event: 'update-available', listener: Function): this;
1864
- removeListener(event: 'update-available', listener: Function): this;
1860
+ on(event: 'update-available', listener: () => void): this;
1861
+ off(event: 'update-available', listener: () => void): this;
1862
+ once(event: 'update-available', listener: () => void): this;
1863
+ addListener(event: 'update-available', listener: () => void): this;
1864
+ removeListener(event: 'update-available', listener: () => void): this;
1865
1865
  /**
1866
1866
  * Emitted when an update has been downloaded.
1867
1867
  *
@@ -1898,11 +1898,11 @@ declare namespace Electron {
1898
1898
  /**
1899
1899
  * Emitted when there is no available update.
1900
1900
  */
1901
- on(event: 'update-not-available', listener: Function): this;
1902
- off(event: 'update-not-available', listener: Function): this;
1903
- once(event: 'update-not-available', listener: Function): this;
1904
- addListener(event: 'update-not-available', listener: Function): this;
1905
- removeListener(event: 'update-not-available', listener: Function): this;
1901
+ on(event: 'update-not-available', listener: () => void): this;
1902
+ off(event: 'update-not-available', listener: () => void): this;
1903
+ once(event: 'update-not-available', listener: () => void): this;
1904
+ addListener(event: 'update-not-available', listener: () => void): this;
1905
+ removeListener(event: 'update-not-available', listener: () => void): this;
1906
1906
  /**
1907
1907
  * Asks the server whether there is an update. You must call `setFeedURL` before
1908
1908
  * using this API.
@@ -1992,11 +1992,11 @@ declare namespace Electron {
1992
1992
  /**
1993
1993
  * Emitted when the window loses focus.
1994
1994
  */
1995
- on(event: 'blur', listener: Function): this;
1996
- off(event: 'blur', listener: Function): this;
1997
- once(event: 'blur', listener: Function): this;
1998
- addListener(event: 'blur', listener: Function): this;
1999
- removeListener(event: 'blur', listener: Function): this;
1995
+ on(event: 'blur', listener: (event: Event) => void): this;
1996
+ off(event: 'blur', listener: (event: Event) => void): this;
1997
+ once(event: 'blur', listener: (event: Event) => void): this;
1998
+ addListener(event: 'blur', listener: (event: Event) => void): this;
1999
+ removeListener(event: 'blur', listener: (event: Event) => void): this;
2000
2000
  /**
2001
2001
  * Emitted when the window is going to be closed. It's emitted before the
2002
2002
  * `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()`
@@ -2022,67 +2022,67 @@ declare namespace Electron {
2022
2022
  * Emitted when the window is closed. After you have received this event you should
2023
2023
  * remove the reference to the window and avoid using it any more.
2024
2024
  */
2025
- on(event: 'closed', listener: Function): this;
2026
- off(event: 'closed', listener: Function): this;
2027
- once(event: 'closed', listener: Function): this;
2028
- addListener(event: 'closed', listener: Function): this;
2029
- removeListener(event: 'closed', listener: Function): this;
2025
+ on(event: 'closed', listener: () => void): this;
2026
+ off(event: 'closed', listener: () => void): this;
2027
+ once(event: 'closed', listener: () => void): this;
2028
+ addListener(event: 'closed', listener: () => void): this;
2029
+ removeListener(event: 'closed', listener: () => void): this;
2030
2030
  /**
2031
2031
  * Emitted when the window enters a full-screen state.
2032
2032
  */
2033
- on(event: 'enter-full-screen', listener: Function): this;
2034
- off(event: 'enter-full-screen', listener: Function): this;
2035
- once(event: 'enter-full-screen', listener: Function): this;
2036
- addListener(event: 'enter-full-screen', listener: Function): this;
2037
- removeListener(event: 'enter-full-screen', listener: Function): this;
2033
+ on(event: 'enter-full-screen', listener: () => void): this;
2034
+ off(event: 'enter-full-screen', listener: () => void): this;
2035
+ once(event: 'enter-full-screen', listener: () => void): this;
2036
+ addListener(event: 'enter-full-screen', listener: () => void): this;
2037
+ removeListener(event: 'enter-full-screen', listener: () => void): this;
2038
2038
  /**
2039
2039
  * Emitted when the window gains focus.
2040
2040
  */
2041
- on(event: 'focus', listener: Function): this;
2042
- off(event: 'focus', listener: Function): this;
2043
- once(event: 'focus', listener: Function): this;
2044
- addListener(event: 'focus', listener: Function): this;
2045
- removeListener(event: 'focus', listener: Function): this;
2041
+ on(event: 'focus', listener: (event: Event) => void): this;
2042
+ off(event: 'focus', listener: (event: Event) => void): this;
2043
+ once(event: 'focus', listener: (event: Event) => void): this;
2044
+ addListener(event: 'focus', listener: (event: Event) => void): this;
2045
+ removeListener(event: 'focus', listener: (event: Event) => void): this;
2046
2046
  /**
2047
2047
  * Emitted when the window is hidden.
2048
2048
  */
2049
- on(event: 'hide', listener: Function): this;
2050
- off(event: 'hide', listener: Function): this;
2051
- once(event: 'hide', listener: Function): this;
2052
- addListener(event: 'hide', listener: Function): this;
2053
- removeListener(event: 'hide', listener: Function): this;
2049
+ on(event: 'hide', listener: () => void): this;
2050
+ off(event: 'hide', listener: () => void): this;
2051
+ once(event: 'hide', listener: () => void): this;
2052
+ addListener(event: 'hide', listener: () => void): this;
2053
+ removeListener(event: 'hide', listener: () => void): this;
2054
2054
  /**
2055
2055
  * Emitted when the window leaves a full-screen state.
2056
2056
  */
2057
- on(event: 'leave-full-screen', listener: Function): this;
2058
- off(event: 'leave-full-screen', listener: Function): this;
2059
- once(event: 'leave-full-screen', listener: Function): this;
2060
- addListener(event: 'leave-full-screen', listener: Function): this;
2061
- removeListener(event: 'leave-full-screen', listener: Function): this;
2057
+ on(event: 'leave-full-screen', listener: () => void): this;
2058
+ off(event: 'leave-full-screen', listener: () => void): this;
2059
+ once(event: 'leave-full-screen', listener: () => void): this;
2060
+ addListener(event: 'leave-full-screen', listener: () => void): this;
2061
+ removeListener(event: 'leave-full-screen', listener: () => void): this;
2062
2062
  /**
2063
2063
  * Emitted when window is maximized.
2064
2064
  */
2065
- on(event: 'maximize', listener: Function): this;
2066
- off(event: 'maximize', listener: Function): this;
2067
- once(event: 'maximize', listener: Function): this;
2068
- addListener(event: 'maximize', listener: Function): this;
2069
- removeListener(event: 'maximize', listener: Function): this;
2065
+ on(event: 'maximize', listener: () => void): this;
2066
+ off(event: 'maximize', listener: () => void): this;
2067
+ once(event: 'maximize', listener: () => void): this;
2068
+ addListener(event: 'maximize', listener: () => void): this;
2069
+ removeListener(event: 'maximize', listener: () => void): this;
2070
2070
  /**
2071
2071
  * Emitted when the window is minimized.
2072
2072
  */
2073
- on(event: 'minimize', listener: Function): this;
2074
- off(event: 'minimize', listener: Function): this;
2075
- once(event: 'minimize', listener: Function): this;
2076
- addListener(event: 'minimize', listener: Function): this;
2077
- removeListener(event: 'minimize', listener: Function): this;
2073
+ on(event: 'minimize', listener: () => void): this;
2074
+ off(event: 'minimize', listener: () => void): this;
2075
+ once(event: 'minimize', listener: () => void): this;
2076
+ addListener(event: 'minimize', listener: () => void): this;
2077
+ removeListener(event: 'minimize', listener: () => void): this;
2078
2078
  /**
2079
2079
  * Emitted when the window is being moved to a new position.
2080
2080
  */
2081
- on(event: 'move', listener: Function): this;
2082
- off(event: 'move', listener: Function): this;
2083
- once(event: 'move', listener: Function): this;
2084
- addListener(event: 'move', listener: Function): this;
2085
- removeListener(event: 'move', listener: Function): this;
2081
+ on(event: 'move', listener: () => void): this;
2082
+ off(event: 'move', listener: () => void): this;
2083
+ once(event: 'move', listener: () => void): this;
2084
+ addListener(event: 'move', listener: () => void): this;
2085
+ removeListener(event: 'move', listener: () => void): this;
2086
2086
  /**
2087
2087
  * Emitted once when the window is moved to a new position.
2088
2088
  *
@@ -2090,53 +2090,53 @@ declare namespace Electron {
2090
2090
  *
2091
2091
  * @platform darwin,win32
2092
2092
  */
2093
- on(event: 'moved', listener: Function): this;
2093
+ on(event: 'moved', listener: () => void): this;
2094
2094
  /**
2095
2095
  * @platform darwin,win32
2096
2096
  */
2097
- off(event: 'moved', listener: Function): this;
2097
+ off(event: 'moved', listener: () => void): this;
2098
2098
  /**
2099
2099
  * @platform darwin,win32
2100
2100
  */
2101
- once(event: 'moved', listener: Function): this;
2101
+ once(event: 'moved', listener: () => void): this;
2102
2102
  /**
2103
2103
  * @platform darwin,win32
2104
2104
  */
2105
- addListener(event: 'moved', listener: Function): this;
2105
+ addListener(event: 'moved', listener: () => void): this;
2106
2106
  /**
2107
2107
  * @platform darwin,win32
2108
2108
  */
2109
- removeListener(event: 'moved', listener: Function): this;
2109
+ removeListener(event: 'moved', listener: () => void): this;
2110
2110
  /**
2111
2111
  * Emitted when the native new tab button is clicked.
2112
2112
  *
2113
2113
  * @platform darwin
2114
2114
  */
2115
- on(event: 'new-window-for-tab', listener: Function): this;
2115
+ on(event: 'new-window-for-tab', listener: () => void): this;
2116
2116
  /**
2117
2117
  * @platform darwin
2118
2118
  */
2119
- off(event: 'new-window-for-tab', listener: Function): this;
2119
+ off(event: 'new-window-for-tab', listener: () => void): this;
2120
2120
  /**
2121
2121
  * @platform darwin
2122
2122
  */
2123
- once(event: 'new-window-for-tab', listener: Function): this;
2123
+ once(event: 'new-window-for-tab', listener: () => void): this;
2124
2124
  /**
2125
2125
  * @platform darwin
2126
2126
  */
2127
- addListener(event: 'new-window-for-tab', listener: Function): this;
2127
+ addListener(event: 'new-window-for-tab', listener: () => void): this;
2128
2128
  /**
2129
2129
  * @platform darwin
2130
2130
  */
2131
- removeListener(event: 'new-window-for-tab', listener: Function): this;
2131
+ removeListener(event: 'new-window-for-tab', listener: () => void): this;
2132
2132
  /**
2133
2133
  * Emitted after the window has been resized.
2134
2134
  */
2135
- on(event: 'resize', listener: Function): this;
2136
- off(event: 'resize', listener: Function): this;
2137
- once(event: 'resize', listener: Function): this;
2138
- addListener(event: 'resize', listener: Function): this;
2139
- removeListener(event: 'resize', listener: Function): this;
2135
+ on(event: 'resize', listener: () => void): this;
2136
+ off(event: 'resize', listener: () => void): this;
2137
+ once(event: 'resize', listener: () => void): this;
2138
+ addListener(event: 'resize', listener: () => void): this;
2139
+ removeListener(event: 'resize', listener: () => void): this;
2140
2140
  /**
2141
2141
  * Emitted once when the window has finished being resized.
2142
2142
  *
@@ -2146,31 +2146,31 @@ declare namespace Electron {
2146
2146
  *
2147
2147
  * @platform darwin,win32
2148
2148
  */
2149
- on(event: 'resized', listener: Function): this;
2149
+ on(event: 'resized', listener: () => void): this;
2150
2150
  /**
2151
2151
  * @platform darwin,win32
2152
2152
  */
2153
- off(event: 'resized', listener: Function): this;
2153
+ off(event: 'resized', listener: () => void): this;
2154
2154
  /**
2155
2155
  * @platform darwin,win32
2156
2156
  */
2157
- once(event: 'resized', listener: Function): this;
2157
+ once(event: 'resized', listener: () => void): this;
2158
2158
  /**
2159
2159
  * @platform darwin,win32
2160
2160
  */
2161
- addListener(event: 'resized', listener: Function): this;
2161
+ addListener(event: 'resized', listener: () => void): this;
2162
2162
  /**
2163
2163
  * @platform darwin,win32
2164
2164
  */
2165
- removeListener(event: 'resized', listener: Function): this;
2165
+ removeListener(event: 'resized', listener: () => void): this;
2166
2166
  /**
2167
2167
  * Emitted when the window is restored from a minimized state.
2168
2168
  */
2169
- on(event: 'restore', listener: Function): this;
2170
- off(event: 'restore', listener: Function): this;
2171
- once(event: 'restore', listener: Function): this;
2172
- addListener(event: 'restore', listener: Function): this;
2173
- removeListener(event: 'restore', listener: Function): this;
2169
+ on(event: 'restore', listener: () => void): this;
2170
+ off(event: 'restore', listener: () => void): this;
2171
+ once(event: 'restore', listener: () => void): this;
2172
+ addListener(event: 'restore', listener: () => void): this;
2173
+ removeListener(event: 'restore', listener: () => void): this;
2174
2174
  /**
2175
2175
  * Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
2176
2176
  * is ended. The `rotation` value on each emission is the angle in degrees rotated
@@ -2208,75 +2208,75 @@ declare namespace Electron {
2208
2208
  *
2209
2209
  * @platform win32
2210
2210
  */
2211
- on(event: 'session-end', listener: Function): this;
2211
+ on(event: 'session-end', listener: () => void): this;
2212
2212
  /**
2213
2213
  * @platform win32
2214
2214
  */
2215
- off(event: 'session-end', listener: Function): this;
2215
+ off(event: 'session-end', listener: () => void): this;
2216
2216
  /**
2217
2217
  * @platform win32
2218
2218
  */
2219
- once(event: 'session-end', listener: Function): this;
2219
+ once(event: 'session-end', listener: () => void): this;
2220
2220
  /**
2221
2221
  * @platform win32
2222
2222
  */
2223
- addListener(event: 'session-end', listener: Function): this;
2223
+ addListener(event: 'session-end', listener: () => void): this;
2224
2224
  /**
2225
2225
  * @platform win32
2226
2226
  */
2227
- removeListener(event: 'session-end', listener: Function): this;
2227
+ removeListener(event: 'session-end', listener: () => void): this;
2228
2228
  /**
2229
2229
  * Emitted when the window opens a sheet.
2230
2230
  *
2231
2231
  * @platform darwin
2232
2232
  */
2233
- on(event: 'sheet-begin', listener: Function): this;
2233
+ on(event: 'sheet-begin', listener: () => void): this;
2234
2234
  /**
2235
2235
  * @platform darwin
2236
2236
  */
2237
- off(event: 'sheet-begin', listener: Function): this;
2237
+ off(event: 'sheet-begin', listener: () => void): this;
2238
2238
  /**
2239
2239
  * @platform darwin
2240
2240
  */
2241
- once(event: 'sheet-begin', listener: Function): this;
2241
+ once(event: 'sheet-begin', listener: () => void): this;
2242
2242
  /**
2243
2243
  * @platform darwin
2244
2244
  */
2245
- addListener(event: 'sheet-begin', listener: Function): this;
2245
+ addListener(event: 'sheet-begin', listener: () => void): this;
2246
2246
  /**
2247
2247
  * @platform darwin
2248
2248
  */
2249
- removeListener(event: 'sheet-begin', listener: Function): this;
2249
+ removeListener(event: 'sheet-begin', listener: () => void): this;
2250
2250
  /**
2251
2251
  * Emitted when the window has closed a sheet.
2252
2252
  *
2253
2253
  * @platform darwin
2254
2254
  */
2255
- on(event: 'sheet-end', listener: Function): this;
2255
+ on(event: 'sheet-end', listener: () => void): this;
2256
2256
  /**
2257
2257
  * @platform darwin
2258
2258
  */
2259
- off(event: 'sheet-end', listener: Function): this;
2259
+ off(event: 'sheet-end', listener: () => void): this;
2260
2260
  /**
2261
2261
  * @platform darwin
2262
2262
  */
2263
- once(event: 'sheet-end', listener: Function): this;
2263
+ once(event: 'sheet-end', listener: () => void): this;
2264
2264
  /**
2265
2265
  * @platform darwin
2266
2266
  */
2267
- addListener(event: 'sheet-end', listener: Function): this;
2267
+ addListener(event: 'sheet-end', listener: () => void): this;
2268
2268
  /**
2269
2269
  * @platform darwin
2270
2270
  */
2271
- removeListener(event: 'sheet-end', listener: Function): this;
2271
+ removeListener(event: 'sheet-end', listener: () => void): this;
2272
2272
  /**
2273
2273
  * Emitted when the window is shown.
2274
2274
  */
2275
- on(event: 'show', listener: Function): this;
2276
- off(event: 'show', listener: Function): this;
2277
- once(event: 'show', listener: Function): this;
2278
- addListener(event: 'show', listener: Function): this;
2279
- removeListener(event: 'show', listener: Function): this;
2275
+ on(event: 'show', listener: () => void): this;
2276
+ off(event: 'show', listener: () => void): this;
2277
+ once(event: 'show', listener: () => void): this;
2278
+ addListener(event: 'show', listener: () => void): this;
2279
+ removeListener(event: 'show', listener: () => void): this;
2280
2280
  /**
2281
2281
  * Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
2282
2282
  * `left`.
@@ -2362,11 +2362,11 @@ declare namespace Electron {
2362
2362
  /**
2363
2363
  * Emitted when the window exits from a maximized state.
2364
2364
  */
2365
- on(event: 'unmaximize', listener: Function): this;
2366
- off(event: 'unmaximize', listener: Function): this;
2367
- once(event: 'unmaximize', listener: Function): this;
2368
- addListener(event: 'unmaximize', listener: Function): this;
2369
- removeListener(event: 'unmaximize', listener: Function): this;
2365
+ on(event: 'unmaximize', listener: () => void): this;
2366
+ off(event: 'unmaximize', listener: () => void): this;
2367
+ once(event: 'unmaximize', listener: () => void): this;
2368
+ addListener(event: 'unmaximize', listener: () => void): this;
2369
+ removeListener(event: 'unmaximize', listener: () => void): this;
2370
2370
  /**
2371
2371
  * Emitted before the window is moved. On Windows, calling `event.preventDefault()`
2372
2372
  * will prevent the window from being moved.
@@ -2878,7 +2878,7 @@ declare namespace Electron {
2878
2878
  * setting this, the window is still a normal window, not a toolbox window which
2879
2879
  * can not be focused on.
2880
2880
  */
2881
- setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
2881
+ setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | 'dock', relativeLevel?: number): void;
2882
2882
  /**
2883
2883
  * Sets the properties for the window's taskbar button.
2884
2884
  *
@@ -3955,19 +3955,19 @@ declare namespace Electron {
3955
3955
  /**
3956
3956
  * Emitted when the window loses focus.
3957
3957
  */
3958
- on(event: 'blur', listener: Function): this;
3959
- off(event: 'blur', listener: Function): this;
3960
- once(event: 'blur', listener: Function): this;
3961
- addListener(event: 'blur', listener: Function): this;
3962
- removeListener(event: 'blur', listener: Function): this;
3958
+ on(event: 'blur', listener: () => void): this;
3959
+ off(event: 'blur', listener: () => void): this;
3960
+ once(event: 'blur', listener: () => void): this;
3961
+ addListener(event: 'blur', listener: () => void): this;
3962
+ removeListener(event: 'blur', listener: () => void): this;
3963
3963
  /**
3964
3964
  * Emitted when the window loses focus.
3965
3965
  */
3966
- on(event: 'blur', listener: Function): this;
3967
- off(event: 'blur', listener: Function): this;
3968
- once(event: 'blur', listener: Function): this;
3969
- addListener(event: 'blur', listener: Function): this;
3970
- removeListener(event: 'blur', listener: Function): this;
3966
+ on(event: 'blur', listener: (event: Event) => void): this;
3967
+ off(event: 'blur', listener: (event: Event) => void): this;
3968
+ once(event: 'blur', listener: (event: Event) => void): this;
3969
+ addListener(event: 'blur', listener: (event: Event) => void): this;
3970
+ removeListener(event: 'blur', listener: (event: Event) => void): this;
3971
3971
  /**
3972
3972
  * Emitted when the window is going to be closed. It's emitted before the
3973
3973
  * `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()`
@@ -4014,148 +4014,148 @@ declare namespace Electron {
4014
4014
  * Emitted when the window is closed. After you have received this event you should
4015
4015
  * remove the reference to the window and avoid using it any more.
4016
4016
  */
4017
- on(event: 'closed', listener: Function): this;
4018
- off(event: 'closed', listener: Function): this;
4019
- once(event: 'closed', listener: Function): this;
4020
- addListener(event: 'closed', listener: Function): this;
4021
- removeListener(event: 'closed', listener: Function): this;
4017
+ on(event: 'closed', listener: () => void): this;
4018
+ off(event: 'closed', listener: () => void): this;
4019
+ once(event: 'closed', listener: () => void): this;
4020
+ addListener(event: 'closed', listener: () => void): this;
4021
+ removeListener(event: 'closed', listener: () => void): this;
4022
4022
  /**
4023
4023
  * Emitted when the window is closed. After you have received this event you should
4024
4024
  * remove the reference to the window and avoid using it any more.
4025
4025
  */
4026
- on(event: 'closed', listener: Function): this;
4027
- off(event: 'closed', listener: Function): this;
4028
- once(event: 'closed', listener: Function): this;
4029
- addListener(event: 'closed', listener: Function): this;
4030
- removeListener(event: 'closed', listener: Function): this;
4026
+ on(event: 'closed', listener: () => void): this;
4027
+ off(event: 'closed', listener: () => void): this;
4028
+ once(event: 'closed', listener: () => void): this;
4029
+ addListener(event: 'closed', listener: () => void): this;
4030
+ removeListener(event: 'closed', listener: () => void): this;
4031
4031
  /**
4032
4032
  * Emitted when the window enters a full-screen state.
4033
4033
  */
4034
- on(event: 'enter-full-screen', listener: Function): this;
4035
- off(event: 'enter-full-screen', listener: Function): this;
4036
- once(event: 'enter-full-screen', listener: Function): this;
4037
- addListener(event: 'enter-full-screen', listener: Function): this;
4038
- removeListener(event: 'enter-full-screen', listener: Function): this;
4034
+ on(event: 'enter-full-screen', listener: () => void): this;
4035
+ off(event: 'enter-full-screen', listener: () => void): this;
4036
+ once(event: 'enter-full-screen', listener: () => void): this;
4037
+ addListener(event: 'enter-full-screen', listener: () => void): this;
4038
+ removeListener(event: 'enter-full-screen', listener: () => void): this;
4039
4039
  /**
4040
4040
  * Emitted when the window enters a full-screen state.
4041
4041
  */
4042
- on(event: 'enter-full-screen', listener: Function): this;
4043
- off(event: 'enter-full-screen', listener: Function): this;
4044
- once(event: 'enter-full-screen', listener: Function): this;
4045
- addListener(event: 'enter-full-screen', listener: Function): this;
4046
- removeListener(event: 'enter-full-screen', listener: Function): this;
4042
+ on(event: 'enter-full-screen', listener: () => void): this;
4043
+ off(event: 'enter-full-screen', listener: () => void): this;
4044
+ once(event: 'enter-full-screen', listener: () => void): this;
4045
+ addListener(event: 'enter-full-screen', listener: () => void): this;
4046
+ removeListener(event: 'enter-full-screen', listener: () => void): this;
4047
4047
  /**
4048
4048
  * Emitted when the window enters a full-screen state triggered by HTML API.
4049
4049
  */
4050
- on(event: 'enter-html-full-screen', listener: Function): this;
4051
- off(event: 'enter-html-full-screen', listener: Function): this;
4052
- once(event: 'enter-html-full-screen', listener: Function): this;
4053
- addListener(event: 'enter-html-full-screen', listener: Function): this;
4054
- removeListener(event: 'enter-html-full-screen', listener: Function): this;
4050
+ on(event: 'enter-html-full-screen', listener: () => void): this;
4051
+ off(event: 'enter-html-full-screen', listener: () => void): this;
4052
+ once(event: 'enter-html-full-screen', listener: () => void): this;
4053
+ addListener(event: 'enter-html-full-screen', listener: () => void): this;
4054
+ removeListener(event: 'enter-html-full-screen', listener: () => void): this;
4055
4055
  /**
4056
4056
  * Emitted when the window gains focus.
4057
4057
  */
4058
- on(event: 'focus', listener: Function): this;
4059
- off(event: 'focus', listener: Function): this;
4060
- once(event: 'focus', listener: Function): this;
4061
- addListener(event: 'focus', listener: Function): this;
4062
- removeListener(event: 'focus', listener: Function): this;
4058
+ on(event: 'focus', listener: () => void): this;
4059
+ off(event: 'focus', listener: () => void): this;
4060
+ once(event: 'focus', listener: () => void): this;
4061
+ addListener(event: 'focus', listener: () => void): this;
4062
+ removeListener(event: 'focus', listener: () => void): this;
4063
4063
  /**
4064
4064
  * Emitted when the window gains focus.
4065
4065
  */
4066
- on(event: 'focus', listener: Function): this;
4067
- off(event: 'focus', listener: Function): this;
4068
- once(event: 'focus', listener: Function): this;
4069
- addListener(event: 'focus', listener: Function): this;
4070
- removeListener(event: 'focus', listener: Function): this;
4066
+ on(event: 'focus', listener: (event: Event) => void): this;
4067
+ off(event: 'focus', listener: (event: Event) => void): this;
4068
+ once(event: 'focus', listener: (event: Event) => void): this;
4069
+ addListener(event: 'focus', listener: (event: Event) => void): this;
4070
+ removeListener(event: 'focus', listener: (event: Event) => void): this;
4071
4071
  /**
4072
4072
  * Emitted when the window is hidden.
4073
4073
  */
4074
- on(event: 'hide', listener: Function): this;
4075
- off(event: 'hide', listener: Function): this;
4076
- once(event: 'hide', listener: Function): this;
4077
- addListener(event: 'hide', listener: Function): this;
4078
- removeListener(event: 'hide', listener: Function): this;
4074
+ on(event: 'hide', listener: () => void): this;
4075
+ off(event: 'hide', listener: () => void): this;
4076
+ once(event: 'hide', listener: () => void): this;
4077
+ addListener(event: 'hide', listener: () => void): this;
4078
+ removeListener(event: 'hide', listener: () => void): this;
4079
4079
  /**
4080
4080
  * Emitted when the window is hidden.
4081
4081
  */
4082
- on(event: 'hide', listener: Function): this;
4083
- off(event: 'hide', listener: Function): this;
4084
- once(event: 'hide', listener: Function): this;
4085
- addListener(event: 'hide', listener: Function): this;
4086
- removeListener(event: 'hide', listener: Function): this;
4082
+ on(event: 'hide', listener: () => void): this;
4083
+ off(event: 'hide', listener: () => void): this;
4084
+ once(event: 'hide', listener: () => void): this;
4085
+ addListener(event: 'hide', listener: () => void): this;
4086
+ removeListener(event: 'hide', listener: () => void): this;
4087
4087
  /**
4088
4088
  * Emitted when the window leaves a full-screen state.
4089
4089
  */
4090
- on(event: 'leave-full-screen', listener: Function): this;
4091
- off(event: 'leave-full-screen', listener: Function): this;
4092
- once(event: 'leave-full-screen', listener: Function): this;
4093
- addListener(event: 'leave-full-screen', listener: Function): this;
4094
- removeListener(event: 'leave-full-screen', listener: Function): this;
4090
+ on(event: 'leave-full-screen', listener: () => void): this;
4091
+ off(event: 'leave-full-screen', listener: () => void): this;
4092
+ once(event: 'leave-full-screen', listener: () => void): this;
4093
+ addListener(event: 'leave-full-screen', listener: () => void): this;
4094
+ removeListener(event: 'leave-full-screen', listener: () => void): this;
4095
4095
  /**
4096
4096
  * Emitted when the window leaves a full-screen state.
4097
4097
  */
4098
- on(event: 'leave-full-screen', listener: Function): this;
4099
- off(event: 'leave-full-screen', listener: Function): this;
4100
- once(event: 'leave-full-screen', listener: Function): this;
4101
- addListener(event: 'leave-full-screen', listener: Function): this;
4102
- removeListener(event: 'leave-full-screen', listener: Function): this;
4098
+ on(event: 'leave-full-screen', listener: () => void): this;
4099
+ off(event: 'leave-full-screen', listener: () => void): this;
4100
+ once(event: 'leave-full-screen', listener: () => void): this;
4101
+ addListener(event: 'leave-full-screen', listener: () => void): this;
4102
+ removeListener(event: 'leave-full-screen', listener: () => void): this;
4103
4103
  /**
4104
4104
  * Emitted when the window leaves a full-screen state triggered by HTML API.
4105
4105
  */
4106
- on(event: 'leave-html-full-screen', listener: Function): this;
4107
- off(event: 'leave-html-full-screen', listener: Function): this;
4108
- once(event: 'leave-html-full-screen', listener: Function): this;
4109
- addListener(event: 'leave-html-full-screen', listener: Function): this;
4110
- removeListener(event: 'leave-html-full-screen', listener: Function): this;
4106
+ on(event: 'leave-html-full-screen', listener: () => void): this;
4107
+ off(event: 'leave-html-full-screen', listener: () => void): this;
4108
+ once(event: 'leave-html-full-screen', listener: () => void): this;
4109
+ addListener(event: 'leave-html-full-screen', listener: () => void): this;
4110
+ removeListener(event: 'leave-html-full-screen', listener: () => void): this;
4111
4111
  /**
4112
4112
  * Emitted when window is maximized.
4113
4113
  */
4114
- on(event: 'maximize', listener: Function): this;
4115
- off(event: 'maximize', listener: Function): this;
4116
- once(event: 'maximize', listener: Function): this;
4117
- addListener(event: 'maximize', listener: Function): this;
4118
- removeListener(event: 'maximize', listener: Function): this;
4114
+ on(event: 'maximize', listener: () => void): this;
4115
+ off(event: 'maximize', listener: () => void): this;
4116
+ once(event: 'maximize', listener: () => void): this;
4117
+ addListener(event: 'maximize', listener: () => void): this;
4118
+ removeListener(event: 'maximize', listener: () => void): this;
4119
4119
  /**
4120
4120
  * Emitted when window is maximized.
4121
4121
  */
4122
- on(event: 'maximize', listener: Function): this;
4123
- off(event: 'maximize', listener: Function): this;
4124
- once(event: 'maximize', listener: Function): this;
4125
- addListener(event: 'maximize', listener: Function): this;
4126
- removeListener(event: 'maximize', listener: Function): this;
4122
+ on(event: 'maximize', listener: () => void): this;
4123
+ off(event: 'maximize', listener: () => void): this;
4124
+ once(event: 'maximize', listener: () => void): this;
4125
+ addListener(event: 'maximize', listener: () => void): this;
4126
+ removeListener(event: 'maximize', listener: () => void): this;
4127
4127
  /**
4128
4128
  * Emitted when the window is minimized.
4129
4129
  */
4130
- on(event: 'minimize', listener: Function): this;
4131
- off(event: 'minimize', listener: Function): this;
4132
- once(event: 'minimize', listener: Function): this;
4133
- addListener(event: 'minimize', listener: Function): this;
4134
- removeListener(event: 'minimize', listener: Function): this;
4130
+ on(event: 'minimize', listener: () => void): this;
4131
+ off(event: 'minimize', listener: () => void): this;
4132
+ once(event: 'minimize', listener: () => void): this;
4133
+ addListener(event: 'minimize', listener: () => void): this;
4134
+ removeListener(event: 'minimize', listener: () => void): this;
4135
4135
  /**
4136
4136
  * Emitted when the window is minimized.
4137
4137
  */
4138
- on(event: 'minimize', listener: Function): this;
4139
- off(event: 'minimize', listener: Function): this;
4140
- once(event: 'minimize', listener: Function): this;
4141
- addListener(event: 'minimize', listener: Function): this;
4142
- removeListener(event: 'minimize', listener: Function): this;
4138
+ on(event: 'minimize', listener: () => void): this;
4139
+ off(event: 'minimize', listener: () => void): this;
4140
+ once(event: 'minimize', listener: () => void): this;
4141
+ addListener(event: 'minimize', listener: () => void): this;
4142
+ removeListener(event: 'minimize', listener: () => void): this;
4143
4143
  /**
4144
4144
  * Emitted when the window is being moved to a new position.
4145
4145
  */
4146
- on(event: 'move', listener: Function): this;
4147
- off(event: 'move', listener: Function): this;
4148
- once(event: 'move', listener: Function): this;
4149
- addListener(event: 'move', listener: Function): this;
4150
- removeListener(event: 'move', listener: Function): this;
4146
+ on(event: 'move', listener: () => void): this;
4147
+ off(event: 'move', listener: () => void): this;
4148
+ once(event: 'move', listener: () => void): this;
4149
+ addListener(event: 'move', listener: () => void): this;
4150
+ removeListener(event: 'move', listener: () => void): this;
4151
4151
  /**
4152
4152
  * Emitted when the window is being moved to a new position.
4153
4153
  */
4154
- on(event: 'move', listener: Function): this;
4155
- off(event: 'move', listener: Function): this;
4156
- once(event: 'move', listener: Function): this;
4157
- addListener(event: 'move', listener: Function): this;
4158
- removeListener(event: 'move', listener: Function): this;
4154
+ on(event: 'move', listener: () => void): this;
4155
+ off(event: 'move', listener: () => void): this;
4156
+ once(event: 'move', listener: () => void): this;
4157
+ addListener(event: 'move', listener: () => void): this;
4158
+ removeListener(event: 'move', listener: () => void): this;
4159
4159
  /**
4160
4160
  * Emitted once when the window is moved to a new position.
4161
4161
  *
@@ -4163,23 +4163,23 @@ declare namespace Electron {
4163
4163
  *
4164
4164
  * @platform darwin,win32
4165
4165
  */
4166
- on(event: 'moved', listener: Function): this;
4166
+ on(event: 'moved', listener: () => void): this;
4167
4167
  /**
4168
4168
  * @platform darwin,win32
4169
4169
  */
4170
- off(event: 'moved', listener: Function): this;
4170
+ off(event: 'moved', listener: () => void): this;
4171
4171
  /**
4172
4172
  * @platform darwin,win32
4173
4173
  */
4174
- once(event: 'moved', listener: Function): this;
4174
+ once(event: 'moved', listener: () => void): this;
4175
4175
  /**
4176
4176
  * @platform darwin,win32
4177
4177
  */
4178
- addListener(event: 'moved', listener: Function): this;
4178
+ addListener(event: 'moved', listener: () => void): this;
4179
4179
  /**
4180
4180
  * @platform darwin,win32
4181
4181
  */
4182
- removeListener(event: 'moved', listener: Function): this;
4182
+ removeListener(event: 'moved', listener: () => void): this;
4183
4183
  /**
4184
4184
  * Emitted once when the window is moved to a new position.
4185
4185
  *
@@ -4187,67 +4187,67 @@ declare namespace Electron {
4187
4187
  *
4188
4188
  * @platform darwin,win32
4189
4189
  */
4190
- on(event: 'moved', listener: Function): this;
4190
+ on(event: 'moved', listener: () => void): this;
4191
4191
  /**
4192
4192
  * @platform darwin,win32
4193
4193
  */
4194
- off(event: 'moved', listener: Function): this;
4194
+ off(event: 'moved', listener: () => void): this;
4195
4195
  /**
4196
4196
  * @platform darwin,win32
4197
4197
  */
4198
- once(event: 'moved', listener: Function): this;
4198
+ once(event: 'moved', listener: () => void): this;
4199
4199
  /**
4200
4200
  * @platform darwin,win32
4201
4201
  */
4202
- addListener(event: 'moved', listener: Function): this;
4202
+ addListener(event: 'moved', listener: () => void): this;
4203
4203
  /**
4204
4204
  * @platform darwin,win32
4205
4205
  */
4206
- removeListener(event: 'moved', listener: Function): this;
4206
+ removeListener(event: 'moved', listener: () => void): this;
4207
4207
  /**
4208
4208
  * Emitted when the native new tab button is clicked.
4209
4209
  *
4210
4210
  * @platform darwin
4211
4211
  */
4212
- on(event: 'new-window-for-tab', listener: Function): this;
4212
+ on(event: 'new-window-for-tab', listener: () => void): this;
4213
4213
  /**
4214
4214
  * @platform darwin
4215
4215
  */
4216
- off(event: 'new-window-for-tab', listener: Function): this;
4216
+ off(event: 'new-window-for-tab', listener: () => void): this;
4217
4217
  /**
4218
4218
  * @platform darwin
4219
4219
  */
4220
- once(event: 'new-window-for-tab', listener: Function): this;
4220
+ once(event: 'new-window-for-tab', listener: () => void): this;
4221
4221
  /**
4222
4222
  * @platform darwin
4223
4223
  */
4224
- addListener(event: 'new-window-for-tab', listener: Function): this;
4224
+ addListener(event: 'new-window-for-tab', listener: () => void): this;
4225
4225
  /**
4226
4226
  * @platform darwin
4227
4227
  */
4228
- removeListener(event: 'new-window-for-tab', listener: Function): this;
4228
+ removeListener(event: 'new-window-for-tab', listener: () => void): this;
4229
4229
  /**
4230
4230
  * Emitted when the native new tab button is clicked.
4231
4231
  *
4232
4232
  * @platform darwin
4233
4233
  */
4234
- on(event: 'new-window-for-tab', listener: Function): this;
4234
+ on(event: 'new-window-for-tab', listener: () => void): this;
4235
4235
  /**
4236
4236
  * @platform darwin
4237
4237
  */
4238
- off(event: 'new-window-for-tab', listener: Function): this;
4238
+ off(event: 'new-window-for-tab', listener: () => void): this;
4239
4239
  /**
4240
4240
  * @platform darwin
4241
4241
  */
4242
- once(event: 'new-window-for-tab', listener: Function): this;
4242
+ once(event: 'new-window-for-tab', listener: () => void): this;
4243
4243
  /**
4244
4244
  * @platform darwin
4245
4245
  */
4246
- addListener(event: 'new-window-for-tab', listener: Function): this;
4246
+ addListener(event: 'new-window-for-tab', listener: () => void): this;
4247
4247
  /**
4248
4248
  * @platform darwin
4249
4249
  */
4250
- removeListener(event: 'new-window-for-tab', listener: Function): this;
4250
+ removeListener(event: 'new-window-for-tab', listener: () => void): this;
4251
4251
  /**
4252
4252
  * Emitted when the document changed its title, calling `event.preventDefault()`
4253
4253
  * will prevent the native window's title from changing. `explicitSet` is false
@@ -4276,27 +4276,27 @@ declare namespace Electron {
4276
4276
  * "visible" and paint even though `show` is false. This event will never fire if
4277
4277
  * you use `paintWhenInitiallyHidden: false`
4278
4278
  */
4279
- on(event: 'ready-to-show', listener: Function): this;
4280
- off(event: 'ready-to-show', listener: Function): this;
4281
- once(event: 'ready-to-show', listener: Function): this;
4282
- addListener(event: 'ready-to-show', listener: Function): this;
4283
- removeListener(event: 'ready-to-show', listener: Function): this;
4279
+ on(event: 'ready-to-show', listener: () => void): this;
4280
+ off(event: 'ready-to-show', listener: () => void): this;
4281
+ once(event: 'ready-to-show', listener: () => void): this;
4282
+ addListener(event: 'ready-to-show', listener: () => void): this;
4283
+ removeListener(event: 'ready-to-show', listener: () => void): this;
4284
4284
  /**
4285
4285
  * Emitted after the window has been resized.
4286
4286
  */
4287
- on(event: 'resize', listener: Function): this;
4288
- off(event: 'resize', listener: Function): this;
4289
- once(event: 'resize', listener: Function): this;
4290
- addListener(event: 'resize', listener: Function): this;
4291
- removeListener(event: 'resize', listener: Function): this;
4287
+ on(event: 'resize', listener: () => void): this;
4288
+ off(event: 'resize', listener: () => void): this;
4289
+ once(event: 'resize', listener: () => void): this;
4290
+ addListener(event: 'resize', listener: () => void): this;
4291
+ removeListener(event: 'resize', listener: () => void): this;
4292
4292
  /**
4293
4293
  * Emitted after the window has been resized.
4294
4294
  */
4295
- on(event: 'resize', listener: Function): this;
4296
- off(event: 'resize', listener: Function): this;
4297
- once(event: 'resize', listener: Function): this;
4298
- addListener(event: 'resize', listener: Function): this;
4299
- removeListener(event: 'resize', listener: Function): this;
4295
+ on(event: 'resize', listener: () => void): this;
4296
+ off(event: 'resize', listener: () => void): this;
4297
+ once(event: 'resize', listener: () => void): this;
4298
+ addListener(event: 'resize', listener: () => void): this;
4299
+ removeListener(event: 'resize', listener: () => void): this;
4300
4300
  /**
4301
4301
  * Emitted once when the window has finished being resized.
4302
4302
  *
@@ -4306,23 +4306,23 @@ declare namespace Electron {
4306
4306
  *
4307
4307
  * @platform darwin,win32
4308
4308
  */
4309
- on(event: 'resized', listener: Function): this;
4309
+ on(event: 'resized', listener: () => void): this;
4310
4310
  /**
4311
4311
  * @platform darwin,win32
4312
4312
  */
4313
- off(event: 'resized', listener: Function): this;
4313
+ off(event: 'resized', listener: () => void): this;
4314
4314
  /**
4315
4315
  * @platform darwin,win32
4316
4316
  */
4317
- once(event: 'resized', listener: Function): this;
4317
+ once(event: 'resized', listener: () => void): this;
4318
4318
  /**
4319
4319
  * @platform darwin,win32
4320
4320
  */
4321
- addListener(event: 'resized', listener: Function): this;
4321
+ addListener(event: 'resized', listener: () => void): this;
4322
4322
  /**
4323
4323
  * @platform darwin,win32
4324
4324
  */
4325
- removeListener(event: 'resized', listener: Function): this;
4325
+ removeListener(event: 'resized', listener: () => void): this;
4326
4326
  /**
4327
4327
  * Emitted once when the window has finished being resized.
4328
4328
  *
@@ -4332,47 +4332,47 @@ declare namespace Electron {
4332
4332
  *
4333
4333
  * @platform darwin,win32
4334
4334
  */
4335
- on(event: 'resized', listener: Function): this;
4335
+ on(event: 'resized', listener: () => void): this;
4336
4336
  /**
4337
4337
  * @platform darwin,win32
4338
4338
  */
4339
- off(event: 'resized', listener: Function): this;
4339
+ off(event: 'resized', listener: () => void): this;
4340
4340
  /**
4341
4341
  * @platform darwin,win32
4342
4342
  */
4343
- once(event: 'resized', listener: Function): this;
4343
+ once(event: 'resized', listener: () => void): this;
4344
4344
  /**
4345
4345
  * @platform darwin,win32
4346
4346
  */
4347
- addListener(event: 'resized', listener: Function): this;
4347
+ addListener(event: 'resized', listener: () => void): this;
4348
4348
  /**
4349
4349
  * @platform darwin,win32
4350
4350
  */
4351
- removeListener(event: 'resized', listener: Function): this;
4351
+ removeListener(event: 'resized', listener: () => void): this;
4352
4352
  /**
4353
4353
  * Emitted when the unresponsive web page becomes responsive again.
4354
4354
  */
4355
- on(event: 'responsive', listener: Function): this;
4356
- off(event: 'responsive', listener: Function): this;
4357
- once(event: 'responsive', listener: Function): this;
4358
- addListener(event: 'responsive', listener: Function): this;
4359
- removeListener(event: 'responsive', listener: Function): this;
4355
+ on(event: 'responsive', listener: () => void): this;
4356
+ off(event: 'responsive', listener: () => void): this;
4357
+ once(event: 'responsive', listener: () => void): this;
4358
+ addListener(event: 'responsive', listener: () => void): this;
4359
+ removeListener(event: 'responsive', listener: () => void): this;
4360
4360
  /**
4361
4361
  * Emitted when the window is restored from a minimized state.
4362
4362
  */
4363
- on(event: 'restore', listener: Function): this;
4364
- off(event: 'restore', listener: Function): this;
4365
- once(event: 'restore', listener: Function): this;
4366
- addListener(event: 'restore', listener: Function): this;
4367
- removeListener(event: 'restore', listener: Function): this;
4363
+ on(event: 'restore', listener: () => void): this;
4364
+ off(event: 'restore', listener: () => void): this;
4365
+ once(event: 'restore', listener: () => void): this;
4366
+ addListener(event: 'restore', listener: () => void): this;
4367
+ removeListener(event: 'restore', listener: () => void): this;
4368
4368
  /**
4369
4369
  * Emitted when the window is restored from a minimized state.
4370
4370
  */
4371
- on(event: 'restore', listener: Function): this;
4372
- off(event: 'restore', listener: Function): this;
4373
- once(event: 'restore', listener: Function): this;
4374
- addListener(event: 'restore', listener: Function): this;
4375
- removeListener(event: 'restore', listener: Function): this;
4371
+ on(event: 'restore', listener: () => void): this;
4372
+ off(event: 'restore', listener: () => void): this;
4373
+ once(event: 'restore', listener: () => void): this;
4374
+ addListener(event: 'restore', listener: () => void): this;
4375
+ removeListener(event: 'restore', listener: () => void): this;
4376
4376
  /**
4377
4377
  * Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
4378
4378
  * is ended. The `rotation` value on each emission is the angle in degrees rotated
@@ -4441,150 +4441,150 @@ declare namespace Electron {
4441
4441
  *
4442
4442
  * @platform win32
4443
4443
  */
4444
- on(event: 'session-end', listener: Function): this;
4444
+ on(event: 'session-end', listener: () => void): this;
4445
4445
  /**
4446
4446
  * @platform win32
4447
4447
  */
4448
- off(event: 'session-end', listener: Function): this;
4448
+ off(event: 'session-end', listener: () => void): this;
4449
4449
  /**
4450
4450
  * @platform win32
4451
4451
  */
4452
- once(event: 'session-end', listener: Function): this;
4452
+ once(event: 'session-end', listener: () => void): this;
4453
4453
  /**
4454
4454
  * @platform win32
4455
4455
  */
4456
- addListener(event: 'session-end', listener: Function): this;
4456
+ addListener(event: 'session-end', listener: () => void): this;
4457
4457
  /**
4458
4458
  * @platform win32
4459
4459
  */
4460
- removeListener(event: 'session-end', listener: Function): this;
4460
+ removeListener(event: 'session-end', listener: () => void): this;
4461
4461
  /**
4462
4462
  * Emitted when window session is going to end due to force shutdown or machine
4463
4463
  * restart or session log off.
4464
4464
  *
4465
4465
  * @platform win32
4466
4466
  */
4467
- on(event: 'session-end', listener: Function): this;
4467
+ on(event: 'session-end', listener: () => void): this;
4468
4468
  /**
4469
4469
  * @platform win32
4470
4470
  */
4471
- off(event: 'session-end', listener: Function): this;
4471
+ off(event: 'session-end', listener: () => void): this;
4472
4472
  /**
4473
4473
  * @platform win32
4474
4474
  */
4475
- once(event: 'session-end', listener: Function): this;
4475
+ once(event: 'session-end', listener: () => void): this;
4476
4476
  /**
4477
4477
  * @platform win32
4478
4478
  */
4479
- addListener(event: 'session-end', listener: Function): this;
4479
+ addListener(event: 'session-end', listener: () => void): this;
4480
4480
  /**
4481
4481
  * @platform win32
4482
4482
  */
4483
- removeListener(event: 'session-end', listener: Function): this;
4483
+ removeListener(event: 'session-end', listener: () => void): this;
4484
4484
  /**
4485
4485
  * Emitted when the window opens a sheet.
4486
4486
  *
4487
4487
  * @platform darwin
4488
4488
  */
4489
- on(event: 'sheet-begin', listener: Function): this;
4489
+ on(event: 'sheet-begin', listener: () => void): this;
4490
4490
  /**
4491
4491
  * @platform darwin
4492
4492
  */
4493
- off(event: 'sheet-begin', listener: Function): this;
4493
+ off(event: 'sheet-begin', listener: () => void): this;
4494
4494
  /**
4495
4495
  * @platform darwin
4496
4496
  */
4497
- once(event: 'sheet-begin', listener: Function): this;
4497
+ once(event: 'sheet-begin', listener: () => void): this;
4498
4498
  /**
4499
4499
  * @platform darwin
4500
4500
  */
4501
- addListener(event: 'sheet-begin', listener: Function): this;
4501
+ addListener(event: 'sheet-begin', listener: () => void): this;
4502
4502
  /**
4503
4503
  * @platform darwin
4504
4504
  */
4505
- removeListener(event: 'sheet-begin', listener: Function): this;
4505
+ removeListener(event: 'sheet-begin', listener: () => void): this;
4506
4506
  /**
4507
4507
  * Emitted when the window opens a sheet.
4508
4508
  *
4509
4509
  * @platform darwin
4510
4510
  */
4511
- on(event: 'sheet-begin', listener: Function): this;
4511
+ on(event: 'sheet-begin', listener: () => void): this;
4512
4512
  /**
4513
4513
  * @platform darwin
4514
4514
  */
4515
- off(event: 'sheet-begin', listener: Function): this;
4515
+ off(event: 'sheet-begin', listener: () => void): this;
4516
4516
  /**
4517
4517
  * @platform darwin
4518
4518
  */
4519
- once(event: 'sheet-begin', listener: Function): this;
4519
+ once(event: 'sheet-begin', listener: () => void): this;
4520
4520
  /**
4521
4521
  * @platform darwin
4522
4522
  */
4523
- addListener(event: 'sheet-begin', listener: Function): this;
4523
+ addListener(event: 'sheet-begin', listener: () => void): this;
4524
4524
  /**
4525
4525
  * @platform darwin
4526
4526
  */
4527
- removeListener(event: 'sheet-begin', listener: Function): this;
4527
+ removeListener(event: 'sheet-begin', listener: () => void): this;
4528
4528
  /**
4529
4529
  * Emitted when the window has closed a sheet.
4530
4530
  *
4531
4531
  * @platform darwin
4532
4532
  */
4533
- on(event: 'sheet-end', listener: Function): this;
4533
+ on(event: 'sheet-end', listener: () => void): this;
4534
4534
  /**
4535
4535
  * @platform darwin
4536
4536
  */
4537
- off(event: 'sheet-end', listener: Function): this;
4537
+ off(event: 'sheet-end', listener: () => void): this;
4538
4538
  /**
4539
4539
  * @platform darwin
4540
4540
  */
4541
- once(event: 'sheet-end', listener: Function): this;
4541
+ once(event: 'sheet-end', listener: () => void): this;
4542
4542
  /**
4543
4543
  * @platform darwin
4544
4544
  */
4545
- addListener(event: 'sheet-end', listener: Function): this;
4545
+ addListener(event: 'sheet-end', listener: () => void): this;
4546
4546
  /**
4547
4547
  * @platform darwin
4548
4548
  */
4549
- removeListener(event: 'sheet-end', listener: Function): this;
4549
+ removeListener(event: 'sheet-end', listener: () => void): this;
4550
4550
  /**
4551
4551
  * Emitted when the window has closed a sheet.
4552
4552
  *
4553
4553
  * @platform darwin
4554
4554
  */
4555
- on(event: 'sheet-end', listener: Function): this;
4555
+ on(event: 'sheet-end', listener: () => void): this;
4556
4556
  /**
4557
4557
  * @platform darwin
4558
4558
  */
4559
- off(event: 'sheet-end', listener: Function): this;
4559
+ off(event: 'sheet-end', listener: () => void): this;
4560
4560
  /**
4561
4561
  * @platform darwin
4562
4562
  */
4563
- once(event: 'sheet-end', listener: Function): this;
4563
+ once(event: 'sheet-end', listener: () => void): this;
4564
4564
  /**
4565
4565
  * @platform darwin
4566
4566
  */
4567
- addListener(event: 'sheet-end', listener: Function): this;
4567
+ addListener(event: 'sheet-end', listener: () => void): this;
4568
4568
  /**
4569
4569
  * @platform darwin
4570
4570
  */
4571
- removeListener(event: 'sheet-end', listener: Function): this;
4571
+ removeListener(event: 'sheet-end', listener: () => void): this;
4572
4572
  /**
4573
4573
  * Emitted when the window is shown.
4574
4574
  */
4575
- on(event: 'show', listener: Function): this;
4576
- off(event: 'show', listener: Function): this;
4577
- once(event: 'show', listener: Function): this;
4578
- addListener(event: 'show', listener: Function): this;
4579
- removeListener(event: 'show', listener: Function): this;
4575
+ on(event: 'show', listener: () => void): this;
4576
+ off(event: 'show', listener: () => void): this;
4577
+ once(event: 'show', listener: () => void): this;
4578
+ addListener(event: 'show', listener: () => void): this;
4579
+ removeListener(event: 'show', listener: () => void): this;
4580
4580
  /**
4581
4581
  * Emitted when the window is shown.
4582
4582
  */
4583
- on(event: 'show', listener: Function): this;
4584
- off(event: 'show', listener: Function): this;
4585
- once(event: 'show', listener: Function): this;
4586
- addListener(event: 'show', listener: Function): this;
4587
- removeListener(event: 'show', listener: Function): this;
4583
+ on(event: 'show', listener: () => void): this;
4584
+ off(event: 'show', listener: () => void): this;
4585
+ once(event: 'show', listener: () => void): this;
4586
+ addListener(event: 'show', listener: () => void): this;
4587
+ removeListener(event: 'show', listener: () => void): this;
4588
4588
  /**
4589
4589
  * Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
4590
4590
  * `left`.
@@ -4752,27 +4752,27 @@ declare namespace Electron {
4752
4752
  /**
4753
4753
  * Emitted when the window exits from a maximized state.
4754
4754
  */
4755
- on(event: 'unmaximize', listener: Function): this;
4756
- off(event: 'unmaximize', listener: Function): this;
4757
- once(event: 'unmaximize', listener: Function): this;
4758
- addListener(event: 'unmaximize', listener: Function): this;
4759
- removeListener(event: 'unmaximize', listener: Function): this;
4755
+ on(event: 'unmaximize', listener: () => void): this;
4756
+ off(event: 'unmaximize', listener: () => void): this;
4757
+ once(event: 'unmaximize', listener: () => void): this;
4758
+ addListener(event: 'unmaximize', listener: () => void): this;
4759
+ removeListener(event: 'unmaximize', listener: () => void): this;
4760
4760
  /**
4761
4761
  * Emitted when the window exits from a maximized state.
4762
4762
  */
4763
- on(event: 'unmaximize', listener: Function): this;
4764
- off(event: 'unmaximize', listener: Function): this;
4765
- once(event: 'unmaximize', listener: Function): this;
4766
- addListener(event: 'unmaximize', listener: Function): this;
4767
- removeListener(event: 'unmaximize', listener: Function): this;
4763
+ on(event: 'unmaximize', listener: () => void): this;
4764
+ off(event: 'unmaximize', listener: () => void): this;
4765
+ once(event: 'unmaximize', listener: () => void): this;
4766
+ addListener(event: 'unmaximize', listener: () => void): this;
4767
+ removeListener(event: 'unmaximize', listener: () => void): this;
4768
4768
  /**
4769
4769
  * Emitted when the web page becomes unresponsive.
4770
4770
  */
4771
- on(event: 'unresponsive', listener: Function): this;
4772
- off(event: 'unresponsive', listener: Function): this;
4773
- once(event: 'unresponsive', listener: Function): this;
4774
- addListener(event: 'unresponsive', listener: Function): this;
4775
- removeListener(event: 'unresponsive', listener: Function): this;
4771
+ on(event: 'unresponsive', listener: () => void): this;
4772
+ off(event: 'unresponsive', listener: () => void): this;
4773
+ once(event: 'unresponsive', listener: () => void): this;
4774
+ addListener(event: 'unresponsive', listener: () => void): this;
4775
+ removeListener(event: 'unresponsive', listener: () => void): this;
4776
4776
  /**
4777
4777
  * Emitted before the window is moved. On Windows, calling `event.preventDefault()`
4778
4778
  * will prevent the window from being moved.
@@ -5487,7 +5487,7 @@ declare namespace Electron {
5487
5487
  * setting this, the window is still a normal window, not a toolbox window which
5488
5488
  * can not be focused on.
5489
5489
  */
5490
- setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
5490
+ setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | 'dock', relativeLevel?: number): void;
5491
5491
  /**
5492
5492
  * Sets the properties for the window's taskbar button.
5493
5493
  *
@@ -6222,21 +6222,21 @@ declare namespace Electron {
6222
6222
  * Emitted when the `request` is aborted. The `abort` event will not be fired if
6223
6223
  * the `request` is already closed.
6224
6224
  */
6225
- on(event: 'abort', listener: Function): this;
6226
- off(event: 'abort', listener: Function): this;
6227
- once(event: 'abort', listener: Function): this;
6228
- addListener(event: 'abort', listener: Function): this;
6229
- removeListener(event: 'abort', listener: Function): this;
6225
+ on(event: 'abort', listener: () => void): this;
6226
+ off(event: 'abort', listener: () => void): this;
6227
+ once(event: 'abort', listener: () => void): this;
6228
+ addListener(event: 'abort', listener: () => void): this;
6229
+ removeListener(event: 'abort', listener: () => void): this;
6230
6230
  /**
6231
6231
  * Emitted as the last event in the HTTP request-response transaction. The `close`
6232
6232
  * event indicates that no more events will be emitted on either the `request` or
6233
6233
  * `response` objects.
6234
6234
  */
6235
- on(event: 'close', listener: Function): this;
6236
- off(event: 'close', listener: Function): this;
6237
- once(event: 'close', listener: Function): this;
6238
- addListener(event: 'close', listener: Function): this;
6239
- removeListener(event: 'close', listener: Function): this;
6235
+ on(event: 'close', listener: () => void): this;
6236
+ off(event: 'close', listener: () => void): this;
6237
+ once(event: 'close', listener: () => void): this;
6238
+ addListener(event: 'close', listener: () => void): this;
6239
+ removeListener(event: 'close', listener: () => void): this;
6240
6240
  /**
6241
6241
  * Emitted when the `net` module fails to issue a network request. Typically when
6242
6242
  * the `request` object emits an `error` event, a `close` event will subsequently
@@ -6271,11 +6271,11 @@ declare namespace Electron {
6271
6271
  * Emitted just after the last chunk of the `request`'s data has been written into
6272
6272
  * the `request` object.
6273
6273
  */
6274
- on(event: 'finish', listener: Function): this;
6275
- off(event: 'finish', listener: Function): this;
6276
- once(event: 'finish', listener: Function): this;
6277
- addListener(event: 'finish', listener: Function): this;
6278
- removeListener(event: 'finish', listener: Function): this;
6274
+ on(event: 'finish', listener: () => void): this;
6275
+ off(event: 'finish', listener: () => void): this;
6276
+ once(event: 'finish', listener: () => void): this;
6277
+ addListener(event: 'finish', listener: () => void): this;
6278
+ removeListener(event: 'finish', listener: () => void): this;
6279
6279
  /**
6280
6280
  * Emitted when an authenticating proxy is asking for user credentials.
6281
6281
  *
@@ -7970,11 +7970,11 @@ declare namespace Electron {
7970
7970
 
7971
7971
  // Docs: https://electronjs.org/docs/api/in-app-purchase
7972
7972
 
7973
- on(event: 'transactions-updated', listener: Function): this;
7974
- off(event: 'transactions-updated', listener: Function): this;
7975
- once(event: 'transactions-updated', listener: Function): this;
7976
- addListener(event: 'transactions-updated', listener: Function): this;
7977
- removeListener(event: 'transactions-updated', listener: Function): this;
7973
+ on(event: 'transactions-updated', listener: () => void): this;
7974
+ off(event: 'transactions-updated', listener: () => void): this;
7975
+ once(event: 'transactions-updated', listener: () => void): this;
7976
+ addListener(event: 'transactions-updated', listener: () => void): this;
7977
+ removeListener(event: 'transactions-updated', listener: () => void): this;
7978
7978
  /**
7979
7979
  * whether a user can make a payment.
7980
7980
  */
@@ -8023,11 +8023,11 @@ declare namespace Electron {
8023
8023
  /**
8024
8024
  * Emitted when a request has been canceled during an ongoing HTTP transaction.
8025
8025
  */
8026
- on(event: 'aborted', listener: Function): this;
8027
- off(event: 'aborted', listener: Function): this;
8028
- once(event: 'aborted', listener: Function): this;
8029
- addListener(event: 'aborted', listener: Function): this;
8030
- removeListener(event: 'aborted', listener: Function): this;
8026
+ on(event: 'aborted', listener: () => void): this;
8027
+ off(event: 'aborted', listener: () => void): this;
8028
+ once(event: 'aborted', listener: () => void): this;
8029
+ addListener(event: 'aborted', listener: () => void): this;
8030
+ removeListener(event: 'aborted', listener: () => void): this;
8031
8031
  /**
8032
8032
  * The `data` event is the usual method of transferring response data into
8033
8033
  * applicative code.
@@ -8060,26 +8060,42 @@ declare namespace Electron {
8060
8060
  /**
8061
8061
  * Indicates that response body has ended. Must be placed before 'data' event.
8062
8062
  */
8063
- on(event: 'end', listener: Function): this;
8064
- off(event: 'end', listener: Function): this;
8065
- once(event: 'end', listener: Function): this;
8066
- addListener(event: 'end', listener: Function): this;
8067
- removeListener(event: 'end', listener: Function): this;
8063
+ on(event: 'end', listener: () => void): this;
8064
+ off(event: 'end', listener: () => void): this;
8065
+ once(event: 'end', listener: () => void): this;
8066
+ addListener(event: 'end', listener: () => void): this;
8067
+ removeListener(event: 'end', listener: () => void): this;
8068
8068
  /**
8069
- * Returns:
8070
- *
8071
- * `error` Error - Typically holds an error string identifying failure root cause.
8072
- *
8073
8069
  * Emitted when an error was encountered while streaming response data events. For
8074
8070
  * instance, if the server closes the underlying while the response is still
8075
8071
  * streaming, an `error` event will be emitted on the response object and a `close`
8076
8072
  * event will subsequently follow on the request object.
8077
8073
  */
8078
- on(event: 'error', listener: Function): this;
8079
- off(event: 'error', listener: Function): this;
8080
- once(event: 'error', listener: Function): this;
8081
- addListener(event: 'error', listener: Function): this;
8082
- removeListener(event: 'error', listener: Function): this;
8074
+ on(event: 'error', listener: (
8075
+ /**
8076
+ * Typically holds an error string identifying failure root cause.
8077
+ */
8078
+ error: Error) => void): this;
8079
+ off(event: 'error', listener: (
8080
+ /**
8081
+ * Typically holds an error string identifying failure root cause.
8082
+ */
8083
+ error: Error) => void): this;
8084
+ once(event: 'error', listener: (
8085
+ /**
8086
+ * Typically holds an error string identifying failure root cause.
8087
+ */
8088
+ error: Error) => void): this;
8089
+ addListener(event: 'error', listener: (
8090
+ /**
8091
+ * Typically holds an error string identifying failure root cause.
8092
+ */
8093
+ error: Error) => void): this;
8094
+ removeListener(event: 'error', listener: (
8095
+ /**
8096
+ * Typically holds an error string identifying failure root cause.
8097
+ */
8098
+ error: Error) => void): this;
8083
8099
  /**
8084
8100
  * A `Record<string, string | string[]>` representing the HTTP response headers.
8085
8101
  * The `headers` object is formatted as follows:
@@ -8792,7 +8808,7 @@ declare namespace Electron {
8792
8808
  visible: boolean;
8793
8809
  }
8794
8810
 
8795
- class MessageChannelMain extends NodeEventEmitter {
8811
+ class MessageChannelMain {
8796
8812
 
8797
8813
  // Docs: https://electronjs.org/docs/api/message-channel-main
8798
8814
 
@@ -8813,11 +8829,11 @@ declare namespace Electron {
8813
8829
  /**
8814
8830
  * Emitted when the remote end of a MessagePortMain object becomes disconnected.
8815
8831
  */
8816
- on(event: 'close', listener: Function): this;
8817
- off(event: 'close', listener: Function): this;
8818
- once(event: 'close', listener: Function): this;
8819
- addListener(event: 'close', listener: Function): this;
8820
- removeListener(event: 'close', listener: Function): this;
8832
+ on(event: 'close', listener: () => void): this;
8833
+ off(event: 'close', listener: () => void): this;
8834
+ once(event: 'close', listener: () => void): this;
8835
+ addListener(event: 'close', listener: () => void): this;
8836
+ removeListener(event: 'close', listener: () => void): this;
8821
8837
  /**
8822
8838
  * Emitted when a MessagePortMain object receives a message.
8823
8839
  */
@@ -9070,11 +9086,11 @@ declare namespace Electron {
9070
9086
  * `shouldUseHighContrastColors` or `shouldUseInvertedColorScheme` has changed. You
9071
9087
  * will have to check them to determine which one has changed.
9072
9088
  */
9073
- on(event: 'updated', listener: Function): this;
9074
- off(event: 'updated', listener: Function): this;
9075
- once(event: 'updated', listener: Function): this;
9076
- addListener(event: 'updated', listener: Function): this;
9077
- removeListener(event: 'updated', listener: Function): this;
9089
+ on(event: 'updated', listener: () => void): this;
9090
+ off(event: 'updated', listener: () => void): this;
9091
+ once(event: 'updated', listener: () => void): this;
9092
+ addListener(event: 'updated', listener: () => void): this;
9093
+ removeListener(event: 'updated', listener: () => void): this;
9078
9094
  /**
9079
9095
  * A `boolean` indicating whether Chromium is in forced colors mode, controlled by
9080
9096
  * system accessibility settings. Currently, Windows high contrast is the only
@@ -9150,7 +9166,7 @@ declare namespace Electron {
9150
9166
  themeSource: ('system' | 'light' | 'dark');
9151
9167
  }
9152
9168
 
9153
- class NavigationHistory extends NodeEventEmitter {
9169
+ class NavigationHistory {
9154
9170
 
9155
9171
  // Docs: https://electronjs.org/docs/api/navigation-history
9156
9172
 
@@ -9671,75 +9687,75 @@ declare namespace Electron {
9671
9687
  *
9672
9688
  * @platform darwin,win32
9673
9689
  */
9674
- on(event: 'lock-screen', listener: Function): this;
9690
+ on(event: 'lock-screen', listener: () => void): this;
9675
9691
  /**
9676
9692
  * @platform darwin,win32
9677
9693
  */
9678
- off(event: 'lock-screen', listener: Function): this;
9694
+ off(event: 'lock-screen', listener: () => void): this;
9679
9695
  /**
9680
9696
  * @platform darwin,win32
9681
9697
  */
9682
- once(event: 'lock-screen', listener: Function): this;
9698
+ once(event: 'lock-screen', listener: () => void): this;
9683
9699
  /**
9684
9700
  * @platform darwin,win32
9685
9701
  */
9686
- addListener(event: 'lock-screen', listener: Function): this;
9702
+ addListener(event: 'lock-screen', listener: () => void): this;
9687
9703
  /**
9688
9704
  * @platform darwin,win32
9689
9705
  */
9690
- removeListener(event: 'lock-screen', listener: Function): this;
9706
+ removeListener(event: 'lock-screen', listener: () => void): this;
9691
9707
  /**
9692
9708
  * Emitted when the system changes to AC power.
9693
9709
  *
9694
9710
  * @platform darwin,win32
9695
9711
  */
9696
- on(event: 'on-ac', listener: Function): this;
9712
+ on(event: 'on-ac', listener: () => void): this;
9697
9713
  /**
9698
9714
  * @platform darwin,win32
9699
9715
  */
9700
- off(event: 'on-ac', listener: Function): this;
9716
+ off(event: 'on-ac', listener: () => void): this;
9701
9717
  /**
9702
9718
  * @platform darwin,win32
9703
9719
  */
9704
- once(event: 'on-ac', listener: Function): this;
9720
+ once(event: 'on-ac', listener: () => void): this;
9705
9721
  /**
9706
9722
  * @platform darwin,win32
9707
9723
  */
9708
- addListener(event: 'on-ac', listener: Function): this;
9724
+ addListener(event: 'on-ac', listener: () => void): this;
9709
9725
  /**
9710
9726
  * @platform darwin,win32
9711
9727
  */
9712
- removeListener(event: 'on-ac', listener: Function): this;
9728
+ removeListener(event: 'on-ac', listener: () => void): this;
9713
9729
  /**
9714
9730
  * Emitted when system changes to battery power.
9715
9731
  *
9716
9732
  * @platform darwin
9717
9733
  */
9718
- on(event: 'on-battery', listener: Function): this;
9734
+ on(event: 'on-battery', listener: () => void): this;
9719
9735
  /**
9720
9736
  * @platform darwin
9721
9737
  */
9722
- off(event: 'on-battery', listener: Function): this;
9738
+ off(event: 'on-battery', listener: () => void): this;
9723
9739
  /**
9724
9740
  * @platform darwin
9725
9741
  */
9726
- once(event: 'on-battery', listener: Function): this;
9742
+ once(event: 'on-battery', listener: () => void): this;
9727
9743
  /**
9728
9744
  * @platform darwin
9729
9745
  */
9730
- addListener(event: 'on-battery', listener: Function): this;
9746
+ addListener(event: 'on-battery', listener: () => void): this;
9731
9747
  /**
9732
9748
  * @platform darwin
9733
9749
  */
9734
- removeListener(event: 'on-battery', listener: Function): this;
9750
+ removeListener(event: 'on-battery', listener: () => void): this;
9735
9751
  /**
9736
9752
  * Emitted when system is resuming.
9737
9753
  */
9738
- on(event: 'resume', listener: Function): this;
9739
- off(event: 'resume', listener: Function): this;
9740
- once(event: 'resume', listener: Function): this;
9741
- addListener(event: 'resume', listener: Function): this;
9742
- removeListener(event: 'resume', listener: Function): this;
9754
+ on(event: 'resume', listener: () => void): this;
9755
+ off(event: 'resume', listener: () => void): this;
9756
+ once(event: 'resume', listener: () => void): this;
9757
+ addListener(event: 'resume', listener: () => void): this;
9758
+ removeListener(event: 'resume', listener: () => void): this;
9743
9759
  /**
9744
9760
  * Emitted when the system is about to reboot or shut down. If the event handler
9745
9761
  * invokes `e.preventDefault()`, Electron will attempt to delay system shutdown in
@@ -9748,23 +9764,23 @@ declare namespace Electron {
9748
9764
  *
9749
9765
  * @platform linux,darwin
9750
9766
  */
9751
- on(event: 'shutdown', listener: Function): this;
9767
+ on(event: 'shutdown', listener: () => void): this;
9752
9768
  /**
9753
9769
  * @platform linux,darwin
9754
9770
  */
9755
- off(event: 'shutdown', listener: Function): this;
9771
+ off(event: 'shutdown', listener: () => void): this;
9756
9772
  /**
9757
9773
  * @platform linux,darwin
9758
9774
  */
9759
- once(event: 'shutdown', listener: Function): this;
9775
+ once(event: 'shutdown', listener: () => void): this;
9760
9776
  /**
9761
9777
  * @platform linux,darwin
9762
9778
  */
9763
- addListener(event: 'shutdown', listener: Function): this;
9779
+ addListener(event: 'shutdown', listener: () => void): this;
9764
9780
  /**
9765
9781
  * @platform linux,darwin
9766
9782
  */
9767
- removeListener(event: 'shutdown', listener: Function): this;
9783
+ removeListener(event: 'shutdown', listener: () => void): this;
9768
9784
  /**
9769
9785
  * Notification of a change in the operating system's advertised speed limit for
9770
9786
  * CPUs, in percent. Values below 100 indicate that the system is impairing
@@ -9772,31 +9788,31 @@ declare namespace Electron {
9772
9788
  *
9773
9789
  * @platform darwin,win32
9774
9790
  */
9775
- on(event: 'speed-limit-change', listener: Function): this;
9791
+ on(event: 'speed-limit-change', listener: () => void): this;
9776
9792
  /**
9777
9793
  * @platform darwin,win32
9778
9794
  */
9779
- off(event: 'speed-limit-change', listener: Function): this;
9795
+ off(event: 'speed-limit-change', listener: () => void): this;
9780
9796
  /**
9781
9797
  * @platform darwin,win32
9782
9798
  */
9783
- once(event: 'speed-limit-change', listener: Function): this;
9799
+ once(event: 'speed-limit-change', listener: () => void): this;
9784
9800
  /**
9785
9801
  * @platform darwin,win32
9786
9802
  */
9787
- addListener(event: 'speed-limit-change', listener: Function): this;
9803
+ addListener(event: 'speed-limit-change', listener: () => void): this;
9788
9804
  /**
9789
9805
  * @platform darwin,win32
9790
9806
  */
9791
- removeListener(event: 'speed-limit-change', listener: Function): this;
9807
+ removeListener(event: 'speed-limit-change', listener: () => void): this;
9792
9808
  /**
9793
9809
  * Emitted when the system is suspending.
9794
9810
  */
9795
- on(event: 'suspend', listener: Function): this;
9796
- off(event: 'suspend', listener: Function): this;
9797
- once(event: 'suspend', listener: Function): this;
9798
- addListener(event: 'suspend', listener: Function): this;
9799
- removeListener(event: 'suspend', listener: Function): this;
9811
+ on(event: 'suspend', listener: () => void): this;
9812
+ off(event: 'suspend', listener: () => void): this;
9813
+ once(event: 'suspend', listener: () => void): this;
9814
+ addListener(event: 'suspend', listener: () => void): this;
9815
+ removeListener(event: 'suspend', listener: () => void): this;
9800
9816
  /**
9801
9817
  * Emitted when the thermal state of the system changes. Notification of a change
9802
9818
  * in the thermal status of the system, such as entering a critical temperature
@@ -9813,91 +9829,91 @@ declare namespace Electron {
9813
9829
  *
9814
9830
  * @platform darwin
9815
9831
  */
9816
- on(event: 'thermal-state-change', listener: Function): this;
9832
+ on(event: 'thermal-state-change', listener: () => void): this;
9817
9833
  /**
9818
9834
  * @platform darwin
9819
9835
  */
9820
- off(event: 'thermal-state-change', listener: Function): this;
9836
+ off(event: 'thermal-state-change', listener: () => void): this;
9821
9837
  /**
9822
9838
  * @platform darwin
9823
9839
  */
9824
- once(event: 'thermal-state-change', listener: Function): this;
9840
+ once(event: 'thermal-state-change', listener: () => void): this;
9825
9841
  /**
9826
9842
  * @platform darwin
9827
9843
  */
9828
- addListener(event: 'thermal-state-change', listener: Function): this;
9844
+ addListener(event: 'thermal-state-change', listener: () => void): this;
9829
9845
  /**
9830
9846
  * @platform darwin
9831
9847
  */
9832
- removeListener(event: 'thermal-state-change', listener: Function): this;
9848
+ removeListener(event: 'thermal-state-change', listener: () => void): this;
9833
9849
  /**
9834
9850
  * Emitted as soon as the systems screen is unlocked.
9835
9851
  *
9836
9852
  * @platform darwin,win32
9837
9853
  */
9838
- on(event: 'unlock-screen', listener: Function): this;
9854
+ on(event: 'unlock-screen', listener: () => void): this;
9839
9855
  /**
9840
9856
  * @platform darwin,win32
9841
9857
  */
9842
- off(event: 'unlock-screen', listener: Function): this;
9858
+ off(event: 'unlock-screen', listener: () => void): this;
9843
9859
  /**
9844
9860
  * @platform darwin,win32
9845
9861
  */
9846
- once(event: 'unlock-screen', listener: Function): this;
9862
+ once(event: 'unlock-screen', listener: () => void): this;
9847
9863
  /**
9848
9864
  * @platform darwin,win32
9849
9865
  */
9850
- addListener(event: 'unlock-screen', listener: Function): this;
9866
+ addListener(event: 'unlock-screen', listener: () => void): this;
9851
9867
  /**
9852
9868
  * @platform darwin,win32
9853
9869
  */
9854
- removeListener(event: 'unlock-screen', listener: Function): this;
9870
+ removeListener(event: 'unlock-screen', listener: () => void): this;
9855
9871
  /**
9856
9872
  * Emitted when a login session is activated. See documentation for more
9857
9873
  * information.
9858
9874
  *
9859
9875
  * @platform darwin
9860
9876
  */
9861
- on(event: 'user-did-become-active', listener: Function): this;
9877
+ on(event: 'user-did-become-active', listener: () => void): this;
9862
9878
  /**
9863
9879
  * @platform darwin
9864
9880
  */
9865
- off(event: 'user-did-become-active', listener: Function): this;
9881
+ off(event: 'user-did-become-active', listener: () => void): this;
9866
9882
  /**
9867
9883
  * @platform darwin
9868
9884
  */
9869
- once(event: 'user-did-become-active', listener: Function): this;
9885
+ once(event: 'user-did-become-active', listener: () => void): this;
9870
9886
  /**
9871
9887
  * @platform darwin
9872
9888
  */
9873
- addListener(event: 'user-did-become-active', listener: Function): this;
9889
+ addListener(event: 'user-did-become-active', listener: () => void): this;
9874
9890
  /**
9875
9891
  * @platform darwin
9876
9892
  */
9877
- removeListener(event: 'user-did-become-active', listener: Function): this;
9893
+ removeListener(event: 'user-did-become-active', listener: () => void): this;
9878
9894
  /**
9879
9895
  * Emitted when a login session is deactivated. See documentation for more
9880
9896
  * information.
9881
9897
  *
9882
9898
  * @platform darwin
9883
9899
  */
9884
- on(event: 'user-did-resign-active', listener: Function): this;
9900
+ on(event: 'user-did-resign-active', listener: () => void): this;
9885
9901
  /**
9886
9902
  * @platform darwin
9887
9903
  */
9888
- off(event: 'user-did-resign-active', listener: Function): this;
9904
+ off(event: 'user-did-resign-active', listener: () => void): this;
9889
9905
  /**
9890
9906
  * @platform darwin
9891
9907
  */
9892
- once(event: 'user-did-resign-active', listener: Function): this;
9908
+ once(event: 'user-did-resign-active', listener: () => void): this;
9893
9909
  /**
9894
9910
  * @platform darwin
9895
9911
  */
9896
- addListener(event: 'user-did-resign-active', listener: Function): this;
9912
+ addListener(event: 'user-did-resign-active', listener: () => void): this;
9897
9913
  /**
9898
9914
  * @platform darwin
9899
9915
  */
9900
- removeListener(event: 'user-did-resign-active', listener: Function): this;
9916
+ removeListener(event: 'user-did-resign-active', listener: () => void): this;
9901
9917
  /**
9902
9918
  * The system's current thermal state. Can be `unknown`, `nominal`, `fair`,
9903
9919
  * `serious`, or `critical`.
@@ -10627,7 +10643,7 @@ declare namespace Electron {
10627
10643
  endpoints: ResolvedEndpoint[];
10628
10644
  }
10629
10645
 
10630
- interface SafeStorage extends NodeJS.EventEmitter {
10646
+ interface SafeStorage {
10631
10647
 
10632
10648
  // Docs: https://electronjs.org/docs/api/safe-storage
10633
10649
 
@@ -11952,7 +11968,7 @@ declare namespace Electron {
11952
11968
  url: string;
11953
11969
  }
11954
11970
 
11955
- class ShareMenu extends NodeEventEmitter {
11971
+ class ShareMenu {
11956
11972
 
11957
11973
  // Docs: https://electronjs.org/docs/api/share-menu
11958
11974
 
@@ -12597,7 +12613,7 @@ declare namespace Electron {
12597
12613
  label: string;
12598
12614
  }
12599
12615
 
12600
- class TouchBarColorPicker extends NodeEventEmitter {
12616
+ class TouchBarColorPicker {
12601
12617
 
12602
12618
  // Docs: https://electronjs.org/docs/api/touch-bar-color-picker
12603
12619
 
@@ -12617,7 +12633,7 @@ declare namespace Electron {
12617
12633
  selectedColor: string;
12618
12634
  }
12619
12635
 
12620
- class TouchBarGroup extends NodeEventEmitter {
12636
+ class TouchBarGroup {
12621
12637
 
12622
12638
  // Docs: https://electronjs.org/docs/api/touch-bar-group
12623
12639
 
@@ -12627,7 +12643,7 @@ declare namespace Electron {
12627
12643
  constructor(options: TouchBarGroupConstructorOptions);
12628
12644
  }
12629
12645
 
12630
- class TouchBarLabel extends NodeEventEmitter {
12646
+ class TouchBarLabel {
12631
12647
 
12632
12648
  // Docs: https://electronjs.org/docs/api/touch-bar-label
12633
12649
 
@@ -12652,7 +12668,7 @@ declare namespace Electron {
12652
12668
  textColor: string;
12653
12669
  }
12654
12670
 
12655
- class TouchBarOtherItemsProxy extends NodeEventEmitter {
12671
+ class TouchBarOtherItemsProxy {
12656
12672
 
12657
12673
  // Docs: https://electronjs.org/docs/api/touch-bar-other-items-proxy
12658
12674
 
@@ -12662,7 +12678,7 @@ declare namespace Electron {
12662
12678
  constructor();
12663
12679
  }
12664
12680
 
12665
- class TouchBarPopover extends NodeEventEmitter {
12681
+ class TouchBarPopover {
12666
12682
 
12667
12683
  // Docs: https://electronjs.org/docs/api/touch-bar-popover
12668
12684
 
@@ -12682,7 +12698,7 @@ declare namespace Electron {
12682
12698
  label: string;
12683
12699
  }
12684
12700
 
12685
- class TouchBarScrubber extends NodeEventEmitter {
12701
+ class TouchBarScrubber {
12686
12702
 
12687
12703
  // Docs: https://electronjs.org/docs/api/touch-bar-scrubber
12688
12704
 
@@ -12738,7 +12754,7 @@ declare namespace Electron {
12738
12754
  showArrowButtons: boolean;
12739
12755
  }
12740
12756
 
12741
- class TouchBarSegmentedControl extends NodeEventEmitter {
12757
+ class TouchBarSegmentedControl {
12742
12758
 
12743
12759
  // Docs: https://electronjs.org/docs/api/touch-bar-segmented-control
12744
12760
 
@@ -12770,7 +12786,7 @@ declare namespace Electron {
12770
12786
  selectedIndex: number;
12771
12787
  }
12772
12788
 
12773
- class TouchBarSlider extends NodeEventEmitter {
12789
+ class TouchBarSlider {
12774
12790
 
12775
12791
  // Docs: https://electronjs.org/docs/api/touch-bar-slider
12776
12792
 
@@ -12800,7 +12816,7 @@ declare namespace Electron {
12800
12816
  value: number;
12801
12817
  }
12802
12818
 
12803
- class TouchBarSpacer extends NodeEventEmitter {
12819
+ class TouchBarSpacer {
12804
12820
 
12805
12821
  // Docs: https://electronjs.org/docs/api/touch-bar-spacer
12806
12822
 
@@ -12935,68 +12951,68 @@ declare namespace Electron {
12935
12951
  *
12936
12952
  * @platform win32
12937
12953
  */
12938
- on(event: 'balloon-click', listener: Function): this;
12954
+ on(event: 'balloon-click', listener: () => void): this;
12939
12955
  /**
12940
12956
  * @platform win32
12941
12957
  */
12942
- off(event: 'balloon-click', listener: Function): this;
12958
+ off(event: 'balloon-click', listener: () => void): this;
12943
12959
  /**
12944
12960
  * @platform win32
12945
12961
  */
12946
- once(event: 'balloon-click', listener: Function): this;
12962
+ once(event: 'balloon-click', listener: () => void): this;
12947
12963
  /**
12948
12964
  * @platform win32
12949
12965
  */
12950
- addListener(event: 'balloon-click', listener: Function): this;
12966
+ addListener(event: 'balloon-click', listener: () => void): this;
12951
12967
  /**
12952
12968
  * @platform win32
12953
12969
  */
12954
- removeListener(event: 'balloon-click', listener: Function): this;
12970
+ removeListener(event: 'balloon-click', listener: () => void): this;
12955
12971
  /**
12956
12972
  * Emitted when the tray balloon is closed because of timeout or user manually
12957
12973
  * closes it.
12958
12974
  *
12959
12975
  * @platform win32
12960
12976
  */
12961
- on(event: 'balloon-closed', listener: Function): this;
12977
+ on(event: 'balloon-closed', listener: () => void): this;
12962
12978
  /**
12963
12979
  * @platform win32
12964
12980
  */
12965
- off(event: 'balloon-closed', listener: Function): this;
12981
+ off(event: 'balloon-closed', listener: () => void): this;
12966
12982
  /**
12967
12983
  * @platform win32
12968
12984
  */
12969
- once(event: 'balloon-closed', listener: Function): this;
12985
+ once(event: 'balloon-closed', listener: () => void): this;
12970
12986
  /**
12971
12987
  * @platform win32
12972
12988
  */
12973
- addListener(event: 'balloon-closed', listener: Function): this;
12989
+ addListener(event: 'balloon-closed', listener: () => void): this;
12974
12990
  /**
12975
12991
  * @platform win32
12976
12992
  */
12977
- removeListener(event: 'balloon-closed', listener: Function): this;
12993
+ removeListener(event: 'balloon-closed', listener: () => void): this;
12978
12994
  /**
12979
12995
  * Emitted when the tray balloon shows.
12980
12996
  *
12981
12997
  * @platform win32
12982
12998
  */
12983
- on(event: 'balloon-show', listener: Function): this;
12999
+ on(event: 'balloon-show', listener: () => void): this;
12984
13000
  /**
12985
13001
  * @platform win32
12986
13002
  */
12987
- off(event: 'balloon-show', listener: Function): this;
13003
+ off(event: 'balloon-show', listener: () => void): this;
12988
13004
  /**
12989
13005
  * @platform win32
12990
13006
  */
12991
- once(event: 'balloon-show', listener: Function): this;
13007
+ once(event: 'balloon-show', listener: () => void): this;
12992
13008
  /**
12993
13009
  * @platform win32
12994
13010
  */
12995
- addListener(event: 'balloon-show', listener: Function): this;
13011
+ addListener(event: 'balloon-show', listener: () => void): this;
12996
13012
  /**
12997
13013
  * @platform win32
12998
13014
  */
12999
- removeListener(event: 'balloon-show', listener: Function): this;
13015
+ removeListener(event: 'balloon-show', listener: () => void): this;
13000
13016
  /**
13001
13017
  * Emitted when the tray icon is clicked.
13002
13018
  *
@@ -13095,89 +13111,89 @@ declare namespace Electron {
13095
13111
  *
13096
13112
  * @platform darwin
13097
13113
  */
13098
- on(event: 'drag-end', listener: Function): this;
13114
+ on(event: 'drag-end', listener: () => void): this;
13099
13115
  /**
13100
13116
  * @platform darwin
13101
13117
  */
13102
- off(event: 'drag-end', listener: Function): this;
13118
+ off(event: 'drag-end', listener: () => void): this;
13103
13119
  /**
13104
13120
  * @platform darwin
13105
13121
  */
13106
- once(event: 'drag-end', listener: Function): this;
13122
+ once(event: 'drag-end', listener: () => void): this;
13107
13123
  /**
13108
13124
  * @platform darwin
13109
13125
  */
13110
- addListener(event: 'drag-end', listener: Function): this;
13126
+ addListener(event: 'drag-end', listener: () => void): this;
13111
13127
  /**
13112
13128
  * @platform darwin
13113
13129
  */
13114
- removeListener(event: 'drag-end', listener: Function): this;
13130
+ removeListener(event: 'drag-end', listener: () => void): this;
13115
13131
  /**
13116
13132
  * Emitted when a drag operation enters the tray icon.
13117
13133
  *
13118
13134
  * @platform darwin
13119
13135
  */
13120
- on(event: 'drag-enter', listener: Function): this;
13136
+ on(event: 'drag-enter', listener: () => void): this;
13121
13137
  /**
13122
13138
  * @platform darwin
13123
13139
  */
13124
- off(event: 'drag-enter', listener: Function): this;
13140
+ off(event: 'drag-enter', listener: () => void): this;
13125
13141
  /**
13126
13142
  * @platform darwin
13127
13143
  */
13128
- once(event: 'drag-enter', listener: Function): this;
13144
+ once(event: 'drag-enter', listener: () => void): this;
13129
13145
  /**
13130
13146
  * @platform darwin
13131
13147
  */
13132
- addListener(event: 'drag-enter', listener: Function): this;
13148
+ addListener(event: 'drag-enter', listener: () => void): this;
13133
13149
  /**
13134
13150
  * @platform darwin
13135
13151
  */
13136
- removeListener(event: 'drag-enter', listener: Function): this;
13152
+ removeListener(event: 'drag-enter', listener: () => void): this;
13137
13153
  /**
13138
13154
  * Emitted when a drag operation exits the tray icon.
13139
13155
  *
13140
13156
  * @platform darwin
13141
13157
  */
13142
- on(event: 'drag-leave', listener: Function): this;
13158
+ on(event: 'drag-leave', listener: () => void): this;
13143
13159
  /**
13144
13160
  * @platform darwin
13145
13161
  */
13146
- off(event: 'drag-leave', listener: Function): this;
13162
+ off(event: 'drag-leave', listener: () => void): this;
13147
13163
  /**
13148
13164
  * @platform darwin
13149
13165
  */
13150
- once(event: 'drag-leave', listener: Function): this;
13166
+ once(event: 'drag-leave', listener: () => void): this;
13151
13167
  /**
13152
13168
  * @platform darwin
13153
13169
  */
13154
- addListener(event: 'drag-leave', listener: Function): this;
13170
+ addListener(event: 'drag-leave', listener: () => void): this;
13155
13171
  /**
13156
13172
  * @platform darwin
13157
13173
  */
13158
- removeListener(event: 'drag-leave', listener: Function): this;
13174
+ removeListener(event: 'drag-leave', listener: () => void): this;
13159
13175
  /**
13160
13176
  * Emitted when any dragged items are dropped on the tray icon.
13161
13177
  *
13162
13178
  * @platform darwin
13163
13179
  */
13164
- on(event: 'drop', listener: Function): this;
13180
+ on(event: 'drop', listener: () => void): this;
13165
13181
  /**
13166
13182
  * @platform darwin
13167
13183
  */
13168
- off(event: 'drop', listener: Function): this;
13184
+ off(event: 'drop', listener: () => void): this;
13169
13185
  /**
13170
13186
  * @platform darwin
13171
13187
  */
13172
- once(event: 'drop', listener: Function): this;
13188
+ once(event: 'drop', listener: () => void): this;
13173
13189
  /**
13174
13190
  * @platform darwin
13175
13191
  */
13176
- addListener(event: 'drop', listener: Function): this;
13192
+ addListener(event: 'drop', listener: () => void): this;
13177
13193
  /**
13178
13194
  * @platform darwin
13179
13195
  */
13180
- removeListener(event: 'drop', listener: Function): this;
13196
+ removeListener(event: 'drop', listener: () => void): this;
13181
13197
  /**
13182
13198
  * Emitted when dragged files are dropped in the tray icon.
13183
13199
  *
@@ -13850,11 +13866,11 @@ declare namespace Electron {
13850
13866
  /**
13851
13867
  * Emitted once the child process has spawned successfully.
13852
13868
  */
13853
- on(event: 'spawn', listener: Function): this;
13854
- off(event: 'spawn', listener: Function): this;
13855
- once(event: 'spawn', listener: Function): this;
13856
- addListener(event: 'spawn', listener: Function): this;
13857
- removeListener(event: 'spawn', listener: Function): this;
13869
+ on(event: 'spawn', listener: () => void): this;
13870
+ off(event: 'spawn', listener: () => void): this;
13871
+ once(event: 'spawn', listener: () => void): this;
13872
+ addListener(event: 'spawn', listener: () => void): this;
13873
+ removeListener(event: 'spawn', listener: () => void): this;
13858
13874
  /**
13859
13875
  * Terminates the process gracefully. On POSIX, it uses SIGTERM but will ensure the
13860
13876
  * process is reaped on exit. This function returns true if the kill is successful,
@@ -13899,11 +13915,11 @@ declare namespace Electron {
13899
13915
  * Emitted when the view's bounds have changed in response to being laid out. The
13900
13916
  * new bounds can be retrieved with `view.getBounds()`.
13901
13917
  */
13902
- on(event: 'bounds-changed', listener: Function): this;
13903
- off(event: 'bounds-changed', listener: Function): this;
13904
- once(event: 'bounds-changed', listener: Function): this;
13905
- addListener(event: 'bounds-changed', listener: Function): this;
13906
- removeListener(event: 'bounds-changed', listener: Function): this;
13918
+ on(event: 'bounds-changed', listener: () => void): this;
13919
+ off(event: 'bounds-changed', listener: () => void): this;
13920
+ once(event: 'bounds-changed', listener: () => void): this;
13921
+ addListener(event: 'bounds-changed', listener: () => void): this;
13922
+ removeListener(event: 'bounds-changed', listener: () => void): this;
13907
13923
  /**
13908
13924
  * View
13909
13925
  */
@@ -13917,6 +13933,10 @@ declare namespace Electron {
13917
13933
  * The bounds of this View, relative to its parent.
13918
13934
  */
13919
13935
  getBounds(): Rectangle;
13936
+ /**
13937
+ * If the view passed as a parameter is not a child of this view, this method is a
13938
+ * no-op.
13939
+ */
13920
13940
  removeChildView(view: View): void;
13921
13941
  /**
13922
13942
  * Examples of valid `color` values:
@@ -14030,11 +14050,11 @@ declare namespace Electron {
14030
14050
  /**
14031
14051
  * Emitted when the `WebContents` loses focus.
14032
14052
  */
14033
- on(event: 'blur', listener: Function): this;
14034
- off(event: 'blur', listener: Function): this;
14035
- once(event: 'blur', listener: Function): this;
14036
- addListener(event: 'blur', listener: Function): this;
14037
- removeListener(event: 'blur', listener: Function): this;
14053
+ on(event: 'blur', listener: () => void): this;
14054
+ off(event: 'blur', listener: () => void): this;
14055
+ once(event: 'blur', listener: () => void): this;
14056
+ addListener(event: 'blur', listener: () => void): this;
14057
+ removeListener(event: 'blur', listener: () => void): this;
14038
14058
  /**
14039
14059
  * Emitted when failed to verify the `certificate` for `url`.
14040
14060
  *
@@ -14302,27 +14322,27 @@ declare namespace Electron {
14302
14322
  /**
14303
14323
  * Emitted when `webContents` is destroyed.
14304
14324
  */
14305
- on(event: 'destroyed', listener: Function): this;
14306
- off(event: 'destroyed', listener: Function): this;
14307
- once(event: 'destroyed', listener: Function): this;
14308
- addListener(event: 'destroyed', listener: Function): this;
14309
- removeListener(event: 'destroyed', listener: Function): this;
14325
+ on(event: 'destroyed', listener: () => void): this;
14326
+ off(event: 'destroyed', listener: () => void): this;
14327
+ once(event: 'destroyed', listener: () => void): this;
14328
+ addListener(event: 'destroyed', listener: () => void): this;
14329
+ removeListener(event: 'destroyed', listener: () => void): this;
14310
14330
  /**
14311
14331
  * Emitted when DevTools is closed.
14312
14332
  */
14313
- on(event: 'devtools-closed', listener: Function): this;
14314
- off(event: 'devtools-closed', listener: Function): this;
14315
- once(event: 'devtools-closed', listener: Function): this;
14316
- addListener(event: 'devtools-closed', listener: Function): this;
14317
- removeListener(event: 'devtools-closed', listener: Function): this;
14333
+ on(event: 'devtools-closed', listener: () => void): this;
14334
+ off(event: 'devtools-closed', listener: () => void): this;
14335
+ once(event: 'devtools-closed', listener: () => void): this;
14336
+ addListener(event: 'devtools-closed', listener: () => void): this;
14337
+ removeListener(event: 'devtools-closed', listener: () => void): this;
14318
14338
  /**
14319
14339
  * Emitted when DevTools is focused / opened.
14320
14340
  */
14321
- on(event: 'devtools-focused', listener: Function): this;
14322
- off(event: 'devtools-focused', listener: Function): this;
14323
- once(event: 'devtools-focused', listener: Function): this;
14324
- addListener(event: 'devtools-focused', listener: Function): this;
14325
- removeListener(event: 'devtools-focused', listener: Function): this;
14341
+ on(event: 'devtools-focused', listener: () => void): this;
14342
+ off(event: 'devtools-focused', listener: () => void): this;
14343
+ once(event: 'devtools-focused', listener: () => void): this;
14344
+ addListener(event: 'devtools-focused', listener: () => void): this;
14345
+ removeListener(event: 'devtools-focused', listener: () => void): this;
14326
14346
  /**
14327
14347
  * Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for
14328
14348
  * a link in its context menu.
@@ -14355,19 +14375,19 @@ declare namespace Electron {
14355
14375
  /**
14356
14376
  * Emitted when DevTools is opened.
14357
14377
  */
14358
- on(event: 'devtools-opened', listener: Function): this;
14359
- off(event: 'devtools-opened', listener: Function): this;
14360
- once(event: 'devtools-opened', listener: Function): this;
14361
- addListener(event: 'devtools-opened', listener: Function): this;
14362
- removeListener(event: 'devtools-opened', listener: Function): this;
14378
+ on(event: 'devtools-opened', listener: () => void): this;
14379
+ off(event: 'devtools-opened', listener: () => void): this;
14380
+ once(event: 'devtools-opened', listener: () => void): this;
14381
+ addListener(event: 'devtools-opened', listener: () => void): this;
14382
+ removeListener(event: 'devtools-opened', listener: () => void): this;
14363
14383
  /**
14364
14384
  * Emitted when the devtools window instructs the webContents to reload
14365
14385
  */
14366
- on(event: 'devtools-reload-page', listener: Function): this;
14367
- off(event: 'devtools-reload-page', listener: Function): this;
14368
- once(event: 'devtools-reload-page', listener: Function): this;
14369
- addListener(event: 'devtools-reload-page', listener: Function): this;
14370
- removeListener(event: 'devtools-reload-page', listener: Function): this;
14386
+ on(event: 'devtools-reload-page', listener: () => void): this;
14387
+ off(event: 'devtools-reload-page', listener: () => void): this;
14388
+ once(event: 'devtools-reload-page', listener: () => void): this;
14389
+ addListener(event: 'devtools-reload-page', listener: () => void): this;
14390
+ removeListener(event: 'devtools-reload-page', listener: () => void): this;
14371
14391
  /**
14372
14392
  * Emitted when 'Search' is selected for text in its context menu.
14373
14393
  */
@@ -14553,11 +14573,11 @@ declare namespace Electron {
14553
14573
  * Emitted when the navigation is done, i.e. the spinner of the tab has stopped
14554
14574
  * spinning, and the `onload` event was dispatched.
14555
14575
  */
14556
- on(event: 'did-finish-load', listener: Function): this;
14557
- off(event: 'did-finish-load', listener: Function): this;
14558
- once(event: 'did-finish-load', listener: Function): this;
14559
- addListener(event: 'did-finish-load', listener: Function): this;
14560
- removeListener(event: 'did-finish-load', listener: Function): this;
14576
+ on(event: 'did-finish-load', listener: () => void): this;
14577
+ off(event: 'did-finish-load', listener: () => void): this;
14578
+ once(event: 'did-finish-load', listener: () => void): this;
14579
+ addListener(event: 'did-finish-load', listener: () => void): this;
14580
+ removeListener(event: 'did-finish-load', listener: () => void): this;
14561
14581
  /**
14562
14582
  * Emitted when a frame has done navigation.
14563
14583
  */
@@ -14857,11 +14877,11 @@ declare namespace Electron {
14857
14877
  /**
14858
14878
  * Corresponds to the points in time when the spinner of the tab started spinning.
14859
14879
  */
14860
- on(event: 'did-start-loading', listener: Function): this;
14861
- off(event: 'did-start-loading', listener: Function): this;
14862
- once(event: 'did-start-loading', listener: Function): this;
14863
- addListener(event: 'did-start-loading', listener: Function): this;
14864
- removeListener(event: 'did-start-loading', listener: Function): this;
14880
+ on(event: 'did-start-loading', listener: () => void): this;
14881
+ off(event: 'did-start-loading', listener: () => void): this;
14882
+ once(event: 'did-start-loading', listener: () => void): this;
14883
+ addListener(event: 'did-start-loading', listener: () => void): this;
14884
+ removeListener(event: 'did-start-loading', listener: () => void): this;
14865
14885
  /**
14866
14886
  * Emitted when any frame (including main) starts navigating.
14867
14887
  */
@@ -14973,27 +14993,27 @@ declare namespace Electron {
14973
14993
  /**
14974
14994
  * Corresponds to the points in time when the spinner of the tab stopped spinning.
14975
14995
  */
14976
- on(event: 'did-stop-loading', listener: Function): this;
14977
- off(event: 'did-stop-loading', listener: Function): this;
14978
- once(event: 'did-stop-loading', listener: Function): this;
14979
- addListener(event: 'did-stop-loading', listener: Function): this;
14980
- removeListener(event: 'did-stop-loading', listener: Function): this;
14996
+ on(event: 'did-stop-loading', listener: () => void): this;
14997
+ off(event: 'did-stop-loading', listener: () => void): this;
14998
+ once(event: 'did-stop-loading', listener: () => void): this;
14999
+ addListener(event: 'did-stop-loading', listener: () => void): this;
15000
+ removeListener(event: 'did-stop-loading', listener: () => void): this;
14981
15001
  /**
14982
15002
  * Emitted when the document in the top-level frame is loaded.
14983
15003
  */
14984
- on(event: 'dom-ready', listener: Function): this;
14985
- off(event: 'dom-ready', listener: Function): this;
14986
- once(event: 'dom-ready', listener: Function): this;
14987
- addListener(event: 'dom-ready', listener: Function): this;
14988
- removeListener(event: 'dom-ready', listener: Function): this;
15004
+ on(event: 'dom-ready', listener: () => void): this;
15005
+ off(event: 'dom-ready', listener: () => void): this;
15006
+ once(event: 'dom-ready', listener: () => void): this;
15007
+ addListener(event: 'dom-ready', listener: () => void): this;
15008
+ removeListener(event: 'dom-ready', listener: () => void): this;
14989
15009
  /**
14990
15010
  * Emitted when the window enters a full-screen state triggered by HTML API.
14991
15011
  */
14992
- on(event: 'enter-html-full-screen', listener: Function): this;
14993
- off(event: 'enter-html-full-screen', listener: Function): this;
14994
- once(event: 'enter-html-full-screen', listener: Function): this;
14995
- addListener(event: 'enter-html-full-screen', listener: Function): this;
14996
- removeListener(event: 'enter-html-full-screen', listener: Function): this;
15012
+ on(event: 'enter-html-full-screen', listener: () => void): this;
15013
+ off(event: 'enter-html-full-screen', listener: () => void): this;
15014
+ once(event: 'enter-html-full-screen', listener: () => void): this;
15015
+ addListener(event: 'enter-html-full-screen', listener: () => void): this;
15016
+ removeListener(event: 'enter-html-full-screen', listener: () => void): this;
14997
15017
  /**
14998
15018
  * Emitted when the `WebContents` gains focus.
14999
15019
  *
@@ -15006,11 +15026,11 @@ declare namespace Electron {
15006
15026
  * focus change between different `WebContents` and `BrowserView` in the same
15007
15027
  * window.
15008
15028
  */
15009
- on(event: 'focus', listener: Function): this;
15010
- off(event: 'focus', listener: Function): this;
15011
- once(event: 'focus', listener: Function): this;
15012
- addListener(event: 'focus', listener: Function): this;
15013
- removeListener(event: 'focus', listener: Function): this;
15029
+ on(event: 'focus', listener: () => void): this;
15030
+ off(event: 'focus', listener: () => void): this;
15031
+ once(event: 'focus', listener: () => void): this;
15032
+ addListener(event: 'focus', listener: () => void): this;
15033
+ removeListener(event: 'focus', listener: () => void): this;
15014
15034
  /**
15015
15035
  * Emitted when a result is available for `webContents.findInPage` request.
15016
15036
  */
@@ -15099,11 +15119,11 @@ declare namespace Electron {
15099
15119
  /**
15100
15120
  * Emitted when the window leaves a full-screen state triggered by HTML API.
15101
15121
  */
15102
- on(event: 'leave-html-full-screen', listener: Function): this;
15103
- off(event: 'leave-html-full-screen', listener: Function): this;
15104
- once(event: 'leave-html-full-screen', listener: Function): this;
15105
- addListener(event: 'leave-html-full-screen', listener: Function): this;
15106
- removeListener(event: 'leave-html-full-screen', listener: Function): this;
15122
+ on(event: 'leave-html-full-screen', listener: () => void): this;
15123
+ off(event: 'leave-html-full-screen', listener: () => void): this;
15124
+ once(event: 'leave-html-full-screen', listener: () => void): this;
15125
+ addListener(event: 'leave-html-full-screen', listener: () => void): this;
15126
+ removeListener(event: 'leave-html-full-screen', listener: () => void): this;
15107
15127
  /**
15108
15128
  * Emitted when `webContents` wants to do basic auth.
15109
15129
  *
@@ -15132,19 +15152,19 @@ declare namespace Electron {
15132
15152
  /**
15133
15153
  * Emitted when media is paused or done playing.
15134
15154
  */
15135
- on(event: 'media-paused', listener: Function): this;
15136
- off(event: 'media-paused', listener: Function): this;
15137
- once(event: 'media-paused', listener: Function): this;
15138
- addListener(event: 'media-paused', listener: Function): this;
15139
- removeListener(event: 'media-paused', listener: Function): this;
15155
+ on(event: 'media-paused', listener: () => void): this;
15156
+ off(event: 'media-paused', listener: () => void): this;
15157
+ once(event: 'media-paused', listener: () => void): this;
15158
+ addListener(event: 'media-paused', listener: () => void): this;
15159
+ removeListener(event: 'media-paused', listener: () => void): this;
15140
15160
  /**
15141
15161
  * Emitted when media starts playing.
15142
15162
  */
15143
- on(event: 'media-started-playing', listener: Function): this;
15144
- off(event: 'media-started-playing', listener: Function): this;
15145
- once(event: 'media-started-playing', listener: Function): this;
15146
- addListener(event: 'media-started-playing', listener: Function): this;
15147
- removeListener(event: 'media-started-playing', listener: Function): this;
15163
+ on(event: 'media-started-playing', listener: () => void): this;
15164
+ off(event: 'media-started-playing', listener: () => void): this;
15165
+ once(event: 'media-started-playing', listener: () => void): this;
15166
+ addListener(event: 'media-started-playing', listener: () => void): this;
15167
+ removeListener(event: 'media-started-playing', listener: () => void): this;
15148
15168
  /**
15149
15169
  * Emitted when page receives favicon urls.
15150
15170
  */
@@ -15316,11 +15336,11 @@ declare namespace Electron {
15316
15336
  /**
15317
15337
  * Emitted when the unresponsive web page becomes responsive again.
15318
15338
  */
15319
- on(event: 'responsive', listener: Function): this;
15320
- off(event: 'responsive', listener: Function): this;
15321
- once(event: 'responsive', listener: Function): this;
15322
- addListener(event: 'responsive', listener: Function): this;
15323
- removeListener(event: 'responsive', listener: Function): this;
15339
+ on(event: 'responsive', listener: () => void): this;
15340
+ off(event: 'responsive', listener: () => void): this;
15341
+ once(event: 'responsive', listener: () => void): this;
15342
+ addListener(event: 'responsive', listener: () => void): this;
15343
+ removeListener(event: 'responsive', listener: () => void): this;
15324
15344
  /**
15325
15345
  * Emitted when a bluetooth device needs to be selected when a call to
15326
15346
  * `navigator.bluetooth.requestDevice` is made. `callback` should be called with
@@ -15379,11 +15399,11 @@ declare namespace Electron {
15379
15399
  /**
15380
15400
  * Emitted when the web page becomes unresponsive.
15381
15401
  */
15382
- on(event: 'unresponsive', listener: Function): this;
15383
- off(event: 'unresponsive', listener: Function): this;
15384
- once(event: 'unresponsive', listener: Function): this;
15385
- addListener(event: 'unresponsive', listener: Function): this;
15386
- removeListener(event: 'unresponsive', listener: Function): this;
15402
+ on(event: 'unresponsive', listener: () => void): this;
15403
+ off(event: 'unresponsive', listener: () => void): this;
15404
+ once(event: 'unresponsive', listener: () => void): this;
15405
+ addListener(event: 'unresponsive', listener: () => void): this;
15406
+ removeListener(event: 'unresponsive', listener: () => void): this;
15387
15407
  /**
15388
15408
  * Emitted when mouse moves over a link or the keyboard moves the focus to a link.
15389
15409
  */
@@ -15779,13 +15799,7 @@ declare namespace Electron {
15779
15799
  *
15780
15800
  * Before:
15781
15801
  *
15782
- * <img width="487" alt="Image Before Text Selection Adjustment"
15783
- * src="../images/web-contents-text-selection-before.png"/>
15784
- *
15785
15802
  * After:
15786
- *
15787
- * <img width="487" alt="Image After Text Selection Adjustment"
15788
- * src="../images/web-contents-text-selection-after.png"/>
15789
15803
  */
15790
15804
  adjustSelection(options: AdjustSelectionOptions): void;
15791
15805
  /**
@@ -16550,11 +16564,11 @@ declare namespace Electron {
16550
16564
  * Emitted when the view's bounds have changed in response to being laid out. The
16551
16565
  * new bounds can be retrieved with `view.getBounds()`.
16552
16566
  */
16553
- on(event: 'bounds-changed', listener: Function): this;
16554
- off(event: 'bounds-changed', listener: Function): this;
16555
- once(event: 'bounds-changed', listener: Function): this;
16556
- addListener(event: 'bounds-changed', listener: Function): this;
16557
- removeListener(event: 'bounds-changed', listener: Function): this;
16567
+ on(event: 'bounds-changed', listener: () => void): this;
16568
+ off(event: 'bounds-changed', listener: () => void): this;
16569
+ once(event: 'bounds-changed', listener: () => void): this;
16570
+ addListener(event: 'bounds-changed', listener: () => void): this;
16571
+ removeListener(event: 'bounds-changed', listener: () => void): this;
16558
16572
  /**
16559
16573
  * WebContentsView
16560
16574
  */
@@ -16773,11 +16787,11 @@ declare namespace Electron {
16773
16787
  /**
16774
16788
  * Emitted when the document is loaded.
16775
16789
  */
16776
- on(event: 'dom-ready', listener: Function): this;
16777
- off(event: 'dom-ready', listener: Function): this;
16778
- once(event: 'dom-ready', listener: Function): this;
16779
- addListener(event: 'dom-ready', listener: Function): this;
16780
- removeListener(event: 'dom-ready', listener: Function): this;
16790
+ on(event: 'dom-ready', listener: () => void): this;
16791
+ off(event: 'dom-ready', listener: () => void): this;
16792
+ once(event: 'dom-ready', listener: () => void): this;
16793
+ addListener(event: 'dom-ready', listener: () => void): this;
16794
+ removeListener(event: 'dom-ready', listener: () => void): this;
16781
16795
  /**
16782
16796
  * A promise that resolves with the result of the executed code or is rejected if
16783
16797
  * execution throws or results in a rejected promise.
@@ -17302,7 +17316,7 @@ declare namespace Electron {
17302
17316
  url?: string;
17303
17317
  }
17304
17318
 
17305
- interface WebUtils extends NodeJS.EventEmitter {
17319
+ interface WebUtils {
17306
17320
 
17307
17321
  // Docs: https://electronjs.org/docs/api/web-utils
17308
17322
 
@@ -18359,12 +18373,12 @@ declare namespace Electron {
18359
18373
  */
18360
18374
  origin?: string;
18361
18375
  /**
18362
- * can be `""`, `no-referrer`, `no-referrer-when-downgrade`, `origin`,
18376
+ * can be "", `no-referrer`, `no-referrer-when-downgrade`, `origin`,
18363
18377
  * `origin-when-cross-origin`, `unsafe-url`, `same-origin`, `strict-origin`, or
18364
18378
  * `strict-origin-when-cross-origin`. Defaults to
18365
18379
  * `strict-origin-when-cross-origin`.
18366
18380
  */
18367
- referrerPolicy?: string;
18381
+ referrerPolicy?: ('' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'unsafe-url' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin');
18368
18382
  /**
18369
18383
  * can be `default`, `no-store`, `reload`, `no-cache`, `force-cache` or
18370
18384
  * `only-if-cached`.
@@ -23419,11 +23433,16 @@ declare namespace NodeJS {
23419
23433
  * Emitted when Electron has loaded its internal initialization script and is
23420
23434
  * beginning to load the web page or the main script.
23421
23435
  */
23422
- on(event: 'loaded', listener: Function): this;
23423
- off(event: 'loaded', listener: Function): this;
23424
- once(event: 'loaded', listener: Function): this;
23425
- addListener(event: 'loaded', listener: Function): this;
23426
- removeListener(event: 'loaded', listener: Function): this;
23436
+ on(event: 'loaded', listener: () => void): this;
23437
+ off(event: 'loaded', listener: () => void): this;
23438
+ once(event: 'loaded', listener: () => void): this;
23439
+ addListener(event: 'loaded', listener: () => void): this;
23440
+ removeListener(event: 'loaded', listener: () => void): this;
23441
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
23442
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
23443
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
23444
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
23445
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
23427
23446
  /**
23428
23447
  * Causes the main thread of the current process crash.
23429
23448
  */