electron 33.0.0-beta.1 → 33.0.0-beta.11

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 33.0.0-beta.1
1
+ // Type definitions for Electron 33.0.0-beta.11
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` or Utility process 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
  *
@@ -1837,19 +1837,19 @@ declare namespace Electron {
1837
1837
  * perform actions before the windows are closed while a process is quitting, as
1838
1838
  * well as listening to `before-quit`.
1839
1839
  */
1840
- on(event: 'before-quit-for-update', listener: Function): this;
1841
- off(event: 'before-quit-for-update', listener: Function): this;
1842
- once(event: 'before-quit-for-update', listener: Function): this;
1843
- addListener(event: 'before-quit-for-update', listener: Function): this;
1844
- removeListener(event: 'before-quit-for-update', listener: Function): this;
1840
+ on(event: 'before-quit-for-update', listener: () => void): this;
1841
+ off(event: 'before-quit-for-update', listener: () => void): this;
1842
+ once(event: 'before-quit-for-update', listener: () => void): this;
1843
+ addListener(event: 'before-quit-for-update', listener: () => void): this;
1844
+ removeListener(event: 'before-quit-for-update', listener: () => void): this;
1845
1845
  /**
1846
1846
  * Emitted when checking if an update has started.
1847
1847
  */
1848
- on(event: 'checking-for-update', listener: Function): this;
1849
- off(event: 'checking-for-update', listener: Function): this;
1850
- once(event: 'checking-for-update', listener: Function): this;
1851
- addListener(event: 'checking-for-update', listener: Function): this;
1852
- removeListener(event: 'checking-for-update', listener: Function): this;
1848
+ on(event: 'checking-for-update', listener: () => void): this;
1849
+ off(event: 'checking-for-update', listener: () => void): this;
1850
+ once(event: 'checking-for-update', listener: () => void): this;
1851
+ addListener(event: 'checking-for-update', listener: () => void): this;
1852
+ removeListener(event: 'checking-for-update', listener: () => void): this;
1853
1853
  /**
1854
1854
  * Emitted when there is an error while updating.
1855
1855
  */
@@ -1862,11 +1862,11 @@ declare namespace Electron {
1862
1862
  * Emitted when there is an available update. The update is downloaded
1863
1863
  * automatically.
1864
1864
  */
1865
- on(event: 'update-available', listener: Function): this;
1866
- off(event: 'update-available', listener: Function): this;
1867
- once(event: 'update-available', listener: Function): this;
1868
- addListener(event: 'update-available', listener: Function): this;
1869
- removeListener(event: 'update-available', listener: Function): this;
1865
+ on(event: 'update-available', listener: () => void): this;
1866
+ off(event: 'update-available', listener: () => void): this;
1867
+ once(event: 'update-available', listener: () => void): this;
1868
+ addListener(event: 'update-available', listener: () => void): this;
1869
+ removeListener(event: 'update-available', listener: () => void): this;
1870
1870
  /**
1871
1871
  * Emitted when an update has been downloaded.
1872
1872
  *
@@ -1903,11 +1903,11 @@ declare namespace Electron {
1903
1903
  /**
1904
1904
  * Emitted when there is no available update.
1905
1905
  */
1906
- on(event: 'update-not-available', listener: Function): this;
1907
- off(event: 'update-not-available', listener: Function): this;
1908
- once(event: 'update-not-available', listener: Function): this;
1909
- addListener(event: 'update-not-available', listener: Function): this;
1910
- removeListener(event: 'update-not-available', listener: Function): this;
1906
+ on(event: 'update-not-available', listener: () => void): this;
1907
+ off(event: 'update-not-available', listener: () => void): this;
1908
+ once(event: 'update-not-available', listener: () => void): this;
1909
+ addListener(event: 'update-not-available', listener: () => void): this;
1910
+ removeListener(event: 'update-not-available', listener: () => void): this;
1911
1911
  /**
1912
1912
  * Asks the server whether there is an update. You must call `setFeedURL` before
1913
1913
  * using this API.
@@ -1997,11 +1997,11 @@ declare namespace Electron {
1997
1997
  /**
1998
1998
  * Emitted when the window loses focus.
1999
1999
  */
2000
- on(event: 'blur', listener: Function): this;
2001
- off(event: 'blur', listener: Function): this;
2002
- once(event: 'blur', listener: Function): this;
2003
- addListener(event: 'blur', listener: Function): this;
2004
- removeListener(event: 'blur', listener: Function): this;
2000
+ on(event: 'blur', listener: (event: Event) => void): this;
2001
+ off(event: 'blur', listener: (event: Event) => void): this;
2002
+ once(event: 'blur', listener: (event: Event) => void): this;
2003
+ addListener(event: 'blur', listener: (event: Event) => void): this;
2004
+ removeListener(event: 'blur', listener: (event: Event) => void): this;
2005
2005
  /**
2006
2006
  * Emitted when the window is going to be closed. It's emitted before the
2007
2007
  * `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()`
@@ -2027,67 +2027,67 @@ declare namespace Electron {
2027
2027
  * Emitted when the window is closed. After you have received this event you should
2028
2028
  * remove the reference to the window and avoid using it any more.
2029
2029
  */
2030
- on(event: 'closed', listener: Function): this;
2031
- off(event: 'closed', listener: Function): this;
2032
- once(event: 'closed', listener: Function): this;
2033
- addListener(event: 'closed', listener: Function): this;
2034
- removeListener(event: 'closed', listener: Function): this;
2030
+ on(event: 'closed', listener: () => void): this;
2031
+ off(event: 'closed', listener: () => void): this;
2032
+ once(event: 'closed', listener: () => void): this;
2033
+ addListener(event: 'closed', listener: () => void): this;
2034
+ removeListener(event: 'closed', listener: () => void): this;
2035
2035
  /**
2036
2036
  * Emitted when the window enters a full-screen state.
2037
2037
  */
2038
- on(event: 'enter-full-screen', listener: Function): this;
2039
- off(event: 'enter-full-screen', listener: Function): this;
2040
- once(event: 'enter-full-screen', listener: Function): this;
2041
- addListener(event: 'enter-full-screen', listener: Function): this;
2042
- removeListener(event: 'enter-full-screen', listener: Function): this;
2038
+ on(event: 'enter-full-screen', listener: () => void): this;
2039
+ off(event: 'enter-full-screen', listener: () => void): this;
2040
+ once(event: 'enter-full-screen', listener: () => void): this;
2041
+ addListener(event: 'enter-full-screen', listener: () => void): this;
2042
+ removeListener(event: 'enter-full-screen', listener: () => void): this;
2043
2043
  /**
2044
2044
  * Emitted when the window gains focus.
2045
2045
  */
2046
- on(event: 'focus', listener: Function): this;
2047
- off(event: 'focus', listener: Function): this;
2048
- once(event: 'focus', listener: Function): this;
2049
- addListener(event: 'focus', listener: Function): this;
2050
- removeListener(event: 'focus', listener: Function): this;
2046
+ on(event: 'focus', listener: (event: Event) => void): this;
2047
+ off(event: 'focus', listener: (event: Event) => void): this;
2048
+ once(event: 'focus', listener: (event: Event) => void): this;
2049
+ addListener(event: 'focus', listener: (event: Event) => void): this;
2050
+ removeListener(event: 'focus', listener: (event: Event) => void): this;
2051
2051
  /**
2052
2052
  * Emitted when the window is hidden.
2053
2053
  */
2054
- on(event: 'hide', listener: Function): this;
2055
- off(event: 'hide', listener: Function): this;
2056
- once(event: 'hide', listener: Function): this;
2057
- addListener(event: 'hide', listener: Function): this;
2058
- removeListener(event: 'hide', listener: Function): this;
2054
+ on(event: 'hide', listener: () => void): this;
2055
+ off(event: 'hide', listener: () => void): this;
2056
+ once(event: 'hide', listener: () => void): this;
2057
+ addListener(event: 'hide', listener: () => void): this;
2058
+ removeListener(event: 'hide', listener: () => void): this;
2059
2059
  /**
2060
2060
  * Emitted when the window leaves a full-screen state.
2061
2061
  */
2062
- on(event: 'leave-full-screen', listener: Function): this;
2063
- off(event: 'leave-full-screen', listener: Function): this;
2064
- once(event: 'leave-full-screen', listener: Function): this;
2065
- addListener(event: 'leave-full-screen', listener: Function): this;
2066
- removeListener(event: 'leave-full-screen', listener: Function): this;
2062
+ on(event: 'leave-full-screen', listener: () => void): this;
2063
+ off(event: 'leave-full-screen', listener: () => void): this;
2064
+ once(event: 'leave-full-screen', listener: () => void): this;
2065
+ addListener(event: 'leave-full-screen', listener: () => void): this;
2066
+ removeListener(event: 'leave-full-screen', listener: () => void): this;
2067
2067
  /**
2068
2068
  * Emitted when window is maximized.
2069
2069
  */
2070
- on(event: 'maximize', listener: Function): this;
2071
- off(event: 'maximize', listener: Function): this;
2072
- once(event: 'maximize', listener: Function): this;
2073
- addListener(event: 'maximize', listener: Function): this;
2074
- removeListener(event: 'maximize', listener: Function): this;
2070
+ on(event: 'maximize', listener: () => void): this;
2071
+ off(event: 'maximize', listener: () => void): this;
2072
+ once(event: 'maximize', listener: () => void): this;
2073
+ addListener(event: 'maximize', listener: () => void): this;
2074
+ removeListener(event: 'maximize', listener: () => void): this;
2075
2075
  /**
2076
2076
  * Emitted when the window is minimized.
2077
2077
  */
2078
- on(event: 'minimize', listener: Function): this;
2079
- off(event: 'minimize', listener: Function): this;
2080
- once(event: 'minimize', listener: Function): this;
2081
- addListener(event: 'minimize', listener: Function): this;
2082
- removeListener(event: 'minimize', listener: Function): this;
2078
+ on(event: 'minimize', listener: () => void): this;
2079
+ off(event: 'minimize', listener: () => void): this;
2080
+ once(event: 'minimize', listener: () => void): this;
2081
+ addListener(event: 'minimize', listener: () => void): this;
2082
+ removeListener(event: 'minimize', listener: () => void): this;
2083
2083
  /**
2084
2084
  * Emitted when the window is being moved to a new position.
2085
2085
  */
2086
- on(event: 'move', listener: Function): this;
2087
- off(event: 'move', listener: Function): this;
2088
- once(event: 'move', listener: Function): this;
2089
- addListener(event: 'move', listener: Function): this;
2090
- removeListener(event: 'move', listener: Function): this;
2086
+ on(event: 'move', listener: () => void): this;
2087
+ off(event: 'move', listener: () => void): this;
2088
+ once(event: 'move', listener: () => void): this;
2089
+ addListener(event: 'move', listener: () => void): this;
2090
+ removeListener(event: 'move', listener: () => void): this;
2091
2091
  /**
2092
2092
  * Emitted once when the window is moved to a new position.
2093
2093
  *
@@ -2095,53 +2095,53 @@ declare namespace Electron {
2095
2095
  *
2096
2096
  * @platform darwin,win32
2097
2097
  */
2098
- on(event: 'moved', listener: Function): this;
2098
+ on(event: 'moved', listener: () => void): this;
2099
2099
  /**
2100
2100
  * @platform darwin,win32
2101
2101
  */
2102
- off(event: 'moved', listener: Function): this;
2102
+ off(event: 'moved', listener: () => void): this;
2103
2103
  /**
2104
2104
  * @platform darwin,win32
2105
2105
  */
2106
- once(event: 'moved', listener: Function): this;
2106
+ once(event: 'moved', listener: () => void): this;
2107
2107
  /**
2108
2108
  * @platform darwin,win32
2109
2109
  */
2110
- addListener(event: 'moved', listener: Function): this;
2110
+ addListener(event: 'moved', listener: () => void): this;
2111
2111
  /**
2112
2112
  * @platform darwin,win32
2113
2113
  */
2114
- removeListener(event: 'moved', listener: Function): this;
2114
+ removeListener(event: 'moved', listener: () => void): this;
2115
2115
  /**
2116
2116
  * Emitted when the native new tab button is clicked.
2117
2117
  *
2118
2118
  * @platform darwin
2119
2119
  */
2120
- on(event: 'new-window-for-tab', listener: Function): this;
2120
+ on(event: 'new-window-for-tab', listener: () => void): this;
2121
2121
  /**
2122
2122
  * @platform darwin
2123
2123
  */
2124
- off(event: 'new-window-for-tab', listener: Function): this;
2124
+ off(event: 'new-window-for-tab', listener: () => void): this;
2125
2125
  /**
2126
2126
  * @platform darwin
2127
2127
  */
2128
- once(event: 'new-window-for-tab', listener: Function): this;
2128
+ once(event: 'new-window-for-tab', listener: () => void): this;
2129
2129
  /**
2130
2130
  * @platform darwin
2131
2131
  */
2132
- addListener(event: 'new-window-for-tab', listener: Function): this;
2132
+ addListener(event: 'new-window-for-tab', listener: () => void): this;
2133
2133
  /**
2134
2134
  * @platform darwin
2135
2135
  */
2136
- removeListener(event: 'new-window-for-tab', listener: Function): this;
2136
+ removeListener(event: 'new-window-for-tab', listener: () => void): this;
2137
2137
  /**
2138
2138
  * Emitted after the window has been resized.
2139
2139
  */
2140
- on(event: 'resize', listener: Function): this;
2141
- off(event: 'resize', listener: Function): this;
2142
- once(event: 'resize', listener: Function): this;
2143
- addListener(event: 'resize', listener: Function): this;
2144
- removeListener(event: 'resize', listener: Function): this;
2140
+ on(event: 'resize', listener: () => void): this;
2141
+ off(event: 'resize', listener: () => void): this;
2142
+ once(event: 'resize', listener: () => void): this;
2143
+ addListener(event: 'resize', listener: () => void): this;
2144
+ removeListener(event: 'resize', listener: () => void): this;
2145
2145
  /**
2146
2146
  * Emitted once when the window has finished being resized.
2147
2147
  *
@@ -2151,31 +2151,31 @@ declare namespace Electron {
2151
2151
  *
2152
2152
  * @platform darwin,win32
2153
2153
  */
2154
- on(event: 'resized', listener: Function): this;
2154
+ on(event: 'resized', listener: () => void): this;
2155
2155
  /**
2156
2156
  * @platform darwin,win32
2157
2157
  */
2158
- off(event: 'resized', listener: Function): this;
2158
+ off(event: 'resized', listener: () => void): this;
2159
2159
  /**
2160
2160
  * @platform darwin,win32
2161
2161
  */
2162
- once(event: 'resized', listener: Function): this;
2162
+ once(event: 'resized', listener: () => void): this;
2163
2163
  /**
2164
2164
  * @platform darwin,win32
2165
2165
  */
2166
- addListener(event: 'resized', listener: Function): this;
2166
+ addListener(event: 'resized', listener: () => void): this;
2167
2167
  /**
2168
2168
  * @platform darwin,win32
2169
2169
  */
2170
- removeListener(event: 'resized', listener: Function): this;
2170
+ removeListener(event: 'resized', listener: () => void): this;
2171
2171
  /**
2172
2172
  * Emitted when the window is restored from a minimized state.
2173
2173
  */
2174
- on(event: 'restore', listener: Function): this;
2175
- off(event: 'restore', listener: Function): this;
2176
- once(event: 'restore', listener: Function): this;
2177
- addListener(event: 'restore', listener: Function): this;
2178
- removeListener(event: 'restore', listener: Function): this;
2174
+ on(event: 'restore', listener: () => void): this;
2175
+ off(event: 'restore', listener: () => void): this;
2176
+ once(event: 'restore', listener: () => void): this;
2177
+ addListener(event: 'restore', listener: () => void): this;
2178
+ removeListener(event: 'restore', listener: () => void): this;
2179
2179
  /**
2180
2180
  * Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
2181
2181
  * is ended. The `rotation` value on each emission is the angle in degrees rotated
@@ -2213,75 +2213,75 @@ declare namespace Electron {
2213
2213
  *
2214
2214
  * @platform win32
2215
2215
  */
2216
- on(event: 'session-end', listener: Function): this;
2216
+ on(event: 'session-end', listener: () => void): this;
2217
2217
  /**
2218
2218
  * @platform win32
2219
2219
  */
2220
- off(event: 'session-end', listener: Function): this;
2220
+ off(event: 'session-end', listener: () => void): this;
2221
2221
  /**
2222
2222
  * @platform win32
2223
2223
  */
2224
- once(event: 'session-end', listener: Function): this;
2224
+ once(event: 'session-end', listener: () => void): this;
2225
2225
  /**
2226
2226
  * @platform win32
2227
2227
  */
2228
- addListener(event: 'session-end', listener: Function): this;
2228
+ addListener(event: 'session-end', listener: () => void): this;
2229
2229
  /**
2230
2230
  * @platform win32
2231
2231
  */
2232
- removeListener(event: 'session-end', listener: Function): this;
2232
+ removeListener(event: 'session-end', listener: () => void): this;
2233
2233
  /**
2234
2234
  * Emitted when the window opens a sheet.
2235
2235
  *
2236
2236
  * @platform darwin
2237
2237
  */
2238
- on(event: 'sheet-begin', listener: Function): this;
2238
+ on(event: 'sheet-begin', listener: () => void): this;
2239
2239
  /**
2240
2240
  * @platform darwin
2241
2241
  */
2242
- off(event: 'sheet-begin', listener: Function): this;
2242
+ off(event: 'sheet-begin', listener: () => void): this;
2243
2243
  /**
2244
2244
  * @platform darwin
2245
2245
  */
2246
- once(event: 'sheet-begin', listener: Function): this;
2246
+ once(event: 'sheet-begin', listener: () => void): this;
2247
2247
  /**
2248
2248
  * @platform darwin
2249
2249
  */
2250
- addListener(event: 'sheet-begin', listener: Function): this;
2250
+ addListener(event: 'sheet-begin', listener: () => void): this;
2251
2251
  /**
2252
2252
  * @platform darwin
2253
2253
  */
2254
- removeListener(event: 'sheet-begin', listener: Function): this;
2254
+ removeListener(event: 'sheet-begin', listener: () => void): this;
2255
2255
  /**
2256
2256
  * Emitted when the window has closed a sheet.
2257
2257
  *
2258
2258
  * @platform darwin
2259
2259
  */
2260
- on(event: 'sheet-end', listener: Function): this;
2260
+ on(event: 'sheet-end', listener: () => void): this;
2261
2261
  /**
2262
2262
  * @platform darwin
2263
2263
  */
2264
- off(event: 'sheet-end', listener: Function): this;
2264
+ off(event: 'sheet-end', listener: () => void): this;
2265
2265
  /**
2266
2266
  * @platform darwin
2267
2267
  */
2268
- once(event: 'sheet-end', listener: Function): this;
2268
+ once(event: 'sheet-end', listener: () => void): this;
2269
2269
  /**
2270
2270
  * @platform darwin
2271
2271
  */
2272
- addListener(event: 'sheet-end', listener: Function): this;
2272
+ addListener(event: 'sheet-end', listener: () => void): this;
2273
2273
  /**
2274
2274
  * @platform darwin
2275
2275
  */
2276
- removeListener(event: 'sheet-end', listener: Function): this;
2276
+ removeListener(event: 'sheet-end', listener: () => void): this;
2277
2277
  /**
2278
2278
  * Emitted when the window is shown.
2279
2279
  */
2280
- on(event: 'show', listener: Function): this;
2281
- off(event: 'show', listener: Function): this;
2282
- once(event: 'show', listener: Function): this;
2283
- addListener(event: 'show', listener: Function): this;
2284
- removeListener(event: 'show', listener: Function): this;
2280
+ on(event: 'show', listener: () => void): this;
2281
+ off(event: 'show', listener: () => void): this;
2282
+ once(event: 'show', listener: () => void): this;
2283
+ addListener(event: 'show', listener: () => void): this;
2284
+ removeListener(event: 'show', listener: () => void): this;
2285
2285
  /**
2286
2286
  * Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
2287
2287
  * `left`.
@@ -2367,11 +2367,11 @@ declare namespace Electron {
2367
2367
  /**
2368
2368
  * Emitted when the window exits from a maximized state.
2369
2369
  */
2370
- on(event: 'unmaximize', listener: Function): this;
2371
- off(event: 'unmaximize', listener: Function): this;
2372
- once(event: 'unmaximize', listener: Function): this;
2373
- addListener(event: 'unmaximize', listener: Function): this;
2374
- removeListener(event: 'unmaximize', listener: Function): this;
2370
+ on(event: 'unmaximize', listener: () => void): this;
2371
+ off(event: 'unmaximize', listener: () => void): this;
2372
+ once(event: 'unmaximize', listener: () => void): this;
2373
+ addListener(event: 'unmaximize', listener: () => void): this;
2374
+ removeListener(event: 'unmaximize', listener: () => void): this;
2375
2375
  /**
2376
2376
  * Emitted before the window is moved. On Windows, calling `event.preventDefault()`
2377
2377
  * will prevent the window from being moved.
@@ -2883,7 +2883,7 @@ declare namespace Electron {
2883
2883
  * setting this, the window is still a normal window, not a toolbox window which
2884
2884
  * can not be focused on.
2885
2885
  */
2886
- setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
2886
+ setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | 'dock', relativeLevel?: number): void;
2887
2887
  /**
2888
2888
  * Sets the properties for the window's taskbar button.
2889
2889
  *
@@ -3960,19 +3960,19 @@ declare namespace Electron {
3960
3960
  /**
3961
3961
  * Emitted when the window loses focus.
3962
3962
  */
3963
- on(event: 'blur', listener: Function): this;
3964
- off(event: 'blur', listener: Function): this;
3965
- once(event: 'blur', listener: Function): this;
3966
- addListener(event: 'blur', listener: Function): this;
3967
- removeListener(event: 'blur', listener: Function): this;
3963
+ on(event: 'blur', listener: () => void): this;
3964
+ off(event: 'blur', listener: () => void): this;
3965
+ once(event: 'blur', listener: () => void): this;
3966
+ addListener(event: 'blur', listener: () => void): this;
3967
+ removeListener(event: 'blur', listener: () => void): this;
3968
3968
  /**
3969
3969
  * Emitted when the window loses focus.
3970
3970
  */
3971
- on(event: 'blur', listener: Function): this;
3972
- off(event: 'blur', listener: Function): this;
3973
- once(event: 'blur', listener: Function): this;
3974
- addListener(event: 'blur', listener: Function): this;
3975
- removeListener(event: 'blur', listener: Function): this;
3971
+ on(event: 'blur', listener: (event: Event) => void): this;
3972
+ off(event: 'blur', listener: (event: Event) => void): this;
3973
+ once(event: 'blur', listener: (event: Event) => void): this;
3974
+ addListener(event: 'blur', listener: (event: Event) => void): this;
3975
+ removeListener(event: 'blur', listener: (event: Event) => void): this;
3976
3976
  /**
3977
3977
  * Emitted when the window is going to be closed. It's emitted before the
3978
3978
  * `beforeunload` and `unload` event of the DOM. Calling `event.preventDefault()`
@@ -4019,148 +4019,148 @@ declare namespace Electron {
4019
4019
  * Emitted when the window is closed. After you have received this event you should
4020
4020
  * remove the reference to the window and avoid using it any more.
4021
4021
  */
4022
- on(event: 'closed', listener: Function): this;
4023
- off(event: 'closed', listener: Function): this;
4024
- once(event: 'closed', listener: Function): this;
4025
- addListener(event: 'closed', listener: Function): this;
4026
- removeListener(event: 'closed', listener: Function): this;
4022
+ on(event: 'closed', listener: () => void): this;
4023
+ off(event: 'closed', listener: () => void): this;
4024
+ once(event: 'closed', listener: () => void): this;
4025
+ addListener(event: 'closed', listener: () => void): this;
4026
+ removeListener(event: 'closed', listener: () => void): this;
4027
4027
  /**
4028
4028
  * Emitted when the window is closed. After you have received this event you should
4029
4029
  * remove the reference to the window and avoid using it any more.
4030
4030
  */
4031
- on(event: 'closed', listener: Function): this;
4032
- off(event: 'closed', listener: Function): this;
4033
- once(event: 'closed', listener: Function): this;
4034
- addListener(event: 'closed', listener: Function): this;
4035
- removeListener(event: 'closed', listener: Function): this;
4031
+ on(event: 'closed', listener: () => void): this;
4032
+ off(event: 'closed', listener: () => void): this;
4033
+ once(event: 'closed', listener: () => void): this;
4034
+ addListener(event: 'closed', listener: () => void): this;
4035
+ removeListener(event: 'closed', listener: () => void): this;
4036
4036
  /**
4037
4037
  * Emitted when the window enters a full-screen state.
4038
4038
  */
4039
- on(event: 'enter-full-screen', listener: Function): this;
4040
- off(event: 'enter-full-screen', listener: Function): this;
4041
- once(event: 'enter-full-screen', listener: Function): this;
4042
- addListener(event: 'enter-full-screen', listener: Function): this;
4043
- removeListener(event: 'enter-full-screen', listener: Function): this;
4039
+ on(event: 'enter-full-screen', listener: () => void): this;
4040
+ off(event: 'enter-full-screen', listener: () => void): this;
4041
+ once(event: 'enter-full-screen', listener: () => void): this;
4042
+ addListener(event: 'enter-full-screen', listener: () => void): this;
4043
+ removeListener(event: 'enter-full-screen', listener: () => void): this;
4044
4044
  /**
4045
4045
  * Emitted when the window enters a full-screen state.
4046
4046
  */
4047
- on(event: 'enter-full-screen', listener: Function): this;
4048
- off(event: 'enter-full-screen', listener: Function): this;
4049
- once(event: 'enter-full-screen', listener: Function): this;
4050
- addListener(event: 'enter-full-screen', listener: Function): this;
4051
- removeListener(event: 'enter-full-screen', listener: Function): this;
4047
+ on(event: 'enter-full-screen', listener: () => void): this;
4048
+ off(event: 'enter-full-screen', listener: () => void): this;
4049
+ once(event: 'enter-full-screen', listener: () => void): this;
4050
+ addListener(event: 'enter-full-screen', listener: () => void): this;
4051
+ removeListener(event: 'enter-full-screen', listener: () => void): this;
4052
4052
  /**
4053
4053
  * Emitted when the window enters a full-screen state triggered by HTML API.
4054
4054
  */
4055
- on(event: 'enter-html-full-screen', listener: Function): this;
4056
- off(event: 'enter-html-full-screen', listener: Function): this;
4057
- once(event: 'enter-html-full-screen', listener: Function): this;
4058
- addListener(event: 'enter-html-full-screen', listener: Function): this;
4059
- removeListener(event: 'enter-html-full-screen', listener: Function): this;
4055
+ on(event: 'enter-html-full-screen', listener: () => void): this;
4056
+ off(event: 'enter-html-full-screen', listener: () => void): this;
4057
+ once(event: 'enter-html-full-screen', listener: () => void): this;
4058
+ addListener(event: 'enter-html-full-screen', listener: () => void): this;
4059
+ removeListener(event: 'enter-html-full-screen', listener: () => void): this;
4060
4060
  /**
4061
4061
  * Emitted when the window gains focus.
4062
4062
  */
4063
- on(event: 'focus', listener: Function): this;
4064
- off(event: 'focus', listener: Function): this;
4065
- once(event: 'focus', listener: Function): this;
4066
- addListener(event: 'focus', listener: Function): this;
4067
- removeListener(event: 'focus', listener: Function): this;
4063
+ on(event: 'focus', listener: () => void): this;
4064
+ off(event: 'focus', listener: () => void): this;
4065
+ once(event: 'focus', listener: () => void): this;
4066
+ addListener(event: 'focus', listener: () => void): this;
4067
+ removeListener(event: 'focus', listener: () => void): this;
4068
4068
  /**
4069
4069
  * Emitted when the window gains focus.
4070
4070
  */
4071
- on(event: 'focus', listener: Function): this;
4072
- off(event: 'focus', listener: Function): this;
4073
- once(event: 'focus', listener: Function): this;
4074
- addListener(event: 'focus', listener: Function): this;
4075
- removeListener(event: 'focus', listener: Function): this;
4071
+ on(event: 'focus', listener: (event: Event) => void): this;
4072
+ off(event: 'focus', listener: (event: Event) => void): this;
4073
+ once(event: 'focus', listener: (event: Event) => void): this;
4074
+ addListener(event: 'focus', listener: (event: Event) => void): this;
4075
+ removeListener(event: 'focus', listener: (event: Event) => void): this;
4076
4076
  /**
4077
4077
  * Emitted when the window is hidden.
4078
4078
  */
4079
- on(event: 'hide', listener: Function): this;
4080
- off(event: 'hide', listener: Function): this;
4081
- once(event: 'hide', listener: Function): this;
4082
- addListener(event: 'hide', listener: Function): this;
4083
- removeListener(event: 'hide', listener: Function): this;
4079
+ on(event: 'hide', listener: () => void): this;
4080
+ off(event: 'hide', listener: () => void): this;
4081
+ once(event: 'hide', listener: () => void): this;
4082
+ addListener(event: 'hide', listener: () => void): this;
4083
+ removeListener(event: 'hide', listener: () => void): this;
4084
4084
  /**
4085
4085
  * Emitted when the window is hidden.
4086
4086
  */
4087
- on(event: 'hide', listener: Function): this;
4088
- off(event: 'hide', listener: Function): this;
4089
- once(event: 'hide', listener: Function): this;
4090
- addListener(event: 'hide', listener: Function): this;
4091
- removeListener(event: 'hide', listener: Function): this;
4087
+ on(event: 'hide', listener: () => void): this;
4088
+ off(event: 'hide', listener: () => void): this;
4089
+ once(event: 'hide', listener: () => void): this;
4090
+ addListener(event: 'hide', listener: () => void): this;
4091
+ removeListener(event: 'hide', listener: () => void): this;
4092
4092
  /**
4093
4093
  * Emitted when the window leaves a full-screen state.
4094
4094
  */
4095
- on(event: 'leave-full-screen', listener: Function): this;
4096
- off(event: 'leave-full-screen', listener: Function): this;
4097
- once(event: 'leave-full-screen', listener: Function): this;
4098
- addListener(event: 'leave-full-screen', listener: Function): this;
4099
- removeListener(event: 'leave-full-screen', listener: Function): this;
4095
+ on(event: 'leave-full-screen', listener: () => void): this;
4096
+ off(event: 'leave-full-screen', listener: () => void): this;
4097
+ once(event: 'leave-full-screen', listener: () => void): this;
4098
+ addListener(event: 'leave-full-screen', listener: () => void): this;
4099
+ removeListener(event: 'leave-full-screen', listener: () => void): this;
4100
4100
  /**
4101
4101
  * Emitted when the window leaves a full-screen state.
4102
4102
  */
4103
- on(event: 'leave-full-screen', listener: Function): this;
4104
- off(event: 'leave-full-screen', listener: Function): this;
4105
- once(event: 'leave-full-screen', listener: Function): this;
4106
- addListener(event: 'leave-full-screen', listener: Function): this;
4107
- removeListener(event: 'leave-full-screen', listener: Function): this;
4103
+ on(event: 'leave-full-screen', listener: () => void): this;
4104
+ off(event: 'leave-full-screen', listener: () => void): this;
4105
+ once(event: 'leave-full-screen', listener: () => void): this;
4106
+ addListener(event: 'leave-full-screen', listener: () => void): this;
4107
+ removeListener(event: 'leave-full-screen', listener: () => void): this;
4108
4108
  /**
4109
4109
  * Emitted when the window leaves a full-screen state triggered by HTML API.
4110
4110
  */
4111
- on(event: 'leave-html-full-screen', listener: Function): this;
4112
- off(event: 'leave-html-full-screen', listener: Function): this;
4113
- once(event: 'leave-html-full-screen', listener: Function): this;
4114
- addListener(event: 'leave-html-full-screen', listener: Function): this;
4115
- removeListener(event: 'leave-html-full-screen', listener: Function): this;
4111
+ on(event: 'leave-html-full-screen', listener: () => void): this;
4112
+ off(event: 'leave-html-full-screen', listener: () => void): this;
4113
+ once(event: 'leave-html-full-screen', listener: () => void): this;
4114
+ addListener(event: 'leave-html-full-screen', listener: () => void): this;
4115
+ removeListener(event: 'leave-html-full-screen', listener: () => void): this;
4116
4116
  /**
4117
4117
  * Emitted when window is maximized.
4118
4118
  */
4119
- on(event: 'maximize', listener: Function): this;
4120
- off(event: 'maximize', listener: Function): this;
4121
- once(event: 'maximize', listener: Function): this;
4122
- addListener(event: 'maximize', listener: Function): this;
4123
- removeListener(event: 'maximize', listener: Function): this;
4119
+ on(event: 'maximize', listener: () => void): this;
4120
+ off(event: 'maximize', listener: () => void): this;
4121
+ once(event: 'maximize', listener: () => void): this;
4122
+ addListener(event: 'maximize', listener: () => void): this;
4123
+ removeListener(event: 'maximize', listener: () => void): this;
4124
4124
  /**
4125
4125
  * Emitted when window is maximized.
4126
4126
  */
4127
- on(event: 'maximize', listener: Function): this;
4128
- off(event: 'maximize', listener: Function): this;
4129
- once(event: 'maximize', listener: Function): this;
4130
- addListener(event: 'maximize', listener: Function): this;
4131
- removeListener(event: 'maximize', listener: Function): this;
4127
+ on(event: 'maximize', listener: () => void): this;
4128
+ off(event: 'maximize', listener: () => void): this;
4129
+ once(event: 'maximize', listener: () => void): this;
4130
+ addListener(event: 'maximize', listener: () => void): this;
4131
+ removeListener(event: 'maximize', listener: () => void): this;
4132
4132
  /**
4133
4133
  * Emitted when the window is minimized.
4134
4134
  */
4135
- on(event: 'minimize', listener: Function): this;
4136
- off(event: 'minimize', listener: Function): this;
4137
- once(event: 'minimize', listener: Function): this;
4138
- addListener(event: 'minimize', listener: Function): this;
4139
- removeListener(event: 'minimize', listener: Function): this;
4135
+ on(event: 'minimize', listener: () => void): this;
4136
+ off(event: 'minimize', listener: () => void): this;
4137
+ once(event: 'minimize', listener: () => void): this;
4138
+ addListener(event: 'minimize', listener: () => void): this;
4139
+ removeListener(event: 'minimize', listener: () => void): this;
4140
4140
  /**
4141
4141
  * Emitted when the window is minimized.
4142
4142
  */
4143
- on(event: 'minimize', listener: Function): this;
4144
- off(event: 'minimize', listener: Function): this;
4145
- once(event: 'minimize', listener: Function): this;
4146
- addListener(event: 'minimize', listener: Function): this;
4147
- removeListener(event: 'minimize', listener: Function): this;
4143
+ on(event: 'minimize', listener: () => void): this;
4144
+ off(event: 'minimize', listener: () => void): this;
4145
+ once(event: 'minimize', listener: () => void): this;
4146
+ addListener(event: 'minimize', listener: () => void): this;
4147
+ removeListener(event: 'minimize', listener: () => void): this;
4148
4148
  /**
4149
4149
  * Emitted when the window is being moved to a new position.
4150
4150
  */
4151
- on(event: 'move', listener: Function): this;
4152
- off(event: 'move', listener: Function): this;
4153
- once(event: 'move', listener: Function): this;
4154
- addListener(event: 'move', listener: Function): this;
4155
- removeListener(event: 'move', listener: Function): this;
4151
+ on(event: 'move', listener: () => void): this;
4152
+ off(event: 'move', listener: () => void): this;
4153
+ once(event: 'move', listener: () => void): this;
4154
+ addListener(event: 'move', listener: () => void): this;
4155
+ removeListener(event: 'move', listener: () => void): this;
4156
4156
  /**
4157
4157
  * Emitted when the window is being moved to a new position.
4158
4158
  */
4159
- on(event: 'move', listener: Function): this;
4160
- off(event: 'move', listener: Function): this;
4161
- once(event: 'move', listener: Function): this;
4162
- addListener(event: 'move', listener: Function): this;
4163
- removeListener(event: 'move', listener: Function): this;
4159
+ on(event: 'move', listener: () => void): this;
4160
+ off(event: 'move', listener: () => void): this;
4161
+ once(event: 'move', listener: () => void): this;
4162
+ addListener(event: 'move', listener: () => void): this;
4163
+ removeListener(event: 'move', listener: () => void): this;
4164
4164
  /**
4165
4165
  * Emitted once when the window is moved to a new position.
4166
4166
  *
@@ -4168,23 +4168,23 @@ declare namespace Electron {
4168
4168
  *
4169
4169
  * @platform darwin,win32
4170
4170
  */
4171
- on(event: 'moved', listener: Function): this;
4171
+ on(event: 'moved', listener: () => void): this;
4172
4172
  /**
4173
4173
  * @platform darwin,win32
4174
4174
  */
4175
- off(event: 'moved', listener: Function): this;
4175
+ off(event: 'moved', listener: () => void): this;
4176
4176
  /**
4177
4177
  * @platform darwin,win32
4178
4178
  */
4179
- once(event: 'moved', listener: Function): this;
4179
+ once(event: 'moved', listener: () => void): this;
4180
4180
  /**
4181
4181
  * @platform darwin,win32
4182
4182
  */
4183
- addListener(event: 'moved', listener: Function): this;
4183
+ addListener(event: 'moved', listener: () => void): this;
4184
4184
  /**
4185
4185
  * @platform darwin,win32
4186
4186
  */
4187
- removeListener(event: 'moved', listener: Function): this;
4187
+ removeListener(event: 'moved', listener: () => void): this;
4188
4188
  /**
4189
4189
  * Emitted once when the window is moved to a new position.
4190
4190
  *
@@ -4192,67 +4192,67 @@ declare namespace Electron {
4192
4192
  *
4193
4193
  * @platform darwin,win32
4194
4194
  */
4195
- on(event: 'moved', listener: Function): this;
4195
+ on(event: 'moved', listener: () => void): this;
4196
4196
  /**
4197
4197
  * @platform darwin,win32
4198
4198
  */
4199
- off(event: 'moved', listener: Function): this;
4199
+ off(event: 'moved', listener: () => void): this;
4200
4200
  /**
4201
4201
  * @platform darwin,win32
4202
4202
  */
4203
- once(event: 'moved', listener: Function): this;
4203
+ once(event: 'moved', listener: () => void): this;
4204
4204
  /**
4205
4205
  * @platform darwin,win32
4206
4206
  */
4207
- addListener(event: 'moved', listener: Function): this;
4207
+ addListener(event: 'moved', listener: () => void): this;
4208
4208
  /**
4209
4209
  * @platform darwin,win32
4210
4210
  */
4211
- removeListener(event: 'moved', listener: Function): this;
4211
+ removeListener(event: 'moved', listener: () => void): this;
4212
4212
  /**
4213
4213
  * Emitted when the native new tab button is clicked.
4214
4214
  *
4215
4215
  * @platform darwin
4216
4216
  */
4217
- on(event: 'new-window-for-tab', listener: Function): this;
4217
+ on(event: 'new-window-for-tab', listener: () => void): this;
4218
4218
  /**
4219
4219
  * @platform darwin
4220
4220
  */
4221
- off(event: 'new-window-for-tab', listener: Function): this;
4221
+ off(event: 'new-window-for-tab', listener: () => void): this;
4222
4222
  /**
4223
4223
  * @platform darwin
4224
4224
  */
4225
- once(event: 'new-window-for-tab', listener: Function): this;
4225
+ once(event: 'new-window-for-tab', listener: () => void): this;
4226
4226
  /**
4227
4227
  * @platform darwin
4228
4228
  */
4229
- addListener(event: 'new-window-for-tab', listener: Function): this;
4229
+ addListener(event: 'new-window-for-tab', listener: () => void): this;
4230
4230
  /**
4231
4231
  * @platform darwin
4232
4232
  */
4233
- removeListener(event: 'new-window-for-tab', listener: Function): this;
4233
+ removeListener(event: 'new-window-for-tab', listener: () => void): this;
4234
4234
  /**
4235
4235
  * Emitted when the native new tab button is clicked.
4236
4236
  *
4237
4237
  * @platform darwin
4238
4238
  */
4239
- on(event: 'new-window-for-tab', listener: Function): this;
4239
+ on(event: 'new-window-for-tab', listener: () => void): this;
4240
4240
  /**
4241
4241
  * @platform darwin
4242
4242
  */
4243
- off(event: 'new-window-for-tab', listener: Function): this;
4243
+ off(event: 'new-window-for-tab', listener: () => void): this;
4244
4244
  /**
4245
4245
  * @platform darwin
4246
4246
  */
4247
- once(event: 'new-window-for-tab', listener: Function): this;
4247
+ once(event: 'new-window-for-tab', listener: () => void): this;
4248
4248
  /**
4249
4249
  * @platform darwin
4250
4250
  */
4251
- addListener(event: 'new-window-for-tab', listener: Function): this;
4251
+ addListener(event: 'new-window-for-tab', listener: () => void): this;
4252
4252
  /**
4253
4253
  * @platform darwin
4254
4254
  */
4255
- removeListener(event: 'new-window-for-tab', listener: Function): this;
4255
+ removeListener(event: 'new-window-for-tab', listener: () => void): this;
4256
4256
  /**
4257
4257
  * Emitted when the document changed its title, calling `event.preventDefault()`
4258
4258
  * will prevent the native window's title from changing. `explicitSet` is false
@@ -4281,27 +4281,27 @@ declare namespace Electron {
4281
4281
  * "visible" and paint even though `show` is false. This event will never fire if
4282
4282
  * you use `paintWhenInitiallyHidden: false`
4283
4283
  */
4284
- on(event: 'ready-to-show', listener: Function): this;
4285
- off(event: 'ready-to-show', listener: Function): this;
4286
- once(event: 'ready-to-show', listener: Function): this;
4287
- addListener(event: 'ready-to-show', listener: Function): this;
4288
- removeListener(event: 'ready-to-show', listener: Function): this;
4284
+ on(event: 'ready-to-show', listener: () => void): this;
4285
+ off(event: 'ready-to-show', listener: () => void): this;
4286
+ once(event: 'ready-to-show', listener: () => void): this;
4287
+ addListener(event: 'ready-to-show', listener: () => void): this;
4288
+ removeListener(event: 'ready-to-show', listener: () => void): this;
4289
4289
  /**
4290
4290
  * Emitted after the window has been resized.
4291
4291
  */
4292
- on(event: 'resize', listener: Function): this;
4293
- off(event: 'resize', listener: Function): this;
4294
- once(event: 'resize', listener: Function): this;
4295
- addListener(event: 'resize', listener: Function): this;
4296
- removeListener(event: 'resize', listener: Function): this;
4292
+ on(event: 'resize', listener: () => void): this;
4293
+ off(event: 'resize', listener: () => void): this;
4294
+ once(event: 'resize', listener: () => void): this;
4295
+ addListener(event: 'resize', listener: () => void): this;
4296
+ removeListener(event: 'resize', listener: () => void): this;
4297
4297
  /**
4298
4298
  * Emitted after the window has been resized.
4299
4299
  */
4300
- on(event: 'resize', listener: Function): this;
4301
- off(event: 'resize', listener: Function): this;
4302
- once(event: 'resize', listener: Function): this;
4303
- addListener(event: 'resize', listener: Function): this;
4304
- removeListener(event: 'resize', listener: Function): this;
4300
+ on(event: 'resize', listener: () => void): this;
4301
+ off(event: 'resize', listener: () => void): this;
4302
+ once(event: 'resize', listener: () => void): this;
4303
+ addListener(event: 'resize', listener: () => void): this;
4304
+ removeListener(event: 'resize', listener: () => void): this;
4305
4305
  /**
4306
4306
  * Emitted once when the window has finished being resized.
4307
4307
  *
@@ -4311,23 +4311,23 @@ declare namespace Electron {
4311
4311
  *
4312
4312
  * @platform darwin,win32
4313
4313
  */
4314
- on(event: 'resized', listener: Function): this;
4314
+ on(event: 'resized', listener: () => void): this;
4315
4315
  /**
4316
4316
  * @platform darwin,win32
4317
4317
  */
4318
- off(event: 'resized', listener: Function): this;
4318
+ off(event: 'resized', listener: () => void): this;
4319
4319
  /**
4320
4320
  * @platform darwin,win32
4321
4321
  */
4322
- once(event: 'resized', listener: Function): this;
4322
+ once(event: 'resized', listener: () => void): this;
4323
4323
  /**
4324
4324
  * @platform darwin,win32
4325
4325
  */
4326
- addListener(event: 'resized', listener: Function): this;
4326
+ addListener(event: 'resized', listener: () => void): this;
4327
4327
  /**
4328
4328
  * @platform darwin,win32
4329
4329
  */
4330
- removeListener(event: 'resized', listener: Function): this;
4330
+ removeListener(event: 'resized', listener: () => void): this;
4331
4331
  /**
4332
4332
  * Emitted once when the window has finished being resized.
4333
4333
  *
@@ -4337,47 +4337,47 @@ declare namespace Electron {
4337
4337
  *
4338
4338
  * @platform darwin,win32
4339
4339
  */
4340
- on(event: 'resized', listener: Function): this;
4340
+ on(event: 'resized', listener: () => void): this;
4341
4341
  /**
4342
4342
  * @platform darwin,win32
4343
4343
  */
4344
- off(event: 'resized', listener: Function): this;
4344
+ off(event: 'resized', listener: () => void): this;
4345
4345
  /**
4346
4346
  * @platform darwin,win32
4347
4347
  */
4348
- once(event: 'resized', listener: Function): this;
4348
+ once(event: 'resized', listener: () => void): this;
4349
4349
  /**
4350
4350
  * @platform darwin,win32
4351
4351
  */
4352
- addListener(event: 'resized', listener: Function): this;
4352
+ addListener(event: 'resized', listener: () => void): this;
4353
4353
  /**
4354
4354
  * @platform darwin,win32
4355
4355
  */
4356
- removeListener(event: 'resized', listener: Function): this;
4356
+ removeListener(event: 'resized', listener: () => void): this;
4357
4357
  /**
4358
4358
  * Emitted when the unresponsive web page becomes responsive again.
4359
4359
  */
4360
- on(event: 'responsive', listener: Function): this;
4361
- off(event: 'responsive', listener: Function): this;
4362
- once(event: 'responsive', listener: Function): this;
4363
- addListener(event: 'responsive', listener: Function): this;
4364
- removeListener(event: 'responsive', listener: Function): this;
4360
+ on(event: 'responsive', listener: () => void): this;
4361
+ off(event: 'responsive', listener: () => void): this;
4362
+ once(event: 'responsive', listener: () => void): this;
4363
+ addListener(event: 'responsive', listener: () => void): this;
4364
+ removeListener(event: 'responsive', listener: () => void): this;
4365
4365
  /**
4366
4366
  * Emitted when the window is restored from a minimized state.
4367
4367
  */
4368
- on(event: 'restore', listener: Function): this;
4369
- off(event: 'restore', listener: Function): this;
4370
- once(event: 'restore', listener: Function): this;
4371
- addListener(event: 'restore', listener: Function): this;
4372
- removeListener(event: 'restore', listener: Function): this;
4368
+ on(event: 'restore', listener: () => void): this;
4369
+ off(event: 'restore', listener: () => void): this;
4370
+ once(event: 'restore', listener: () => void): this;
4371
+ addListener(event: 'restore', listener: () => void): this;
4372
+ removeListener(event: 'restore', listener: () => void): this;
4373
4373
  /**
4374
4374
  * Emitted when the window is restored from a minimized state.
4375
4375
  */
4376
- on(event: 'restore', listener: Function): this;
4377
- off(event: 'restore', listener: Function): this;
4378
- once(event: 'restore', listener: Function): this;
4379
- addListener(event: 'restore', listener: Function): this;
4380
- removeListener(event: 'restore', listener: Function): this;
4376
+ on(event: 'restore', listener: () => void): this;
4377
+ off(event: 'restore', listener: () => void): this;
4378
+ once(event: 'restore', listener: () => void): this;
4379
+ addListener(event: 'restore', listener: () => void): this;
4380
+ removeListener(event: 'restore', listener: () => void): this;
4381
4381
  /**
4382
4382
  * Emitted on trackpad rotation gesture. Continually emitted until rotation gesture
4383
4383
  * is ended. The `rotation` value on each emission is the angle in degrees rotated
@@ -4446,150 +4446,150 @@ declare namespace Electron {
4446
4446
  *
4447
4447
  * @platform win32
4448
4448
  */
4449
- on(event: 'session-end', listener: Function): this;
4449
+ on(event: 'session-end', listener: () => void): this;
4450
4450
  /**
4451
4451
  * @platform win32
4452
4452
  */
4453
- off(event: 'session-end', listener: Function): this;
4453
+ off(event: 'session-end', listener: () => void): this;
4454
4454
  /**
4455
4455
  * @platform win32
4456
4456
  */
4457
- once(event: 'session-end', listener: Function): this;
4457
+ once(event: 'session-end', listener: () => void): this;
4458
4458
  /**
4459
4459
  * @platform win32
4460
4460
  */
4461
- addListener(event: 'session-end', listener: Function): this;
4461
+ addListener(event: 'session-end', listener: () => void): this;
4462
4462
  /**
4463
4463
  * @platform win32
4464
4464
  */
4465
- removeListener(event: 'session-end', listener: Function): this;
4465
+ removeListener(event: 'session-end', listener: () => void): this;
4466
4466
  /**
4467
4467
  * Emitted when window session is going to end due to force shutdown or machine
4468
4468
  * restart or session log off.
4469
4469
  *
4470
4470
  * @platform win32
4471
4471
  */
4472
- on(event: 'session-end', listener: Function): this;
4472
+ on(event: 'session-end', listener: () => void): this;
4473
4473
  /**
4474
4474
  * @platform win32
4475
4475
  */
4476
- off(event: 'session-end', listener: Function): this;
4476
+ off(event: 'session-end', listener: () => void): this;
4477
4477
  /**
4478
4478
  * @platform win32
4479
4479
  */
4480
- once(event: 'session-end', listener: Function): this;
4480
+ once(event: 'session-end', listener: () => void): this;
4481
4481
  /**
4482
4482
  * @platform win32
4483
4483
  */
4484
- addListener(event: 'session-end', listener: Function): this;
4484
+ addListener(event: 'session-end', listener: () => void): this;
4485
4485
  /**
4486
4486
  * @platform win32
4487
4487
  */
4488
- removeListener(event: 'session-end', listener: Function): this;
4488
+ removeListener(event: 'session-end', listener: () => void): this;
4489
4489
  /**
4490
4490
  * Emitted when the window opens a sheet.
4491
4491
  *
4492
4492
  * @platform darwin
4493
4493
  */
4494
- on(event: 'sheet-begin', listener: Function): this;
4494
+ on(event: 'sheet-begin', listener: () => void): this;
4495
4495
  /**
4496
4496
  * @platform darwin
4497
4497
  */
4498
- off(event: 'sheet-begin', listener: Function): this;
4498
+ off(event: 'sheet-begin', listener: () => void): this;
4499
4499
  /**
4500
4500
  * @platform darwin
4501
4501
  */
4502
- once(event: 'sheet-begin', listener: Function): this;
4502
+ once(event: 'sheet-begin', listener: () => void): this;
4503
4503
  /**
4504
4504
  * @platform darwin
4505
4505
  */
4506
- addListener(event: 'sheet-begin', listener: Function): this;
4506
+ addListener(event: 'sheet-begin', listener: () => void): this;
4507
4507
  /**
4508
4508
  * @platform darwin
4509
4509
  */
4510
- removeListener(event: 'sheet-begin', listener: Function): this;
4510
+ removeListener(event: 'sheet-begin', listener: () => void): this;
4511
4511
  /**
4512
4512
  * Emitted when the window opens a sheet.
4513
4513
  *
4514
4514
  * @platform darwin
4515
4515
  */
4516
- on(event: 'sheet-begin', listener: Function): this;
4516
+ on(event: 'sheet-begin', listener: () => void): this;
4517
4517
  /**
4518
4518
  * @platform darwin
4519
4519
  */
4520
- off(event: 'sheet-begin', listener: Function): this;
4520
+ off(event: 'sheet-begin', listener: () => void): this;
4521
4521
  /**
4522
4522
  * @platform darwin
4523
4523
  */
4524
- once(event: 'sheet-begin', listener: Function): this;
4524
+ once(event: 'sheet-begin', listener: () => void): this;
4525
4525
  /**
4526
4526
  * @platform darwin
4527
4527
  */
4528
- addListener(event: 'sheet-begin', listener: Function): this;
4528
+ addListener(event: 'sheet-begin', listener: () => void): this;
4529
4529
  /**
4530
4530
  * @platform darwin
4531
4531
  */
4532
- removeListener(event: 'sheet-begin', listener: Function): this;
4532
+ removeListener(event: 'sheet-begin', listener: () => void): this;
4533
4533
  /**
4534
4534
  * Emitted when the window has closed a sheet.
4535
4535
  *
4536
4536
  * @platform darwin
4537
4537
  */
4538
- on(event: 'sheet-end', listener: Function): this;
4538
+ on(event: 'sheet-end', listener: () => void): this;
4539
4539
  /**
4540
4540
  * @platform darwin
4541
4541
  */
4542
- off(event: 'sheet-end', listener: Function): this;
4542
+ off(event: 'sheet-end', listener: () => void): this;
4543
4543
  /**
4544
4544
  * @platform darwin
4545
4545
  */
4546
- once(event: 'sheet-end', listener: Function): this;
4546
+ once(event: 'sheet-end', listener: () => void): this;
4547
4547
  /**
4548
4548
  * @platform darwin
4549
4549
  */
4550
- addListener(event: 'sheet-end', listener: Function): this;
4550
+ addListener(event: 'sheet-end', listener: () => void): this;
4551
4551
  /**
4552
4552
  * @platform darwin
4553
4553
  */
4554
- removeListener(event: 'sheet-end', listener: Function): this;
4554
+ removeListener(event: 'sheet-end', listener: () => void): this;
4555
4555
  /**
4556
4556
  * Emitted when the window has closed a sheet.
4557
4557
  *
4558
4558
  * @platform darwin
4559
4559
  */
4560
- on(event: 'sheet-end', listener: Function): this;
4560
+ on(event: 'sheet-end', listener: () => void): this;
4561
4561
  /**
4562
4562
  * @platform darwin
4563
4563
  */
4564
- off(event: 'sheet-end', listener: Function): this;
4564
+ off(event: 'sheet-end', listener: () => void): this;
4565
4565
  /**
4566
4566
  * @platform darwin
4567
4567
  */
4568
- once(event: 'sheet-end', listener: Function): this;
4568
+ once(event: 'sheet-end', listener: () => void): this;
4569
4569
  /**
4570
4570
  * @platform darwin
4571
4571
  */
4572
- addListener(event: 'sheet-end', listener: Function): this;
4572
+ addListener(event: 'sheet-end', listener: () => void): this;
4573
4573
  /**
4574
4574
  * @platform darwin
4575
4575
  */
4576
- removeListener(event: 'sheet-end', listener: Function): this;
4576
+ removeListener(event: 'sheet-end', listener: () => void): this;
4577
4577
  /**
4578
4578
  * Emitted when the window is shown.
4579
4579
  */
4580
- on(event: 'show', listener: Function): this;
4581
- off(event: 'show', listener: Function): this;
4582
- once(event: 'show', listener: Function): this;
4583
- addListener(event: 'show', listener: Function): this;
4584
- removeListener(event: 'show', listener: Function): this;
4580
+ on(event: 'show', listener: () => void): this;
4581
+ off(event: 'show', listener: () => void): this;
4582
+ once(event: 'show', listener: () => void): this;
4583
+ addListener(event: 'show', listener: () => void): this;
4584
+ removeListener(event: 'show', listener: () => void): this;
4585
4585
  /**
4586
4586
  * Emitted when the window is shown.
4587
4587
  */
4588
- on(event: 'show', listener: Function): this;
4589
- off(event: 'show', listener: Function): this;
4590
- once(event: 'show', listener: Function): this;
4591
- addListener(event: 'show', listener: Function): this;
4592
- removeListener(event: 'show', listener: Function): this;
4588
+ on(event: 'show', listener: () => void): this;
4589
+ off(event: 'show', listener: () => void): this;
4590
+ once(event: 'show', listener: () => void): this;
4591
+ addListener(event: 'show', listener: () => void): this;
4592
+ removeListener(event: 'show', listener: () => void): this;
4593
4593
  /**
4594
4594
  * Emitted on 3-finger swipe. Possible directions are `up`, `right`, `down`,
4595
4595
  * `left`.
@@ -4757,27 +4757,27 @@ declare namespace Electron {
4757
4757
  /**
4758
4758
  * Emitted when the window exits from a maximized state.
4759
4759
  */
4760
- on(event: 'unmaximize', listener: Function): this;
4761
- off(event: 'unmaximize', listener: Function): this;
4762
- once(event: 'unmaximize', listener: Function): this;
4763
- addListener(event: 'unmaximize', listener: Function): this;
4764
- removeListener(event: 'unmaximize', listener: Function): this;
4760
+ on(event: 'unmaximize', listener: () => void): this;
4761
+ off(event: 'unmaximize', listener: () => void): this;
4762
+ once(event: 'unmaximize', listener: () => void): this;
4763
+ addListener(event: 'unmaximize', listener: () => void): this;
4764
+ removeListener(event: 'unmaximize', listener: () => void): this;
4765
4765
  /**
4766
4766
  * Emitted when the window exits from a maximized state.
4767
4767
  */
4768
- on(event: 'unmaximize', listener: Function): this;
4769
- off(event: 'unmaximize', listener: Function): this;
4770
- once(event: 'unmaximize', listener: Function): this;
4771
- addListener(event: 'unmaximize', listener: Function): this;
4772
- removeListener(event: 'unmaximize', listener: Function): this;
4768
+ on(event: 'unmaximize', listener: () => void): this;
4769
+ off(event: 'unmaximize', listener: () => void): this;
4770
+ once(event: 'unmaximize', listener: () => void): this;
4771
+ addListener(event: 'unmaximize', listener: () => void): this;
4772
+ removeListener(event: 'unmaximize', listener: () => void): this;
4773
4773
  /**
4774
4774
  * Emitted when the web page becomes unresponsive.
4775
4775
  */
4776
- on(event: 'unresponsive', listener: Function): this;
4777
- off(event: 'unresponsive', listener: Function): this;
4778
- once(event: 'unresponsive', listener: Function): this;
4779
- addListener(event: 'unresponsive', listener: Function): this;
4780
- removeListener(event: 'unresponsive', listener: Function): this;
4776
+ on(event: 'unresponsive', listener: () => void): this;
4777
+ off(event: 'unresponsive', listener: () => void): this;
4778
+ once(event: 'unresponsive', listener: () => void): this;
4779
+ addListener(event: 'unresponsive', listener: () => void): this;
4780
+ removeListener(event: 'unresponsive', listener: () => void): this;
4781
4781
  /**
4782
4782
  * Emitted before the window is moved. On Windows, calling `event.preventDefault()`
4783
4783
  * will prevent the window from being moved.
@@ -5492,7 +5492,7 @@ declare namespace Electron {
5492
5492
  * setting this, the window is still a normal window, not a toolbox window which
5493
5493
  * can not be focused on.
5494
5494
  */
5495
- setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver', relativeLevel?: number): void;
5495
+ setAlwaysOnTop(flag: boolean, level?: 'normal' | 'floating' | 'torn-off-menu' | 'modal-panel' | 'main-menu' | 'status' | 'pop-up-menu' | 'screen-saver' | 'dock', relativeLevel?: number): void;
5496
5496
  /**
5497
5497
  * Sets the properties for the window's taskbar button.
5498
5498
  *
@@ -6227,21 +6227,21 @@ declare namespace Electron {
6227
6227
  * Emitted when the `request` is aborted. The `abort` event will not be fired if
6228
6228
  * the `request` is already closed.
6229
6229
  */
6230
- on(event: 'abort', listener: Function): this;
6231
- off(event: 'abort', listener: Function): this;
6232
- once(event: 'abort', listener: Function): this;
6233
- addListener(event: 'abort', listener: Function): this;
6234
- removeListener(event: 'abort', listener: Function): this;
6230
+ on(event: 'abort', listener: () => void): this;
6231
+ off(event: 'abort', listener: () => void): this;
6232
+ once(event: 'abort', listener: () => void): this;
6233
+ addListener(event: 'abort', listener: () => void): this;
6234
+ removeListener(event: 'abort', listener: () => void): this;
6235
6235
  /**
6236
6236
  * Emitted as the last event in the HTTP request-response transaction. The `close`
6237
6237
  * event indicates that no more events will be emitted on either the `request` or
6238
6238
  * `response` objects.
6239
6239
  */
6240
- on(event: 'close', listener: Function): this;
6241
- off(event: 'close', listener: Function): this;
6242
- once(event: 'close', listener: Function): this;
6243
- addListener(event: 'close', listener: Function): this;
6244
- removeListener(event: 'close', listener: Function): this;
6240
+ on(event: 'close', listener: () => void): this;
6241
+ off(event: 'close', listener: () => void): this;
6242
+ once(event: 'close', listener: () => void): this;
6243
+ addListener(event: 'close', listener: () => void): this;
6244
+ removeListener(event: 'close', listener: () => void): this;
6245
6245
  /**
6246
6246
  * Emitted when the `net` module fails to issue a network request. Typically when
6247
6247
  * the `request` object emits an `error` event, a `close` event will subsequently
@@ -6276,11 +6276,11 @@ declare namespace Electron {
6276
6276
  * Emitted just after the last chunk of the `request`'s data has been written into
6277
6277
  * the `request` object.
6278
6278
  */
6279
- on(event: 'finish', listener: Function): this;
6280
- off(event: 'finish', listener: Function): this;
6281
- once(event: 'finish', listener: Function): this;
6282
- addListener(event: 'finish', listener: Function): this;
6283
- removeListener(event: 'finish', listener: Function): this;
6279
+ on(event: 'finish', listener: () => void): this;
6280
+ off(event: 'finish', listener: () => void): this;
6281
+ once(event: 'finish', listener: () => void): this;
6282
+ addListener(event: 'finish', listener: () => void): this;
6283
+ removeListener(event: 'finish', listener: () => void): this;
6284
6284
  /**
6285
6285
  * Emitted when an authenticating proxy is asking for user credentials.
6286
6286
  *
@@ -7979,11 +7979,11 @@ declare namespace Electron {
7979
7979
 
7980
7980
  // Docs: https://electronjs.org/docs/api/in-app-purchase
7981
7981
 
7982
- on(event: 'transactions-updated', listener: Function): this;
7983
- off(event: 'transactions-updated', listener: Function): this;
7984
- once(event: 'transactions-updated', listener: Function): this;
7985
- addListener(event: 'transactions-updated', listener: Function): this;
7986
- removeListener(event: 'transactions-updated', listener: Function): this;
7982
+ on(event: 'transactions-updated', listener: () => void): this;
7983
+ off(event: 'transactions-updated', listener: () => void): this;
7984
+ once(event: 'transactions-updated', listener: () => void): this;
7985
+ addListener(event: 'transactions-updated', listener: () => void): this;
7986
+ removeListener(event: 'transactions-updated', listener: () => void): this;
7987
7987
  /**
7988
7988
  * whether a user can make a payment.
7989
7989
  */
@@ -8032,11 +8032,11 @@ declare namespace Electron {
8032
8032
  /**
8033
8033
  * Emitted when a request has been canceled during an ongoing HTTP transaction.
8034
8034
  */
8035
- on(event: 'aborted', listener: Function): this;
8036
- off(event: 'aborted', listener: Function): this;
8037
- once(event: 'aborted', listener: Function): this;
8038
- addListener(event: 'aborted', listener: Function): this;
8039
- removeListener(event: 'aborted', listener: Function): this;
8035
+ on(event: 'aborted', listener: () => void): this;
8036
+ off(event: 'aborted', listener: () => void): this;
8037
+ once(event: 'aborted', listener: () => void): this;
8038
+ addListener(event: 'aborted', listener: () => void): this;
8039
+ removeListener(event: 'aborted', listener: () => void): this;
8040
8040
  /**
8041
8041
  * The `data` event is the usual method of transferring response data into
8042
8042
  * applicative code.
@@ -8069,26 +8069,42 @@ declare namespace Electron {
8069
8069
  /**
8070
8070
  * Indicates that response body has ended. Must be placed before 'data' event.
8071
8071
  */
8072
- on(event: 'end', listener: Function): this;
8073
- off(event: 'end', listener: Function): this;
8074
- once(event: 'end', listener: Function): this;
8075
- addListener(event: 'end', listener: Function): this;
8076
- removeListener(event: 'end', listener: Function): this;
8072
+ on(event: 'end', listener: () => void): this;
8073
+ off(event: 'end', listener: () => void): this;
8074
+ once(event: 'end', listener: () => void): this;
8075
+ addListener(event: 'end', listener: () => void): this;
8076
+ removeListener(event: 'end', listener: () => void): this;
8077
8077
  /**
8078
- * Returns:
8079
- *
8080
- * `error` Error - Typically holds an error string identifying failure root cause.
8081
- *
8082
8078
  * Emitted when an error was encountered while streaming response data events. For
8083
8079
  * instance, if the server closes the underlying while the response is still
8084
8080
  * streaming, an `error` event will be emitted on the response object and a `close`
8085
8081
  * event will subsequently follow on the request object.
8086
8082
  */
8087
- on(event: 'error', listener: Function): this;
8088
- off(event: 'error', listener: Function): this;
8089
- once(event: 'error', listener: Function): this;
8090
- addListener(event: 'error', listener: Function): this;
8091
- removeListener(event: 'error', listener: Function): this;
8083
+ on(event: 'error', listener: (
8084
+ /**
8085
+ * Typically holds an error string identifying failure root cause.
8086
+ */
8087
+ error: Error) => void): this;
8088
+ off(event: 'error', listener: (
8089
+ /**
8090
+ * Typically holds an error string identifying failure root cause.
8091
+ */
8092
+ error: Error) => void): this;
8093
+ once(event: 'error', listener: (
8094
+ /**
8095
+ * Typically holds an error string identifying failure root cause.
8096
+ */
8097
+ error: Error) => void): this;
8098
+ addListener(event: 'error', listener: (
8099
+ /**
8100
+ * Typically holds an error string identifying failure root cause.
8101
+ */
8102
+ error: Error) => void): this;
8103
+ removeListener(event: 'error', listener: (
8104
+ /**
8105
+ * Typically holds an error string identifying failure root cause.
8106
+ */
8107
+ error: Error) => void): this;
8092
8108
  /**
8093
8109
  * A `Record<string, string | string[]>` representing the HTTP response headers.
8094
8110
  * The `headers` object is formatted as follows:
@@ -8822,11 +8838,11 @@ declare namespace Electron {
8822
8838
  /**
8823
8839
  * Emitted when the remote end of a MessagePortMain object becomes disconnected.
8824
8840
  */
8825
- on(event: 'close', listener: Function): this;
8826
- off(event: 'close', listener: Function): this;
8827
- once(event: 'close', listener: Function): this;
8828
- addListener(event: 'close', listener: Function): this;
8829
- removeListener(event: 'close', listener: Function): this;
8841
+ on(event: 'close', listener: () => void): this;
8842
+ off(event: 'close', listener: () => void): this;
8843
+ once(event: 'close', listener: () => void): this;
8844
+ addListener(event: 'close', listener: () => void): this;
8845
+ removeListener(event: 'close', listener: () => void): this;
8830
8846
  /**
8831
8847
  * Emitted when a MessagePortMain object receives a message.
8832
8848
  */
@@ -9079,11 +9095,11 @@ declare namespace Electron {
9079
9095
  * `shouldUseHighContrastColors` or `shouldUseInvertedColorScheme` has changed. You
9080
9096
  * will have to check them to determine which one has changed.
9081
9097
  */
9082
- on(event: 'updated', listener: Function): this;
9083
- off(event: 'updated', listener: Function): this;
9084
- once(event: 'updated', listener: Function): this;
9085
- addListener(event: 'updated', listener: Function): this;
9086
- removeListener(event: 'updated', listener: Function): this;
9098
+ on(event: 'updated', listener: () => void): this;
9099
+ off(event: 'updated', listener: () => void): this;
9100
+ once(event: 'updated', listener: () => void): this;
9101
+ addListener(event: 'updated', listener: () => void): this;
9102
+ removeListener(event: 'updated', listener: () => void): this;
9087
9103
  /**
9088
9104
  * A `boolean` indicating whether Chromium is in forced colors mode, controlled by
9089
9105
  * system accessibility settings. Currently, Windows high contrast is the only
@@ -9730,75 +9746,75 @@ declare namespace Electron {
9730
9746
  *
9731
9747
  * @platform darwin,win32
9732
9748
  */
9733
- on(event: 'lock-screen', listener: Function): this;
9749
+ on(event: 'lock-screen', listener: () => void): this;
9734
9750
  /**
9735
9751
  * @platform darwin,win32
9736
9752
  */
9737
- off(event: 'lock-screen', listener: Function): this;
9753
+ off(event: 'lock-screen', listener: () => void): this;
9738
9754
  /**
9739
9755
  * @platform darwin,win32
9740
9756
  */
9741
- once(event: 'lock-screen', listener: Function): this;
9757
+ once(event: 'lock-screen', listener: () => void): this;
9742
9758
  /**
9743
9759
  * @platform darwin,win32
9744
9760
  */
9745
- addListener(event: 'lock-screen', listener: Function): this;
9761
+ addListener(event: 'lock-screen', listener: () => void): this;
9746
9762
  /**
9747
9763
  * @platform darwin,win32
9748
9764
  */
9749
- removeListener(event: 'lock-screen', listener: Function): this;
9765
+ removeListener(event: 'lock-screen', listener: () => void): this;
9750
9766
  /**
9751
9767
  * Emitted when the system changes to AC power.
9752
9768
  *
9753
9769
  * @platform darwin,win32
9754
9770
  */
9755
- on(event: 'on-ac', listener: Function): this;
9771
+ on(event: 'on-ac', listener: () => void): this;
9756
9772
  /**
9757
9773
  * @platform darwin,win32
9758
9774
  */
9759
- off(event: 'on-ac', listener: Function): this;
9775
+ off(event: 'on-ac', listener: () => void): this;
9760
9776
  /**
9761
9777
  * @platform darwin,win32
9762
9778
  */
9763
- once(event: 'on-ac', listener: Function): this;
9779
+ once(event: 'on-ac', listener: () => void): this;
9764
9780
  /**
9765
9781
  * @platform darwin,win32
9766
9782
  */
9767
- addListener(event: 'on-ac', listener: Function): this;
9783
+ addListener(event: 'on-ac', listener: () => void): this;
9768
9784
  /**
9769
9785
  * @platform darwin,win32
9770
9786
  */
9771
- removeListener(event: 'on-ac', listener: Function): this;
9787
+ removeListener(event: 'on-ac', listener: () => void): this;
9772
9788
  /**
9773
9789
  * Emitted when system changes to battery power.
9774
9790
  *
9775
9791
  * @platform darwin
9776
9792
  */
9777
- on(event: 'on-battery', listener: Function): this;
9793
+ on(event: 'on-battery', listener: () => void): this;
9778
9794
  /**
9779
9795
  * @platform darwin
9780
9796
  */
9781
- off(event: 'on-battery', listener: Function): this;
9797
+ off(event: 'on-battery', listener: () => void): this;
9782
9798
  /**
9783
9799
  * @platform darwin
9784
9800
  */
9785
- once(event: 'on-battery', listener: Function): this;
9801
+ once(event: 'on-battery', listener: () => void): this;
9786
9802
  /**
9787
9803
  * @platform darwin
9788
9804
  */
9789
- addListener(event: 'on-battery', listener: Function): this;
9805
+ addListener(event: 'on-battery', listener: () => void): this;
9790
9806
  /**
9791
9807
  * @platform darwin
9792
9808
  */
9793
- removeListener(event: 'on-battery', listener: Function): this;
9809
+ removeListener(event: 'on-battery', listener: () => void): this;
9794
9810
  /**
9795
9811
  * Emitted when system is resuming.
9796
9812
  */
9797
- on(event: 'resume', listener: Function): this;
9798
- off(event: 'resume', listener: Function): this;
9799
- once(event: 'resume', listener: Function): this;
9800
- addListener(event: 'resume', listener: Function): this;
9801
- removeListener(event: 'resume', listener: Function): this;
9813
+ on(event: 'resume', listener: () => void): this;
9814
+ off(event: 'resume', listener: () => void): this;
9815
+ once(event: 'resume', listener: () => void): this;
9816
+ addListener(event: 'resume', listener: () => void): this;
9817
+ removeListener(event: 'resume', listener: () => void): this;
9802
9818
  /**
9803
9819
  * Emitted when the system is about to reboot or shut down. If the event handler
9804
9820
  * invokes `e.preventDefault()`, Electron will attempt to delay system shutdown in
@@ -9807,23 +9823,23 @@ declare namespace Electron {
9807
9823
  *
9808
9824
  * @platform linux,darwin
9809
9825
  */
9810
- on(event: 'shutdown', listener: Function): this;
9826
+ on(event: 'shutdown', listener: () => void): this;
9811
9827
  /**
9812
9828
  * @platform linux,darwin
9813
9829
  */
9814
- off(event: 'shutdown', listener: Function): this;
9830
+ off(event: 'shutdown', listener: () => void): this;
9815
9831
  /**
9816
9832
  * @platform linux,darwin
9817
9833
  */
9818
- once(event: 'shutdown', listener: Function): this;
9834
+ once(event: 'shutdown', listener: () => void): this;
9819
9835
  /**
9820
9836
  * @platform linux,darwin
9821
9837
  */
9822
- addListener(event: 'shutdown', listener: Function): this;
9838
+ addListener(event: 'shutdown', listener: () => void): this;
9823
9839
  /**
9824
9840
  * @platform linux,darwin
9825
9841
  */
9826
- removeListener(event: 'shutdown', listener: Function): this;
9842
+ removeListener(event: 'shutdown', listener: () => void): this;
9827
9843
  /**
9828
9844
  * Notification of a change in the operating system's advertised speed limit for
9829
9845
  * CPUs, in percent. Values below 100 indicate that the system is impairing
@@ -9831,31 +9847,31 @@ declare namespace Electron {
9831
9847
  *
9832
9848
  * @platform darwin,win32
9833
9849
  */
9834
- on(event: 'speed-limit-change', listener: Function): this;
9850
+ on(event: 'speed-limit-change', listener: () => void): this;
9835
9851
  /**
9836
9852
  * @platform darwin,win32
9837
9853
  */
9838
- off(event: 'speed-limit-change', listener: Function): this;
9854
+ off(event: 'speed-limit-change', listener: () => void): this;
9839
9855
  /**
9840
9856
  * @platform darwin,win32
9841
9857
  */
9842
- once(event: 'speed-limit-change', listener: Function): this;
9858
+ once(event: 'speed-limit-change', listener: () => void): this;
9843
9859
  /**
9844
9860
  * @platform darwin,win32
9845
9861
  */
9846
- addListener(event: 'speed-limit-change', listener: Function): this;
9862
+ addListener(event: 'speed-limit-change', listener: () => void): this;
9847
9863
  /**
9848
9864
  * @platform darwin,win32
9849
9865
  */
9850
- removeListener(event: 'speed-limit-change', listener: Function): this;
9866
+ removeListener(event: 'speed-limit-change', listener: () => void): this;
9851
9867
  /**
9852
9868
  * Emitted when the system is suspending.
9853
9869
  */
9854
- on(event: 'suspend', listener: Function): this;
9855
- off(event: 'suspend', listener: Function): this;
9856
- once(event: 'suspend', listener: Function): this;
9857
- addListener(event: 'suspend', listener: Function): this;
9858
- removeListener(event: 'suspend', listener: Function): this;
9870
+ on(event: 'suspend', listener: () => void): this;
9871
+ off(event: 'suspend', listener: () => void): this;
9872
+ once(event: 'suspend', listener: () => void): this;
9873
+ addListener(event: 'suspend', listener: () => void): this;
9874
+ removeListener(event: 'suspend', listener: () => void): this;
9859
9875
  /**
9860
9876
  * Emitted when the thermal state of the system changes. Notification of a change
9861
9877
  * in the thermal status of the system, such as entering a critical temperature
@@ -9872,91 +9888,91 @@ declare namespace Electron {
9872
9888
  *
9873
9889
  * @platform darwin
9874
9890
  */
9875
- on(event: 'thermal-state-change', listener: Function): this;
9891
+ on(event: 'thermal-state-change', listener: () => void): this;
9876
9892
  /**
9877
9893
  * @platform darwin
9878
9894
  */
9879
- off(event: 'thermal-state-change', listener: Function): this;
9895
+ off(event: 'thermal-state-change', listener: () => void): this;
9880
9896
  /**
9881
9897
  * @platform darwin
9882
9898
  */
9883
- once(event: 'thermal-state-change', listener: Function): this;
9899
+ once(event: 'thermal-state-change', listener: () => void): this;
9884
9900
  /**
9885
9901
  * @platform darwin
9886
9902
  */
9887
- addListener(event: 'thermal-state-change', listener: Function): this;
9903
+ addListener(event: 'thermal-state-change', listener: () => void): this;
9888
9904
  /**
9889
9905
  * @platform darwin
9890
9906
  */
9891
- removeListener(event: 'thermal-state-change', listener: Function): this;
9907
+ removeListener(event: 'thermal-state-change', listener: () => void): this;
9892
9908
  /**
9893
9909
  * Emitted as soon as the systems screen is unlocked.
9894
9910
  *
9895
9911
  * @platform darwin,win32
9896
9912
  */
9897
- on(event: 'unlock-screen', listener: Function): this;
9913
+ on(event: 'unlock-screen', listener: () => void): this;
9898
9914
  /**
9899
9915
  * @platform darwin,win32
9900
9916
  */
9901
- off(event: 'unlock-screen', listener: Function): this;
9917
+ off(event: 'unlock-screen', listener: () => void): this;
9902
9918
  /**
9903
9919
  * @platform darwin,win32
9904
9920
  */
9905
- once(event: 'unlock-screen', listener: Function): this;
9921
+ once(event: 'unlock-screen', listener: () => void): this;
9906
9922
  /**
9907
9923
  * @platform darwin,win32
9908
9924
  */
9909
- addListener(event: 'unlock-screen', listener: Function): this;
9925
+ addListener(event: 'unlock-screen', listener: () => void): this;
9910
9926
  /**
9911
9927
  * @platform darwin,win32
9912
9928
  */
9913
- removeListener(event: 'unlock-screen', listener: Function): this;
9929
+ removeListener(event: 'unlock-screen', listener: () => void): this;
9914
9930
  /**
9915
9931
  * Emitted when a login session is activated. See documentation for more
9916
9932
  * information.
9917
9933
  *
9918
9934
  * @platform darwin
9919
9935
  */
9920
- on(event: 'user-did-become-active', listener: Function): this;
9936
+ on(event: 'user-did-become-active', listener: () => void): this;
9921
9937
  /**
9922
9938
  * @platform darwin
9923
9939
  */
9924
- off(event: 'user-did-become-active', listener: Function): this;
9940
+ off(event: 'user-did-become-active', listener: () => void): this;
9925
9941
  /**
9926
9942
  * @platform darwin
9927
9943
  */
9928
- once(event: 'user-did-become-active', listener: Function): this;
9944
+ once(event: 'user-did-become-active', listener: () => void): this;
9929
9945
  /**
9930
9946
  * @platform darwin
9931
9947
  */
9932
- addListener(event: 'user-did-become-active', listener: Function): this;
9948
+ addListener(event: 'user-did-become-active', listener: () => void): this;
9933
9949
  /**
9934
9950
  * @platform darwin
9935
9951
  */
9936
- removeListener(event: 'user-did-become-active', listener: Function): this;
9952
+ removeListener(event: 'user-did-become-active', listener: () => void): this;
9937
9953
  /**
9938
9954
  * Emitted when a login session is deactivated. See documentation for more
9939
9955
  * information.
9940
9956
  *
9941
9957
  * @platform darwin
9942
9958
  */
9943
- on(event: 'user-did-resign-active', listener: Function): this;
9959
+ on(event: 'user-did-resign-active', listener: () => void): this;
9944
9960
  /**
9945
9961
  * @platform darwin
9946
9962
  */
9947
- off(event: 'user-did-resign-active', listener: Function): this;
9963
+ off(event: 'user-did-resign-active', listener: () => void): this;
9948
9964
  /**
9949
9965
  * @platform darwin
9950
9966
  */
9951
- once(event: 'user-did-resign-active', listener: Function): this;
9967
+ once(event: 'user-did-resign-active', listener: () => void): this;
9952
9968
  /**
9953
9969
  * @platform darwin
9954
9970
  */
9955
- addListener(event: 'user-did-resign-active', listener: Function): this;
9971
+ addListener(event: 'user-did-resign-active', listener: () => void): this;
9956
9972
  /**
9957
9973
  * @platform darwin
9958
9974
  */
9959
- removeListener(event: 'user-did-resign-active', listener: Function): this;
9975
+ removeListener(event: 'user-did-resign-active', listener: () => void): this;
9960
9976
  /**
9961
9977
  * The system's current thermal state. Can be `unknown`, `nominal`, `fair`,
9962
9978
  * `serious`, or `critical`.
@@ -13003,68 +13019,68 @@ declare namespace Electron {
13003
13019
  *
13004
13020
  * @platform win32
13005
13021
  */
13006
- on(event: 'balloon-click', listener: Function): this;
13022
+ on(event: 'balloon-click', listener: () => void): this;
13007
13023
  /**
13008
13024
  * @platform win32
13009
13025
  */
13010
- off(event: 'balloon-click', listener: Function): this;
13026
+ off(event: 'balloon-click', listener: () => void): this;
13011
13027
  /**
13012
13028
  * @platform win32
13013
13029
  */
13014
- once(event: 'balloon-click', listener: Function): this;
13030
+ once(event: 'balloon-click', listener: () => void): this;
13015
13031
  /**
13016
13032
  * @platform win32
13017
13033
  */
13018
- addListener(event: 'balloon-click', listener: Function): this;
13034
+ addListener(event: 'balloon-click', listener: () => void): this;
13019
13035
  /**
13020
13036
  * @platform win32
13021
13037
  */
13022
- removeListener(event: 'balloon-click', listener: Function): this;
13038
+ removeListener(event: 'balloon-click', listener: () => void): this;
13023
13039
  /**
13024
13040
  * Emitted when the tray balloon is closed because of timeout or user manually
13025
13041
  * closes it.
13026
13042
  *
13027
13043
  * @platform win32
13028
13044
  */
13029
- on(event: 'balloon-closed', listener: Function): this;
13045
+ on(event: 'balloon-closed', listener: () => void): this;
13030
13046
  /**
13031
13047
  * @platform win32
13032
13048
  */
13033
- off(event: 'balloon-closed', listener: Function): this;
13049
+ off(event: 'balloon-closed', listener: () => void): this;
13034
13050
  /**
13035
13051
  * @platform win32
13036
13052
  */
13037
- once(event: 'balloon-closed', listener: Function): this;
13053
+ once(event: 'balloon-closed', listener: () => void): this;
13038
13054
  /**
13039
13055
  * @platform win32
13040
13056
  */
13041
- addListener(event: 'balloon-closed', listener: Function): this;
13057
+ addListener(event: 'balloon-closed', listener: () => void): this;
13042
13058
  /**
13043
13059
  * @platform win32
13044
13060
  */
13045
- removeListener(event: 'balloon-closed', listener: Function): this;
13061
+ removeListener(event: 'balloon-closed', listener: () => void): this;
13046
13062
  /**
13047
13063
  * Emitted when the tray balloon shows.
13048
13064
  *
13049
13065
  * @platform win32
13050
13066
  */
13051
- on(event: 'balloon-show', listener: Function): this;
13067
+ on(event: 'balloon-show', listener: () => void): this;
13052
13068
  /**
13053
13069
  * @platform win32
13054
13070
  */
13055
- off(event: 'balloon-show', listener: Function): this;
13071
+ off(event: 'balloon-show', listener: () => void): this;
13056
13072
  /**
13057
13073
  * @platform win32
13058
13074
  */
13059
- once(event: 'balloon-show', listener: Function): this;
13075
+ once(event: 'balloon-show', listener: () => void): this;
13060
13076
  /**
13061
13077
  * @platform win32
13062
13078
  */
13063
- addListener(event: 'balloon-show', listener: Function): this;
13079
+ addListener(event: 'balloon-show', listener: () => void): this;
13064
13080
  /**
13065
13081
  * @platform win32
13066
13082
  */
13067
- removeListener(event: 'balloon-show', listener: Function): this;
13083
+ removeListener(event: 'balloon-show', listener: () => void): this;
13068
13084
  /**
13069
13085
  * Emitted when the tray icon is clicked.
13070
13086
  *
@@ -13163,89 +13179,89 @@ declare namespace Electron {
13163
13179
  *
13164
13180
  * @platform darwin
13165
13181
  */
13166
- on(event: 'drag-end', listener: Function): this;
13182
+ on(event: 'drag-end', listener: () => void): this;
13167
13183
  /**
13168
13184
  * @platform darwin
13169
13185
  */
13170
- off(event: 'drag-end', listener: Function): this;
13186
+ off(event: 'drag-end', listener: () => void): this;
13171
13187
  /**
13172
13188
  * @platform darwin
13173
13189
  */
13174
- once(event: 'drag-end', listener: Function): this;
13190
+ once(event: 'drag-end', listener: () => void): this;
13175
13191
  /**
13176
13192
  * @platform darwin
13177
13193
  */
13178
- addListener(event: 'drag-end', listener: Function): this;
13194
+ addListener(event: 'drag-end', listener: () => void): this;
13179
13195
  /**
13180
13196
  * @platform darwin
13181
13197
  */
13182
- removeListener(event: 'drag-end', listener: Function): this;
13198
+ removeListener(event: 'drag-end', listener: () => void): this;
13183
13199
  /**
13184
13200
  * Emitted when a drag operation enters the tray icon.
13185
13201
  *
13186
13202
  * @platform darwin
13187
13203
  */
13188
- on(event: 'drag-enter', listener: Function): this;
13204
+ on(event: 'drag-enter', listener: () => void): this;
13189
13205
  /**
13190
13206
  * @platform darwin
13191
13207
  */
13192
- off(event: 'drag-enter', listener: Function): this;
13208
+ off(event: 'drag-enter', listener: () => void): this;
13193
13209
  /**
13194
13210
  * @platform darwin
13195
13211
  */
13196
- once(event: 'drag-enter', listener: Function): this;
13212
+ once(event: 'drag-enter', listener: () => void): this;
13197
13213
  /**
13198
13214
  * @platform darwin
13199
13215
  */
13200
- addListener(event: 'drag-enter', listener: Function): this;
13216
+ addListener(event: 'drag-enter', listener: () => void): this;
13201
13217
  /**
13202
13218
  * @platform darwin
13203
13219
  */
13204
- removeListener(event: 'drag-enter', listener: Function): this;
13220
+ removeListener(event: 'drag-enter', listener: () => void): this;
13205
13221
  /**
13206
13222
  * Emitted when a drag operation exits the tray icon.
13207
13223
  *
13208
13224
  * @platform darwin
13209
13225
  */
13210
- on(event: 'drag-leave', listener: Function): this;
13226
+ on(event: 'drag-leave', listener: () => void): this;
13211
13227
  /**
13212
13228
  * @platform darwin
13213
13229
  */
13214
- off(event: 'drag-leave', listener: Function): this;
13230
+ off(event: 'drag-leave', listener: () => void): this;
13215
13231
  /**
13216
13232
  * @platform darwin
13217
13233
  */
13218
- once(event: 'drag-leave', listener: Function): this;
13234
+ once(event: 'drag-leave', listener: () => void): this;
13219
13235
  /**
13220
13236
  * @platform darwin
13221
13237
  */
13222
- addListener(event: 'drag-leave', listener: Function): this;
13238
+ addListener(event: 'drag-leave', listener: () => void): this;
13223
13239
  /**
13224
13240
  * @platform darwin
13225
13241
  */
13226
- removeListener(event: 'drag-leave', listener: Function): this;
13242
+ removeListener(event: 'drag-leave', listener: () => void): this;
13227
13243
  /**
13228
13244
  * Emitted when any dragged items are dropped on the tray icon.
13229
13245
  *
13230
13246
  * @platform darwin
13231
13247
  */
13232
- on(event: 'drop', listener: Function): this;
13248
+ on(event: 'drop', listener: () => void): this;
13233
13249
  /**
13234
13250
  * @platform darwin
13235
13251
  */
13236
- off(event: 'drop', listener: Function): this;
13252
+ off(event: 'drop', listener: () => void): this;
13237
13253
  /**
13238
13254
  * @platform darwin
13239
13255
  */
13240
- once(event: 'drop', listener: Function): this;
13256
+ once(event: 'drop', listener: () => void): this;
13241
13257
  /**
13242
13258
  * @platform darwin
13243
13259
  */
13244
- addListener(event: 'drop', listener: Function): this;
13260
+ addListener(event: 'drop', listener: () => void): this;
13245
13261
  /**
13246
13262
  * @platform darwin
13247
13263
  */
13248
- removeListener(event: 'drop', listener: Function): this;
13264
+ removeListener(event: 'drop', listener: () => void): this;
13249
13265
  /**
13250
13266
  * Emitted when dragged files are dropped in the tray icon.
13251
13267
  *
@@ -13873,6 +13889,92 @@ declare namespace Electron {
13873
13889
  // Docs: https://electronjs.org/docs/api/utility-process
13874
13890
 
13875
13891
  static fork(modulePath: string, args?: string[], options?: ForkOptions): UtilityProcess;
13892
+ /**
13893
+ * Emitted when the child process needs to terminate due to non continuable error
13894
+ * from V8.
13895
+ *
13896
+ * No matter if you listen to the `error` event, the `exit` event will be emitted
13897
+ * after the child process terminates.
13898
+ *
13899
+ * @experimental
13900
+ */
13901
+ on(event: 'error', listener: (
13902
+ /**
13903
+ * Type of error. One of the following values:
13904
+ */
13905
+ type: ('FatalError'),
13906
+ /**
13907
+ * Source location from where the error originated.
13908
+ */
13909
+ location: string,
13910
+ /**
13911
+ * `Node.js diagnostic report`.
13912
+ */
13913
+ report: string) => void): this;
13914
+ /**
13915
+ * @experimental
13916
+ */
13917
+ off(event: 'error', listener: (
13918
+ /**
13919
+ * Type of error. One of the following values:
13920
+ */
13921
+ type: ('FatalError'),
13922
+ /**
13923
+ * Source location from where the error originated.
13924
+ */
13925
+ location: string,
13926
+ /**
13927
+ * `Node.js diagnostic report`.
13928
+ */
13929
+ report: string) => void): this;
13930
+ /**
13931
+ * @experimental
13932
+ */
13933
+ once(event: 'error', listener: (
13934
+ /**
13935
+ * Type of error. One of the following values:
13936
+ */
13937
+ type: ('FatalError'),
13938
+ /**
13939
+ * Source location from where the error originated.
13940
+ */
13941
+ location: string,
13942
+ /**
13943
+ * `Node.js diagnostic report`.
13944
+ */
13945
+ report: string) => void): this;
13946
+ /**
13947
+ * @experimental
13948
+ */
13949
+ addListener(event: 'error', listener: (
13950
+ /**
13951
+ * Type of error. One of the following values:
13952
+ */
13953
+ type: ('FatalError'),
13954
+ /**
13955
+ * Source location from where the error originated.
13956
+ */
13957
+ location: string,
13958
+ /**
13959
+ * `Node.js diagnostic report`.
13960
+ */
13961
+ report: string) => void): this;
13962
+ /**
13963
+ * @experimental
13964
+ */
13965
+ removeListener(event: 'error', listener: (
13966
+ /**
13967
+ * Type of error. One of the following values:
13968
+ */
13969
+ type: ('FatalError'),
13970
+ /**
13971
+ * Source location from where the error originated.
13972
+ */
13973
+ location: string,
13974
+ /**
13975
+ * `Node.js diagnostic report`.
13976
+ */
13977
+ report: string) => void): this;
13876
13978
  /**
13877
13979
  * Emitted after the child process ends.
13878
13980
  */
@@ -13918,11 +14020,11 @@ declare namespace Electron {
13918
14020
  /**
13919
14021
  * Emitted once the child process has spawned successfully.
13920
14022
  */
13921
- on(event: 'spawn', listener: Function): this;
13922
- off(event: 'spawn', listener: Function): this;
13923
- once(event: 'spawn', listener: Function): this;
13924
- addListener(event: 'spawn', listener: Function): this;
13925
- removeListener(event: 'spawn', listener: Function): this;
14023
+ on(event: 'spawn', listener: () => void): this;
14024
+ off(event: 'spawn', listener: () => void): this;
14025
+ once(event: 'spawn', listener: () => void): this;
14026
+ addListener(event: 'spawn', listener: () => void): this;
14027
+ removeListener(event: 'spawn', listener: () => void): this;
13926
14028
  /**
13927
14029
  * Terminates the process gracefully. On POSIX, it uses SIGTERM but will ensure the
13928
14030
  * process is reaped on exit. This function returns true if the kill is successful,
@@ -13967,11 +14069,11 @@ declare namespace Electron {
13967
14069
  * Emitted when the view's bounds have changed in response to being laid out. The
13968
14070
  * new bounds can be retrieved with `view.getBounds()`.
13969
14071
  */
13970
- on(event: 'bounds-changed', listener: Function): this;
13971
- off(event: 'bounds-changed', listener: Function): this;
13972
- once(event: 'bounds-changed', listener: Function): this;
13973
- addListener(event: 'bounds-changed', listener: Function): this;
13974
- removeListener(event: 'bounds-changed', listener: Function): this;
14072
+ on(event: 'bounds-changed', listener: () => void): this;
14073
+ off(event: 'bounds-changed', listener: () => void): this;
14074
+ once(event: 'bounds-changed', listener: () => void): this;
14075
+ addListener(event: 'bounds-changed', listener: () => void): this;
14076
+ removeListener(event: 'bounds-changed', listener: () => void): this;
13975
14077
  /**
13976
14078
  * View
13977
14079
  */
@@ -14106,11 +14208,11 @@ declare namespace Electron {
14106
14208
  /**
14107
14209
  * Emitted when the `WebContents` loses focus.
14108
14210
  */
14109
- on(event: 'blur', listener: Function): this;
14110
- off(event: 'blur', listener: Function): this;
14111
- once(event: 'blur', listener: Function): this;
14112
- addListener(event: 'blur', listener: Function): this;
14113
- removeListener(event: 'blur', listener: Function): this;
14211
+ on(event: 'blur', listener: () => void): this;
14212
+ off(event: 'blur', listener: () => void): this;
14213
+ once(event: 'blur', listener: () => void): this;
14214
+ addListener(event: 'blur', listener: () => void): this;
14215
+ removeListener(event: 'blur', listener: () => void): this;
14114
14216
  /**
14115
14217
  * Emitted when failed to verify the `certificate` for `url`.
14116
14218
  *
@@ -14378,27 +14480,27 @@ declare namespace Electron {
14378
14480
  /**
14379
14481
  * Emitted when `webContents` is destroyed.
14380
14482
  */
14381
- on(event: 'destroyed', listener: Function): this;
14382
- off(event: 'destroyed', listener: Function): this;
14383
- once(event: 'destroyed', listener: Function): this;
14384
- addListener(event: 'destroyed', listener: Function): this;
14385
- removeListener(event: 'destroyed', listener: Function): this;
14483
+ on(event: 'destroyed', listener: () => void): this;
14484
+ off(event: 'destroyed', listener: () => void): this;
14485
+ once(event: 'destroyed', listener: () => void): this;
14486
+ addListener(event: 'destroyed', listener: () => void): this;
14487
+ removeListener(event: 'destroyed', listener: () => void): this;
14386
14488
  /**
14387
14489
  * Emitted when DevTools is closed.
14388
14490
  */
14389
- on(event: 'devtools-closed', listener: Function): this;
14390
- off(event: 'devtools-closed', listener: Function): this;
14391
- once(event: 'devtools-closed', listener: Function): this;
14392
- addListener(event: 'devtools-closed', listener: Function): this;
14393
- removeListener(event: 'devtools-closed', listener: Function): this;
14491
+ on(event: 'devtools-closed', listener: () => void): this;
14492
+ off(event: 'devtools-closed', listener: () => void): this;
14493
+ once(event: 'devtools-closed', listener: () => void): this;
14494
+ addListener(event: 'devtools-closed', listener: () => void): this;
14495
+ removeListener(event: 'devtools-closed', listener: () => void): this;
14394
14496
  /**
14395
14497
  * Emitted when DevTools is focused / opened.
14396
14498
  */
14397
- on(event: 'devtools-focused', listener: Function): this;
14398
- off(event: 'devtools-focused', listener: Function): this;
14399
- once(event: 'devtools-focused', listener: Function): this;
14400
- addListener(event: 'devtools-focused', listener: Function): this;
14401
- removeListener(event: 'devtools-focused', listener: Function): this;
14499
+ on(event: 'devtools-focused', listener: () => void): this;
14500
+ off(event: 'devtools-focused', listener: () => void): this;
14501
+ once(event: 'devtools-focused', listener: () => void): this;
14502
+ addListener(event: 'devtools-focused', listener: () => void): this;
14503
+ removeListener(event: 'devtools-focused', listener: () => void): this;
14402
14504
  /**
14403
14505
  * Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for
14404
14506
  * a link in its context menu.
@@ -14431,19 +14533,19 @@ declare namespace Electron {
14431
14533
  /**
14432
14534
  * Emitted when DevTools is opened.
14433
14535
  */
14434
- on(event: 'devtools-opened', listener: Function): this;
14435
- off(event: 'devtools-opened', listener: Function): this;
14436
- once(event: 'devtools-opened', listener: Function): this;
14437
- addListener(event: 'devtools-opened', listener: Function): this;
14438
- removeListener(event: 'devtools-opened', listener: Function): this;
14536
+ on(event: 'devtools-opened', listener: () => void): this;
14537
+ off(event: 'devtools-opened', listener: () => void): this;
14538
+ once(event: 'devtools-opened', listener: () => void): this;
14539
+ addListener(event: 'devtools-opened', listener: () => void): this;
14540
+ removeListener(event: 'devtools-opened', listener: () => void): this;
14439
14541
  /**
14440
14542
  * Emitted when the devtools window instructs the webContents to reload
14441
14543
  */
14442
- on(event: 'devtools-reload-page', listener: Function): this;
14443
- off(event: 'devtools-reload-page', listener: Function): this;
14444
- once(event: 'devtools-reload-page', listener: Function): this;
14445
- addListener(event: 'devtools-reload-page', listener: Function): this;
14446
- removeListener(event: 'devtools-reload-page', listener: Function): this;
14544
+ on(event: 'devtools-reload-page', listener: () => void): this;
14545
+ off(event: 'devtools-reload-page', listener: () => void): this;
14546
+ once(event: 'devtools-reload-page', listener: () => void): this;
14547
+ addListener(event: 'devtools-reload-page', listener: () => void): this;
14548
+ removeListener(event: 'devtools-reload-page', listener: () => void): this;
14447
14549
  /**
14448
14550
  * Emitted when 'Search' is selected for text in its context menu.
14449
14551
  */
@@ -14629,11 +14731,11 @@ declare namespace Electron {
14629
14731
  * Emitted when the navigation is done, i.e. the spinner of the tab has stopped
14630
14732
  * spinning, and the `onload` event was dispatched.
14631
14733
  */
14632
- on(event: 'did-finish-load', listener: Function): this;
14633
- off(event: 'did-finish-load', listener: Function): this;
14634
- once(event: 'did-finish-load', listener: Function): this;
14635
- addListener(event: 'did-finish-load', listener: Function): this;
14636
- removeListener(event: 'did-finish-load', listener: Function): this;
14734
+ on(event: 'did-finish-load', listener: () => void): this;
14735
+ off(event: 'did-finish-load', listener: () => void): this;
14736
+ once(event: 'did-finish-load', listener: () => void): this;
14737
+ addListener(event: 'did-finish-load', listener: () => void): this;
14738
+ removeListener(event: 'did-finish-load', listener: () => void): this;
14637
14739
  /**
14638
14740
  * Emitted when a frame has done navigation.
14639
14741
  */
@@ -14933,11 +15035,11 @@ declare namespace Electron {
14933
15035
  /**
14934
15036
  * Corresponds to the points in time when the spinner of the tab started spinning.
14935
15037
  */
14936
- on(event: 'did-start-loading', listener: Function): this;
14937
- off(event: 'did-start-loading', listener: Function): this;
14938
- once(event: 'did-start-loading', listener: Function): this;
14939
- addListener(event: 'did-start-loading', listener: Function): this;
14940
- removeListener(event: 'did-start-loading', listener: Function): this;
15038
+ on(event: 'did-start-loading', listener: () => void): this;
15039
+ off(event: 'did-start-loading', listener: () => void): this;
15040
+ once(event: 'did-start-loading', listener: () => void): this;
15041
+ addListener(event: 'did-start-loading', listener: () => void): this;
15042
+ removeListener(event: 'did-start-loading', listener: () => void): this;
14941
15043
  /**
14942
15044
  * Emitted when any frame (including main) starts navigating.
14943
15045
  */
@@ -15049,27 +15151,27 @@ declare namespace Electron {
15049
15151
  /**
15050
15152
  * Corresponds to the points in time when the spinner of the tab stopped spinning.
15051
15153
  */
15052
- on(event: 'did-stop-loading', listener: Function): this;
15053
- off(event: 'did-stop-loading', listener: Function): this;
15054
- once(event: 'did-stop-loading', listener: Function): this;
15055
- addListener(event: 'did-stop-loading', listener: Function): this;
15056
- removeListener(event: 'did-stop-loading', listener: Function): this;
15154
+ on(event: 'did-stop-loading', listener: () => void): this;
15155
+ off(event: 'did-stop-loading', listener: () => void): this;
15156
+ once(event: 'did-stop-loading', listener: () => void): this;
15157
+ addListener(event: 'did-stop-loading', listener: () => void): this;
15158
+ removeListener(event: 'did-stop-loading', listener: () => void): this;
15057
15159
  /**
15058
15160
  * Emitted when the document in the top-level frame is loaded.
15059
15161
  */
15060
- on(event: 'dom-ready', listener: Function): this;
15061
- off(event: 'dom-ready', listener: Function): this;
15062
- once(event: 'dom-ready', listener: Function): this;
15063
- addListener(event: 'dom-ready', listener: Function): this;
15064
- removeListener(event: 'dom-ready', listener: Function): this;
15162
+ on(event: 'dom-ready', listener: () => void): this;
15163
+ off(event: 'dom-ready', listener: () => void): this;
15164
+ once(event: 'dom-ready', listener: () => void): this;
15165
+ addListener(event: 'dom-ready', listener: () => void): this;
15166
+ removeListener(event: 'dom-ready', listener: () => void): this;
15065
15167
  /**
15066
15168
  * Emitted when the window enters a full-screen state triggered by HTML API.
15067
15169
  */
15068
- on(event: 'enter-html-full-screen', listener: Function): this;
15069
- off(event: 'enter-html-full-screen', listener: Function): this;
15070
- once(event: 'enter-html-full-screen', listener: Function): this;
15071
- addListener(event: 'enter-html-full-screen', listener: Function): this;
15072
- removeListener(event: 'enter-html-full-screen', listener: Function): this;
15170
+ on(event: 'enter-html-full-screen', listener: () => void): this;
15171
+ off(event: 'enter-html-full-screen', listener: () => void): this;
15172
+ once(event: 'enter-html-full-screen', listener: () => void): this;
15173
+ addListener(event: 'enter-html-full-screen', listener: () => void): this;
15174
+ removeListener(event: 'enter-html-full-screen', listener: () => void): this;
15073
15175
  /**
15074
15176
  * Emitted when the `WebContents` gains focus.
15075
15177
  *
@@ -15082,11 +15184,11 @@ declare namespace Electron {
15082
15184
  * focus change between different `WebContents` and `BrowserView` in the same
15083
15185
  * window.
15084
15186
  */
15085
- on(event: 'focus', listener: Function): this;
15086
- off(event: 'focus', listener: Function): this;
15087
- once(event: 'focus', listener: Function): this;
15088
- addListener(event: 'focus', listener: Function): this;
15089
- removeListener(event: 'focus', listener: Function): this;
15187
+ on(event: 'focus', listener: () => void): this;
15188
+ off(event: 'focus', listener: () => void): this;
15189
+ once(event: 'focus', listener: () => void): this;
15190
+ addListener(event: 'focus', listener: () => void): this;
15191
+ removeListener(event: 'focus', listener: () => void): this;
15090
15192
  /**
15091
15193
  * Emitted when a result is available for `webContents.findInPage` request.
15092
15194
  */
@@ -15175,11 +15277,11 @@ declare namespace Electron {
15175
15277
  /**
15176
15278
  * Emitted when the window leaves a full-screen state triggered by HTML API.
15177
15279
  */
15178
- on(event: 'leave-html-full-screen', listener: Function): this;
15179
- off(event: 'leave-html-full-screen', listener: Function): this;
15180
- once(event: 'leave-html-full-screen', listener: Function): this;
15181
- addListener(event: 'leave-html-full-screen', listener: Function): this;
15182
- removeListener(event: 'leave-html-full-screen', listener: Function): this;
15280
+ on(event: 'leave-html-full-screen', listener: () => void): this;
15281
+ off(event: 'leave-html-full-screen', listener: () => void): this;
15282
+ once(event: 'leave-html-full-screen', listener: () => void): this;
15283
+ addListener(event: 'leave-html-full-screen', listener: () => void): this;
15284
+ removeListener(event: 'leave-html-full-screen', listener: () => void): this;
15183
15285
  /**
15184
15286
  * Emitted when `webContents` wants to do basic auth.
15185
15287
  *
@@ -15208,19 +15310,19 @@ declare namespace Electron {
15208
15310
  /**
15209
15311
  * Emitted when media is paused or done playing.
15210
15312
  */
15211
- on(event: 'media-paused', listener: Function): this;
15212
- off(event: 'media-paused', listener: Function): this;
15213
- once(event: 'media-paused', listener: Function): this;
15214
- addListener(event: 'media-paused', listener: Function): this;
15215
- removeListener(event: 'media-paused', listener: Function): this;
15313
+ on(event: 'media-paused', listener: () => void): this;
15314
+ off(event: 'media-paused', listener: () => void): this;
15315
+ once(event: 'media-paused', listener: () => void): this;
15316
+ addListener(event: 'media-paused', listener: () => void): this;
15317
+ removeListener(event: 'media-paused', listener: () => void): this;
15216
15318
  /**
15217
15319
  * Emitted when media starts playing.
15218
15320
  */
15219
- on(event: 'media-started-playing', listener: Function): this;
15220
- off(event: 'media-started-playing', listener: Function): this;
15221
- once(event: 'media-started-playing', listener: Function): this;
15222
- addListener(event: 'media-started-playing', listener: Function): this;
15223
- removeListener(event: 'media-started-playing', listener: Function): this;
15321
+ on(event: 'media-started-playing', listener: () => void): this;
15322
+ off(event: 'media-started-playing', listener: () => void): this;
15323
+ once(event: 'media-started-playing', listener: () => void): this;
15324
+ addListener(event: 'media-started-playing', listener: () => void): this;
15325
+ removeListener(event: 'media-started-playing', listener: () => void): this;
15224
15326
  /**
15225
15327
  * Emitted when page receives favicon urls.
15226
15328
  */
@@ -15392,11 +15494,11 @@ declare namespace Electron {
15392
15494
  /**
15393
15495
  * Emitted when the unresponsive web page becomes responsive again.
15394
15496
  */
15395
- on(event: 'responsive', listener: Function): this;
15396
- off(event: 'responsive', listener: Function): this;
15397
- once(event: 'responsive', listener: Function): this;
15398
- addListener(event: 'responsive', listener: Function): this;
15399
- removeListener(event: 'responsive', listener: Function): this;
15497
+ on(event: 'responsive', listener: () => void): this;
15498
+ off(event: 'responsive', listener: () => void): this;
15499
+ once(event: 'responsive', listener: () => void): this;
15500
+ addListener(event: 'responsive', listener: () => void): this;
15501
+ removeListener(event: 'responsive', listener: () => void): this;
15400
15502
  /**
15401
15503
  * Emitted when a bluetooth device needs to be selected when a call to
15402
15504
  * `navigator.bluetooth.requestDevice` is made. `callback` should be called with
@@ -15455,11 +15557,11 @@ declare namespace Electron {
15455
15557
  /**
15456
15558
  * Emitted when the web page becomes unresponsive.
15457
15559
  */
15458
- on(event: 'unresponsive', listener: Function): this;
15459
- off(event: 'unresponsive', listener: Function): this;
15460
- once(event: 'unresponsive', listener: Function): this;
15461
- addListener(event: 'unresponsive', listener: Function): this;
15462
- removeListener(event: 'unresponsive', listener: Function): this;
15560
+ on(event: 'unresponsive', listener: () => void): this;
15561
+ off(event: 'unresponsive', listener: () => void): this;
15562
+ once(event: 'unresponsive', listener: () => void): this;
15563
+ addListener(event: 'unresponsive', listener: () => void): this;
15564
+ removeListener(event: 'unresponsive', listener: () => void): this;
15463
15565
  /**
15464
15566
  * Emitted when mouse moves over a link or the keyboard moves the focus to a link.
15465
15567
  */
@@ -16654,11 +16756,11 @@ declare namespace Electron {
16654
16756
  * Emitted when the view's bounds have changed in response to being laid out. The
16655
16757
  * new bounds can be retrieved with `view.getBounds()`.
16656
16758
  */
16657
- on(event: 'bounds-changed', listener: Function): this;
16658
- off(event: 'bounds-changed', listener: Function): this;
16659
- once(event: 'bounds-changed', listener: Function): this;
16660
- addListener(event: 'bounds-changed', listener: Function): this;
16661
- removeListener(event: 'bounds-changed', listener: Function): this;
16759
+ on(event: 'bounds-changed', listener: () => void): this;
16760
+ off(event: 'bounds-changed', listener: () => void): this;
16761
+ once(event: 'bounds-changed', listener: () => void): this;
16762
+ addListener(event: 'bounds-changed', listener: () => void): this;
16763
+ removeListener(event: 'bounds-changed', listener: () => void): this;
16662
16764
  /**
16663
16765
  * WebContentsView
16664
16766
  */
@@ -16877,11 +16979,11 @@ declare namespace Electron {
16877
16979
  /**
16878
16980
  * Emitted when the document is loaded.
16879
16981
  */
16880
- on(event: 'dom-ready', listener: Function): this;
16881
- off(event: 'dom-ready', listener: Function): this;
16882
- once(event: 'dom-ready', listener: Function): this;
16883
- addListener(event: 'dom-ready', listener: Function): this;
16884
- removeListener(event: 'dom-ready', listener: Function): this;
16982
+ on(event: 'dom-ready', listener: () => void): this;
16983
+ off(event: 'dom-ready', listener: () => void): this;
16984
+ once(event: 'dom-ready', listener: () => void): this;
16985
+ addListener(event: 'dom-ready', listener: () => void): this;
16986
+ removeListener(event: 'dom-ready', listener: () => void): this;
16885
16987
  /**
16886
16988
  * A promise that resolves with the result of the executed code or is rejected if
16887
16989
  * execution throws or results in a rejected promise.
@@ -18479,12 +18581,12 @@ declare namespace Electron {
18479
18581
  */
18480
18582
  origin?: string;
18481
18583
  /**
18482
- * can be `""`, `no-referrer`, `no-referrer-when-downgrade`, `origin`,
18584
+ * can be "", `no-referrer`, `no-referrer-when-downgrade`, `origin`,
18483
18585
  * `origin-when-cross-origin`, `unsafe-url`, `same-origin`, `strict-origin`, or
18484
18586
  * `strict-origin-when-cross-origin`. Defaults to
18485
18587
  * `strict-origin-when-cross-origin`.
18486
18588
  */
18487
- referrerPolicy?: string;
18589
+ referrerPolicy?: ('' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'unsafe-url' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin');
18488
18590
  /**
18489
18591
  * can be `default`, `no-store`, `reload`, `no-cache`, `force-cache` or
18490
18592
  * `only-if-cached`.
@@ -18719,7 +18821,7 @@ declare namespace Electron {
18719
18821
  */
18720
18822
  name?: string;
18721
18823
  /**
18722
- * Retrieves cookies whose domains match or are subdomains of `domain`.
18824
+ * Retrieves cookies whose domains match or are subdomains of `domains`.
18723
18825
  */
18724
18826
  domain?: string;
18725
18827
  /**
@@ -23562,11 +23664,11 @@ declare namespace NodeJS {
23562
23664
  * Emitted when Electron has loaded its internal initialization script and is
23563
23665
  * beginning to load the web page or the main script.
23564
23666
  */
23565
- on(event: 'loaded', listener: Function): this;
23566
- off(event: 'loaded', listener: Function): this;
23567
- once(event: 'loaded', listener: Function): this;
23568
- addListener(event: 'loaded', listener: Function): this;
23569
- removeListener(event: 'loaded', listener: Function): this;
23667
+ on(event: 'loaded', listener: () => void): this;
23668
+ off(event: 'loaded', listener: () => void): this;
23669
+ once(event: 'loaded', listener: () => void): this;
23670
+ addListener(event: 'loaded', listener: () => void): this;
23671
+ removeListener(event: 'loaded', listener: () => void): this;
23570
23672
  on(eventName: string | symbol, listener: (...args: any[]) => void): this;
23571
23673
  off(eventName: string | symbol, listener: (...args: any[]) => void): this;
23572
23674
  once(eventName: string | symbol, listener: (...args: any[]) => void): this;