@types/nw.js 0.90.0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. nw.js/README.md +2 -2
  2. nw.js/index.d.ts +12 -12
  3. nw.js/package.json +7 -2
nw.js/README.md CHANGED
@@ -8,8 +8,8 @@ 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, 07 Aug 2024 01:34:31 GMT
11
+ * Last updated: Sat, 24 Aug 2024 11:36:15 GMT
12
12
  * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
13
13
 
14
14
  # Credits
15
- These definitions were written by [Ayushman Chhabra](https://github.com/AyushmanChhabra).
15
+ These definitions were written by [Ayushman Chhabra](https://github.com/AyushmanChhabra), and [Zayin Krige](https://github.com/zkrige).
nw.js/index.d.ts CHANGED
@@ -195,16 +195,16 @@ declare global {
195
195
  * Emit when a new source was added.
196
196
  *
197
197
  * @param event {string} Event name
198
- * @param listener {Function(id?,name?,order?,type?,primary?)} The callback that handles the `added` event.
199
- * - (optional) id {string} Is the media id.
200
- * - (optional) name {string} Is the title of the window or screen.
201
- * - (optional) order {number} Is the z-order of the windows, if screens are selected they will appear first.
202
- * - (optional) type {string} Type of the stream: "screen", "window", "other" or "unknown".
203
- * - (optional) primary {boolean} This will be true if the source is the primary monitor. (Windows OS only)
198
+ * @param listener {Function(id,name,order,type,primary)} The callback that handles the `added` event.
199
+ * - id {string} Is the media id.
200
+ * - name {string} Is the title of the window or screen.
201
+ * - order {number} Is the z-order of the windows, if screens are selected they will appear first.
202
+ * - type {string} Type of the stream: "screen", "window", "other" or "unknown".
203
+ * - primary {boolean} This will be true if the source is the primary monitor. (Windows OS only)
204
204
  */
205
205
  on(
206
206
  event: "added",
207
- listener: (id?: string, name?: string, order?: number, type?: string, primary?: boolean) => any,
207
+ listener: (id: string, name: string, order: number, type: string, primary: boolean) => any,
208
208
  ): this;
209
209
 
210
210
  /**
@@ -1280,13 +1280,13 @@ declare global {
1280
1280
  *
1281
1281
  * @param event {string} Event name
1282
1282
  * @param listener {function(byCommandQ?)} The callback that handles the `new-win-policy` event.
1283
- * - (optional) frame {HTMLIFrameElement} Is the object of the child iframe where the request is from, or null if it’s from the top window.
1284
- * - (optional) url {string} Is the address of the requested link
1285
- * - (optional) policy {Object} Is an object contain window policy.
1283
+ * - frame {HTMLIFrameElement | null} Is the object of the child iframe where the request is from, or null if it’s from the top window.
1284
+ * - url {string} Is the address of the requested link
1285
+ * - policy {Object} Is an object contain window policy.
1286
1286
  */
1287
1287
  on(
1288
1288
  event: "new-win-policy",
1289
- listener: (frame?: HTMLIFrameElement | any, url?: string, policy?: WinPolicy) => any,
1289
+ listener: (frame: HTMLIFrameElement | null, url: string, policy: WinPolicy) => any,
1290
1290
  ): this;
1291
1291
 
1292
1292
  /**
@@ -1850,7 +1850,7 @@ declare global {
1850
1850
  open(
1851
1851
  url: string,
1852
1852
  option?: NWJS_Helpers.WindowOpenOption,
1853
- callback?: (new_win?: NWJS_Helpers.win) => void,
1853
+ callback?: (new_win: NWJS_Helpers.win) => void,
1854
1854
  ): void;
1855
1855
  }
1856
1856
 
nw.js/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/nw.js",
3
- "version": "0.90.0",
3
+ "version": "0.91.0",
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",
@@ -9,6 +9,11 @@
9
9
  "name": "Ayushman Chhabra",
10
10
  "githubUsername": "AyushmanChhabra",
11
11
  "url": "https://github.com/AyushmanChhabra"
12
+ },
13
+ {
14
+ "name": "Zayin Krige",
15
+ "githubUsername": "zkrige",
16
+ "url": "https://github.com/zkrige"
12
17
  }
13
18
  ],
14
19
  "main": "",
@@ -22,7 +27,7 @@
22
27
  "dependencies": {
23
28
  "@types/node": "*"
24
29
  },
25
- "typesPublisherContentHash": "0207f6670891a501e4bafa895707c0a60e440505986bce6db220d58d41493a7e",
30
+ "typesPublisherContentHash": "d20242d4b3135c2bd707deef2d52705d6309457ab44c383bee10a0180cf012f1",
26
31
  "typeScriptVersion": "4.8",
27
32
  "nonNpm": true
28
33
  }