@types/chrome 0.0.205 → 0.0.207
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +1 -1
- chrome/index.d.ts +11 -4
- 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:
|
11
|
+
* Last updated: Tue, 10 Jan 2023 05:32:53 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
@@ -7447,7 +7447,7 @@ declare namespace chrome.runtime {
|
|
7447
7447
|
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
|
7448
7448
|
* Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
7449
7449
|
*/
|
7450
|
-
export function sendMessage<M = any, R = any>(extensionId: string, message: M, responseCallback: (response: R) => void): void;
|
7450
|
+
export function sendMessage<M = any, R = any>(extensionId: string | undefined | null, message: M, responseCallback: (response: R) => void): void;
|
7451
7451
|
/**
|
7452
7452
|
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
|
7453
7453
|
* @since Chrome 32.
|
@@ -7455,7 +7455,7 @@ declare namespace chrome.runtime {
|
|
7455
7455
|
* Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
7456
7456
|
*/
|
7457
7457
|
export function sendMessage<Message = any, Response = any>(
|
7458
|
-
extensionId: string,
|
7458
|
+
extensionId: string | undefined | null,
|
7459
7459
|
message: Message,
|
7460
7460
|
options: MessageOptions,
|
7461
7461
|
responseCallback: (response: Response) => void,
|
@@ -7478,14 +7478,14 @@ declare namespace chrome.runtime {
|
|
7478
7478
|
* @since Chrome 26.
|
7479
7479
|
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
|
7480
7480
|
*/
|
7481
|
-
export function sendMessage<M = any, R = any>(extensionId: string, message: M): Promise<R>;
|
7481
|
+
export function sendMessage<M = any, R = any>(extensionId: string | undefined | null, message: M): Promise<R>;
|
7482
7482
|
/**
|
7483
7483
|
* Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
|
7484
7484
|
* @since Chrome 32.
|
7485
7485
|
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
|
7486
7486
|
*/
|
7487
7487
|
export function sendMessage<Message = any, Response = any>(
|
7488
|
-
extensionId: string,
|
7488
|
+
extensionId: string | undefined | null,
|
7489
7489
|
message: Message,
|
7490
7490
|
options: MessageOptions,
|
7491
7491
|
): Promise<Response>;
|
@@ -9694,6 +9694,13 @@ declare namespace chrome.tabs {
|
|
9694
9694
|
* @since Chrome 16.
|
9695
9695
|
*/
|
9696
9696
|
export function reload(callback?: () => void): void;
|
9697
|
+
/**
|
9698
|
+
* Duplicates a tab.
|
9699
|
+
* @since Chrome 23.
|
9700
|
+
* @param tabId The ID of the tab which is to be duplicated.
|
9701
|
+
* @return The `duplicate` method provides its result via callback or returned as a `Promise` (MV3 only).
|
9702
|
+
*/
|
9703
|
+
export function duplicate(tabId: number): Promise<Tab | undefined>;
|
9697
9704
|
/**
|
9698
9705
|
* Duplicates a tab.
|
9699
9706
|
* @since Chrome 23.
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.207",
|
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",
|
@@ -88,6 +88,6 @@
|
|
88
88
|
"@types/filesystem": "*",
|
89
89
|
"@types/har-format": "*"
|
90
90
|
},
|
91
|
-
"typesPublisherContentHash": "
|
91
|
+
"typesPublisherContentHash": "e6b5d60c53c915a0bb80da592d14ee3f9857d00530301f89fa34ae8ea36dcfe9",
|
92
92
|
"typeScriptVersion": "4.2"
|
93
93
|
}
|