@types/nw.js 0.13.16 → 0.13.18

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.
Files changed (4) hide show
  1. nw.js/LICENSE +0 -0
  2. nw.js/README.md +1 -1
  3. nw.js/index.d.ts +40 -41
  4. nw.js/package.json +3 -3
nw.js/LICENSE CHANGED
File without changes
nw.js/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for nw.js (http://nwjs.io).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nw.js.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 05 Oct 2022 07:02:54 GMT
11
+ * Last updated: Sat, 23 Sep 2023 20:38:33 GMT
12
12
  * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
13
13
  * Global values: none
14
14
 
nw.js/index.d.ts CHANGED
@@ -4,13 +4,13 @@
4
4
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
5
 
6
6
  /// <reference types="node" />
7
- import { EventEmitter } from 'events';
7
+ import { EventEmitter } from "events";
8
8
 
9
9
  declare global {
10
10
  /**
11
11
  * Helpers class and interfaces defined here, to make `nw` module cleaner.
12
12
  */
13
- module NWJS_Helpers {
13
+ namespace NWJS_Helpers {
14
14
  /**
15
15
  * The clipboard object.
16
16
  */
@@ -94,7 +94,7 @@ declare global {
94
94
  /**
95
95
  * {string} (Optional) The type of the item. Three types are accepted: normal, checkbox, separator
96
96
  */
97
- type?: string | 'normal' | 'checkbox' | 'separator' | undefined;
97
+ type?: string | "normal" | "checkbox" | "separator" | undefined;
98
98
 
99
99
  /**
100
100
  * {Function} (Optional) The callback function when item is triggered by mouse click or keyboard shortcut
@@ -208,7 +208,7 @@ declare global {
208
208
  * - (optional) primary {boolean} This will be true if the source is the primary monitor. (Windows OS only)
209
209
  */
210
210
  on(
211
- event: 'added',
211
+ event: "added",
212
212
  listener: (id?: string, name?: string, order?: number, type?: string, primary?: boolean) => any,
213
213
  ): this;
214
214
 
@@ -219,7 +219,7 @@ declare global {
219
219
  * @param listener {Function(order?)} The callback that handles the `remove` event.
220
220
  * - (optional) order {number} Is the order of the media source that is no longer capturable.
221
221
  */
222
- on(event: 'removed', listener: (order?: number) => any): this;
222
+ on(event: "removed", listener: (order?: number) => any): this;
223
223
 
224
224
  /**
225
225
  * Emit when the Z-order of a source changed (this may change for windows as others are focused).
@@ -230,7 +230,7 @@ declare global {
230
230
  * - (optional) new_order {number} Is the new z-order.
231
231
  * - (optional) old_order {number} Is the old z-order.
232
232
  */
233
- on(event: 'orderchanged', listener: (id?: string, new_order?: number, old_order?: number) => any): this;
233
+ on(event: "orderchanged", listener: (id?: string, new_order?: number, old_order?: number) => any): this;
234
234
 
235
235
  /**
236
236
  * Emit when the name of the source has changed. This can happen when a window changes title.
@@ -240,7 +240,7 @@ declare global {
240
240
  * - (optional) id {string} Is the media id of the screen or window that has a name changed.
241
241
  * - (optional) name {string} Is the new name of the screen or window.
242
242
  */
243
- on(event: 'namechanged', listener: (id?: string, name?: string) => any): this;
243
+ on(event: "namechanged", listener: (id?: string, name?: string) => any): this;
244
244
 
245
245
  /**
246
246
  * Emit when the thumbnail of a source changed.
@@ -250,7 +250,7 @@ declare global {
250
250
  * - (optional) id {string} Is the media id of the screen or window that has an updated thumbnail.
251
251
  * - (optional) name {string} Is the base64 encoded png of the thumbnail.
252
252
  */
253
- on(event: 'thumbnailchanged', listener: (id?: string, thumbnail?: string) => any): this;
253
+ on(event: "thumbnailchanged", listener: (id?: string, thumbnail?: string) => any): this;
254
254
  }
255
255
 
256
256
  /**
@@ -457,7 +457,7 @@ declare global {
457
457
  /**
458
458
  * The cookie's same-site status (i.e. whether the cookie is sent with cross-site requests).
459
459
  */
460
- sameSite: string | 'no_restriction' | 'lax' | 'strict';
460
+ sameSite: string | "no_restriction" | "lax" | "strict";
461
461
 
462
462
  /**
463
463
  * True if the cookie is a session cookie, as opposed to a persistent cookie with an expiration date.
@@ -577,7 +577,7 @@ declare global {
577
577
  /**
578
578
  * The cookie's same-site status: defaults to 'no_restriction'.
579
579
  */
580
- sameSite?: string | 'no_restriction' | 'lax' | 'strict' | undefined;
580
+ sameSite?: string | "no_restriction" | "lax" | "strict" | undefined;
581
581
 
582
582
  /**
583
583
  * The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie.
@@ -647,7 +647,7 @@ declare global {
647
647
  /**
648
648
  * The underlying reason behind the cookie's change.
649
649
  */
650
- cause: string | 'evicted' | 'expired' | 'explicit' | 'expired_overwrite' | 'overwrite';
650
+ cause: string | "evicted" | "expired" | "explicit" | "expired_overwrite" | "overwrite";
651
651
  }
652
652
 
653
653
  /**
@@ -682,7 +682,7 @@ declare global {
682
682
  /**
683
683
  * Control the options for the new popup window.
684
684
  *
685
- *@param m {Object} The object is in the same format as the Window subfields in manifest format.
685
+ * @param m {Object} The object is in the same format as the Window subfields in manifest format.
686
686
  */
687
687
  setNewWindowManifest(m: WindowOption): void;
688
688
  }
@@ -1151,7 +1151,7 @@ declare global {
1151
1151
  * @param listener {function(byCommandQ?)} The callback that handles the `close` event.
1152
1152
  * - (optional) byCommandQ {string} Whether it’s being closed by ⌘+Q.
1153
1153
  */
1154
- on(event: 'close', listener: (byCommandQ?: string | any) => any): this;
1154
+ on(event: "close", listener: (byCommandQ?: string | any) => any): this;
1155
1155
 
1156
1156
  /**
1157
1157
  * The closed event is emitted after corresponding window is closed.
@@ -1159,7 +1159,7 @@ declare global {
1159
1159
  * @param event {string} Event name
1160
1160
  * @param listener {function} The callback that handles the `closed` event.
1161
1161
  */
1162
- on(event: 'closed', listener: () => any): this;
1162
+ on(event: "closed", listener: () => any): this;
1163
1163
 
1164
1164
  /**
1165
1165
  * Emitted when the window starts to reload, normally you cannot catch this event because usually it’s emitted before you actually setup the callback.
@@ -1167,7 +1167,7 @@ declare global {
1167
1167
  * @param event {string} Event name
1168
1168
  * @param listener {function} The callback that handles the `loading` event.
1169
1169
  */
1170
- on(event: 'loading', listener: () => any): this;
1170
+ on(event: "loading", listener: () => any): this;
1171
1171
 
1172
1172
  /**
1173
1173
  * Emitted when the window is fully loaded, this event behaves the same with window.onload, but doesn’t rely on the DOM.
@@ -1175,7 +1175,7 @@ declare global {
1175
1175
  * @param event {string} Event name
1176
1176
  * @param listener {function} The callback that handles the `loaded` event.
1177
1177
  */
1178
- on(event: 'loaded', listener: () => any): this;
1178
+ on(event: "loaded", listener: () => any): this;
1179
1179
 
1180
1180
  /**
1181
1181
  * Emitted when the document object in this window or a child iframe is available, after all files are loaded, but before DOM is constructed or any script is run.
@@ -1184,7 +1184,7 @@ declare global {
1184
1184
  * @param listener {function(byCommandQ?)} The callback that handles the `document-start` event.
1185
1185
  * - (optional) frame {HTMLIFrameElement|any} Is the iframe object, or null if the event is for the window..
1186
1186
  */
1187
- on(event: 'document-start', listener: (frame: HTMLIFrameElement | any) => any): this;
1187
+ on(event: "document-start", listener: (frame: HTMLIFrameElement | any) => any): this;
1188
1188
 
1189
1189
  /**
1190
1190
  * Emitted when the document object in this window or a child iframe is unloaded, but before the onunload event is emitted.
@@ -1193,7 +1193,7 @@ declare global {
1193
1193
  * @param listener {function(byCommandQ?)} The callback that handles the `document-end` event.
1194
1194
  * - (optional) frame {HTMLIFrameElement|any} Is the iframe object, or null if the event is for the window..
1195
1195
  */
1196
- on(event: 'document-end', listener: (frame: HTMLIFrameElement | any) => any): this;
1196
+ on(event: "document-end", listener: (frame: HTMLIFrameElement | any) => any): this;
1197
1197
 
1198
1198
  /**
1199
1199
  * Emitted when window gets focus.
@@ -1201,7 +1201,7 @@ declare global {
1201
1201
  * @param event {string} Event name
1202
1202
  * @param listener {function} The callback that handles the `focus` event.
1203
1203
  */
1204
- on(event: 'focus', listener: () => any): this;
1204
+ on(event: "focus", listener: () => any): this;
1205
1205
 
1206
1206
  /**
1207
1207
  * Emitted when window loses focus.
@@ -1209,7 +1209,7 @@ declare global {
1209
1209
  * @param event {string} Event name
1210
1210
  * @param listener {function} The callback that handles the `blur` event.
1211
1211
  */
1212
- on(event: 'blur', listener: () => any): this;
1212
+ on(event: "blur", listener: () => any): this;
1213
1213
 
1214
1214
  /**
1215
1215
  * Emitted when window is minimized.
@@ -1217,7 +1217,7 @@ declare global {
1217
1217
  * @param event {string} Event name
1218
1218
  * @param listener {function} The callback that handles the `minimize` event.
1219
1219
  */
1220
- on(event: 'minimize', listener: () => any): this;
1220
+ on(event: "minimize", listener: () => any): this;
1221
1221
 
1222
1222
  /**
1223
1223
  * Emitted when window is restored from minimize, maximize and fullscreen state.
@@ -1225,7 +1225,7 @@ declare global {
1225
1225
  * @param event {string} Event name
1226
1226
  * @param listener {function} The callback that handles the `restore` event.
1227
1227
  */
1228
- on(event: 'restore', listener: () => any): this;
1228
+ on(event: "restore", listener: () => any): this;
1229
1229
 
1230
1230
  /**
1231
1231
  * Emitted when window is maximized.
@@ -1233,7 +1233,7 @@ declare global {
1233
1233
  * @param event {string} Event name
1234
1234
  * @param listener {function} The callback that handles the `maximize` event.
1235
1235
  */
1236
- on(event: 'maximize', listener: () => any): this;
1236
+ on(event: "maximize", listener: () => any): this;
1237
1237
 
1238
1238
  /**
1239
1239
  * Emitted after window is moved.
@@ -1243,7 +1243,7 @@ declare global {
1243
1243
  * - (optional) x {Integer} The new location of the left corner of the window.
1244
1244
  * - (optional) y {Integer} The new location of the top corner of the window.
1245
1245
  */
1246
- on(event: 'move', listener: (x?: number, y?: number) => any): this;
1246
+ on(event: "move", listener: (x?: number, y?: number) => any): this;
1247
1247
 
1248
1248
  /**
1249
1249
  * Emitted after window is resized.
@@ -1253,7 +1253,7 @@ declare global {
1253
1253
  * - (optional) width {Integer} The new width of the window.
1254
1254
  * - (optional) height {Integer} The new height of the window.
1255
1255
  */
1256
- on(event: 'resize', listener: (width?: number, height?: number) => any): this;
1256
+ on(event: "resize", listener: (width?: number, height?: number) => any): this;
1257
1257
 
1258
1258
  /**
1259
1259
  * Emitted when window enters fullscreen state.
@@ -1261,7 +1261,7 @@ declare global {
1261
1261
  * @param event {string} Event name
1262
1262
  * @param listener {function} The callback that handles the `enter-fullscreen` event.
1263
1263
  */
1264
- on(event: 'enter-fullscreen', listener: () => any): this;
1264
+ on(event: "enter-fullscreen", listener: () => any): this;
1265
1265
 
1266
1266
  /**
1267
1267
  * Emitted when window zooming changed.
@@ -1270,7 +1270,7 @@ declare global {
1270
1270
  * @param listener {function(byCommandQ?)} The callback that handles the `zoom` event.
1271
1271
  * - (optional) zoom {Integer} Indicating the new zoom level
1272
1272
  */
1273
- on(event: 'zoom', listener: (zoom?: number) => any): this;
1273
+ on(event: "zoom", listener: (zoom?: number) => any): this;
1274
1274
 
1275
1275
  /**
1276
1276
  * Emitted after Devtools is closed.
@@ -1278,7 +1278,7 @@ declare global {
1278
1278
  * @param event {string} Event name
1279
1279
  * @param listener {function} The callback that handles the `devtools-closed` event.
1280
1280
  */
1281
- on(event: 'devtools-closed', listener: () => any): this;
1281
+ on(event: "devtools-closed", listener: () => any): this;
1282
1282
 
1283
1283
  /**
1284
1284
  * Emitted when a new window is requested from this window or a child iframe.
@@ -1290,7 +1290,7 @@ declare global {
1290
1290
  * - (optional) policy {Object} Is an object contain window policy.
1291
1291
  */
1292
1292
  on(
1293
- event: 'new-win-policy',
1293
+ event: "new-win-policy",
1294
1294
  listener: (frame?: HTMLIFrameElement | any, url?: string, policy?: WinPolicy) => any,
1295
1295
  ): this;
1296
1296
 
@@ -1304,7 +1304,7 @@ declare global {
1304
1304
  * - (optional) policy {Object} Is an object contain window policy.
1305
1305
  */
1306
1306
  on(
1307
- event: 'navigation',
1307
+ event: "navigation",
1308
1308
  listener: (frame?: HTMLIFrameElement | any, url?: string, policy?: WinNavigationPolicy) => any,
1309
1309
  ): this;
1310
1310
  }
@@ -1434,7 +1434,7 @@ declare global {
1434
1434
  * @param listener {Function(args?)} The callback that handles the `open` event.
1435
1435
  * - (optional) args {string} the full command line of the program.
1436
1436
  */
1437
- on(event: 'open', listener: (args?: string) => any): this;
1437
+ on(event: "open", listener: (args?: string) => any): this;
1438
1438
 
1439
1439
  /**
1440
1440
  * This event is sent when the user clicks the dock icon for an already running application. This is a Mac specific feature.
@@ -1442,7 +1442,7 @@ declare global {
1442
1442
  * @param event {string} Event name
1443
1443
  * @param listener {Function} The callback that handles the `reopen` event.
1444
1444
  */
1445
- on(event: 'reopen', listener: () => any): this;
1445
+ on(event: "reopen", listener: () => any): this;
1446
1446
  }
1447
1447
 
1448
1448
  /* Clipboard: http://docs.nwjs.io/en/latest/References/Clipboard/ */
@@ -1596,7 +1596,7 @@ declare global {
1596
1596
  * @param event {string} Event name
1597
1597
  * @param listener {Function} The callback that handles the `click` event.
1598
1598
  */
1599
- on(event: 'click', listener: () => any): this;
1599
+ on(event: "click", listener: () => any): this;
1600
1600
  }
1601
1601
 
1602
1602
  /* Screen: http://docs.nwjs.io/en/latest/References/Screen/ */
@@ -1616,7 +1616,6 @@ declare global {
1616
1616
  screens: NWJS_Helpers.screen[];
1617
1617
 
1618
1618
  /**
1619
- *
1620
1619
  * @param sources {string[]} Array of source types.
1621
1620
  * @param callback {Function} callback function with chosed streamId.
1622
1621
  * - (optional) streamId {string} streamId will be false if failed to execute or existing session is alive.
@@ -1637,7 +1636,7 @@ declare global {
1637
1636
  * @param listener {Function(screen?)} The callback that handles the `displayBoundsChanged` event.
1638
1637
  * - (optional) screen {screen} screen object
1639
1638
  */
1640
- on(event: 'displayBoundsChanged', listener: (screen: NWJS_Helpers.screen) => any): this;
1639
+ on(event: "displayBoundsChanged", listener: (screen: NWJS_Helpers.screen) => any): this;
1641
1640
 
1642
1641
  /**
1643
1642
  * Emitted when a new screen added.
@@ -1646,7 +1645,7 @@ declare global {
1646
1645
  * @param listener {Function(screen?)} The callback that handles the `displayAdded` event.
1647
1646
  * - (optional) screen {screen} screen object
1648
1647
  */
1649
- on(event: 'displayAdded ', listener: (screen: NWJS_Helpers.screen) => any): this;
1648
+ on(event: "displayAdded ", listener: (screen: NWJS_Helpers.screen) => any): this;
1650
1649
 
1651
1650
  /**
1652
1651
  * Emitted when existing screen removed.
@@ -1655,7 +1654,7 @@ declare global {
1655
1654
  * @param listener {Function(screen?)} The callback that handles the `displayRemoved` event.
1656
1655
  * - (optional) screen {screen} screen object
1657
1656
  */
1658
- on(event: 'displayRemoved ', listener: (screen: NWJS_Helpers.screen) => any): this;
1657
+ on(event: "displayRemoved ", listener: (screen: NWJS_Helpers.screen) => any): this;
1659
1658
  }
1660
1659
 
1661
1660
  /* Shell: http://docs.nwjs.io/en/latest/References/Shell/ */
@@ -1722,7 +1721,7 @@ declare global {
1722
1721
  * @param event {string} Event name
1723
1722
  * @param listener {Function} The callback that handles the `active` event.
1724
1723
  */
1725
- on(event: 'active', listener: () => any): this;
1724
+ on(event: "active", listener: () => any): this;
1726
1725
 
1727
1726
  /**
1728
1727
  * Get or set the failed callback of a Shortcut. It will be called when application passes an invalid key, or failed to register the key.
@@ -1731,7 +1730,7 @@ declare global {
1731
1730
  * @param listener {Function(msg?)} The callback that handles the `failed` event.
1732
1731
  * - (optional) msg {string} Failure message
1733
1732
  */
1734
- on(event: 'failed', listener: (msg?: string) => any): this;
1733
+ on(event: "failed", listener: (msg?: string) => any): this;
1735
1734
  }
1736
1735
 
1737
1736
  /* Tray: http://docs.nwjs.io/en/latest/References/Tray/ */
@@ -1788,7 +1787,7 @@ declare global {
1788
1787
  * @param event {string} Event name
1789
1788
  * @param listener {Function} The callback that handles the `click` event.
1790
1789
  */
1791
- on(event: 'click ', listener: () => any): this;
1790
+ on(event: "click ", listener: () => any): this;
1792
1791
  }
1793
1792
 
1794
1793
  /* Window: http://docs.nwjs.io/en/latest/References/Window/ */
@@ -1835,7 +1834,7 @@ declare global {
1835
1834
  }
1836
1835
  }
1837
1836
 
1838
- declare module 'nw.gui' {
1837
+ declare module "nw.gui" {
1839
1838
  export class Menu extends nw.Menu {}
1840
1839
  export class MenuItem extends nw.MenuItem {}
1841
1840
  export class Shortcut extends nw.Shortcut {}
nw.js/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/nw.js",
3
- "version": "0.13.16",
3
+ "version": "0.13.18",
4
4
  "description": "TypeScript definitions for nw.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nw.js",
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  "dependencies": {
23
23
  "@types/node": "*"
24
24
  },
25
- "typesPublisherContentHash": "b6e0f4785415b133b69878b425b33cac4f80347b6c5f891064a2f8c298b8c5cc",
26
- "typeScriptVersion": "4.1"
25
+ "typesPublisherContentHash": "c4cac26290840a2d500663e66b64376142bf82ff930d07a42eced587c213c809",
26
+ "typeScriptVersion": "4.5"
27
27
  }