@types/chrome 0.0.181 → 0.0.182
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 +44 -10
- 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, 26 Apr 2022 08:01:41 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
@@ -7394,55 +7394,89 @@ declare namespace chrome.runtime {
|
|
7394
7394
|
/**
|
7395
7395
|
* 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.
|
7396
7396
|
* @since Chrome 26.
|
7397
|
-
* @param responseCallback Optional
|
7398
7397
|
* 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.
|
7399
7398
|
*/
|
7400
|
-
export function sendMessage<M = any, R = any>(message: M, responseCallback
|
7399
|
+
export function sendMessage<M = any, R = any>(message: M, responseCallback: (response: R) => void): void;
|
7401
7400
|
/**
|
7402
7401
|
* 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.
|
7403
7402
|
* @since Chrome 32.
|
7404
|
-
* @param responseCallback Optional
|
7405
7403
|
* 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.
|
7406
7404
|
*/
|
7407
7405
|
export function sendMessage<M = any, R = any>(
|
7408
7406
|
message: M,
|
7409
7407
|
options: MessageOptions,
|
7410
|
-
responseCallback
|
7408
|
+
responseCallback: (response: R) => void,
|
7411
7409
|
): void;
|
7412
7410
|
/**
|
7413
7411
|
* 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.
|
7414
7412
|
* @since Chrome 26.
|
7415
7413
|
* @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.
|
7416
|
-
* @param responseCallback Optional
|
7417
7414
|
* 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.
|
7418
7415
|
*/
|
7419
|
-
export function sendMessage<M = any, R = any>(extensionId: string, message: M, responseCallback
|
7416
|
+
export function sendMessage<M = any, R = any>(extensionId: string, message: M, responseCallback: (response: R) => void): void;
|
7420
7417
|
/**
|
7421
7418
|
* 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.
|
7422
7419
|
* @since Chrome 32.
|
7423
7420
|
* @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.
|
7424
|
-
* @param responseCallback Optional
|
7425
7421
|
* 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.
|
7426
7422
|
*/
|
7427
7423
|
export function sendMessage<Message = any, Response = any>(
|
7428
7424
|
extensionId: string,
|
7429
7425
|
message: Message,
|
7430
7426
|
options: MessageOptions,
|
7431
|
-
responseCallback
|
7427
|
+
responseCallback: (response: Response) => void,
|
7432
7428
|
): void;
|
7429
|
+
/**
|
7430
|
+
* 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.
|
7431
|
+
* @since Chrome 26.
|
7432
|
+
*/
|
7433
|
+
export function sendMessage<M = any, R = any>(message: M): Promise<R>;
|
7434
|
+
/**
|
7435
|
+
* 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.
|
7436
|
+
* @since Chrome 32.
|
7437
|
+
*/
|
7438
|
+
export function sendMessage<M = any, R = any>(
|
7439
|
+
message: M,
|
7440
|
+
options: MessageOptions,
|
7441
|
+
): Promise<R>;
|
7442
|
+
/**
|
7443
|
+
* 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.
|
7444
|
+
* @since Chrome 26.
|
7445
|
+
* @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.
|
7446
|
+
*/
|
7447
|
+
export function sendMessage<M = any, R = any>(extensionId: string, message: M): Promise<R>;
|
7448
|
+
/**
|
7449
|
+
* 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.
|
7450
|
+
* @since Chrome 32.
|
7451
|
+
* @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.
|
7452
|
+
*/
|
7453
|
+
export function sendMessage<Message = any, Response = any>(
|
7454
|
+
extensionId: string,
|
7455
|
+
message: Message,
|
7456
|
+
options: MessageOptions,
|
7457
|
+
): Promise<Response>;
|
7433
7458
|
/**
|
7434
7459
|
* Send a single message to a native application.
|
7435
7460
|
* @since Chrome 28.
|
7436
7461
|
* @param application The of the native messaging host.
|
7437
7462
|
* @param message The message that will be passed to the native messaging host.
|
7438
|
-
* @param responseCallback Optional.
|
7439
7463
|
* Parameter response: The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and runtime.lastError will be set to the error message.
|
7440
7464
|
*/
|
7441
7465
|
export function sendNativeMessage(
|
7442
7466
|
application: string,
|
7443
7467
|
message: Object,
|
7444
|
-
responseCallback
|
7468
|
+
responseCallback: (response: any) => void,
|
7445
7469
|
): void;
|
7470
|
+
/**
|
7471
|
+
* Send a single message to a native application.
|
7472
|
+
* @since Chrome 28.
|
7473
|
+
* @param application The of the native messaging host.
|
7474
|
+
* @param message The message that will be passed to the native messaging host.
|
7475
|
+
*/
|
7476
|
+
export function sendNativeMessage(
|
7477
|
+
application: string,
|
7478
|
+
message: Object,
|
7479
|
+
): Promise<any>;
|
7446
7480
|
/**
|
7447
7481
|
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
|
7448
7482
|
* @since Chrome 41.
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.182",
|
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",
|
@@ -98,6 +98,6 @@
|
|
98
98
|
"@types/filesystem": "*",
|
99
99
|
"@types/har-format": "*"
|
100
100
|
},
|
101
|
-
"typesPublisherContentHash": "
|
101
|
+
"typesPublisherContentHash": "df06856df13b1135f49d2b2d539fb6108ab607f3c1da98be705f0fd3f6ac5538",
|
102
102
|
"typeScriptVersion": "3.9"
|
103
103
|
}
|