@types/chrome 0.0.193 → 0.0.194

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. chrome/README.md +1 -1
  2. chrome/index.d.ts +16 -2
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Chrome extension development (http://
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 05 Jul 2022 00:02:16 GMT
11
+ * Last updated: Fri, 19 Aug 2022 13:32:28 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
  * Global values: `chrome`
14
14
 
chrome/index.d.ts CHANGED
@@ -9565,7 +9565,7 @@ declare namespace chrome.tabs {
9565
9565
  * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
9566
9566
  * @since Chrome 20.
9567
9567
  */
9568
- export function sendMessage<M = any, R = any>(tabId: number, message: M, responseCallback?: (response: R) => void): void;
9568
+ export function sendMessage<M = any, R = any>(tabId: number, message: M, responseCallback: (response: R) => void): void;
9569
9569
  /**
9570
9570
  * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
9571
9571
  * @since Chrome 41.
@@ -9576,8 +9576,22 @@ declare namespace chrome.tabs {
9576
9576
  tabId: number,
9577
9577
  message: M,
9578
9578
  options: MessageSendOptions,
9579
- responseCallback?: (response: R) => void,
9579
+ responseCallback: (response: R) => void,
9580
9580
  ): void;
9581
+ /**
9582
+ * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
9583
+ * @since Chrome 99
9584
+ */
9585
+ export function sendMessage<M = any, R = any>(tabId: number, message: M): Promise<R>;
9586
+ /**
9587
+ * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
9588
+ * @since Chrome 99
9589
+ */
9590
+ export function sendMessage<M = any, R = any>(
9591
+ tabId: number,
9592
+ message: M,
9593
+ options: MessageSendOptions
9594
+ ): Promise<R>;
9581
9595
  /**
9582
9596
  * Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.
9583
9597
  * @deprecated since Chrome 33. Please use runtime.sendMessage.
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.193",
3
+ "version": "0.0.194",
4
4
  "description": "TypeScript definitions for Chrome extension development",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -93,6 +93,6 @@
93
93
  "@types/filesystem": "*",
94
94
  "@types/har-format": "*"
95
95
  },
96
- "typesPublisherContentHash": "5b4b19a45af72fa27d09cf5ab83b562d2063984b64c182f7836f54e52c39561e",
96
+ "typesPublisherContentHash": "349e3bb45667342e85a56de4b8c839bb3051ba69d3ce9bcca7a278db4c4ca645",
97
97
  "typeScriptVersion": "4.0"
98
98
  }