@types/chrome 0.3.1 → 0.3.2
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.
- chrome/README.md +1 -1
- chrome/index.d.ts +43 -14
- chrome/package.json +2 -2
chrome/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Mon, 28 Sep 2026
|
|
11
|
+
* Last updated: Mon, 28 Sep 2026 21:04:10 GMT
|
|
12
12
|
* Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
|
|
13
13
|
|
|
14
14
|
# Credits
|
chrome/index.d.ts
CHANGED
|
@@ -2044,7 +2044,7 @@ declare namespace chrome {
|
|
|
2044
2044
|
const ACTION_MENU_TOP_LEVEL_LIMIT: 6;
|
|
2045
2045
|
|
|
2046
2046
|
/**
|
|
2047
|
-
* Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in {@link
|
|
2047
|
+
* Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in {@link runtime.lastError}.
|
|
2048
2048
|
* @return The ID of the newly created item.
|
|
2049
2049
|
*/
|
|
2050
2050
|
function create(createProperties: CreateProperties, callback?: () => void): number | string;
|
|
@@ -9320,14 +9320,31 @@ declare namespace chrome {
|
|
|
9320
9320
|
includeTlsChannelId?: boolean | undefined;
|
|
9321
9321
|
}
|
|
9322
9322
|
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9323
|
+
type InstalledDetails =
|
|
9324
|
+
| {
|
|
9325
|
+
/** The reason that this event is being dispatched. */
|
|
9326
|
+
reason: `${OnInstalledReason.UPDATE}`;
|
|
9327
|
+
/** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
|
|
9328
|
+
previousVersion: string;
|
|
9329
|
+
/** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
|
|
9330
|
+
id?: undefined;
|
|
9331
|
+
}
|
|
9332
|
+
| {
|
|
9333
|
+
/** The reason that this event is being dispatched. */
|
|
9334
|
+
reason: `${OnInstalledReason.SHARED_MODULE_UPDATE}`;
|
|
9335
|
+
/** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
|
|
9336
|
+
previousVersion?: undefined;
|
|
9337
|
+
/** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
|
|
9338
|
+
id: string;
|
|
9339
|
+
}
|
|
9340
|
+
| {
|
|
9341
|
+
/** The reason that this event is being dispatched. */
|
|
9342
|
+
reason: `${OnInstalledReason.INSTALL}` | `${OnInstalledReason.CHROME_UPDATE}`;
|
|
9343
|
+
/** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
|
|
9344
|
+
previousVersion?: undefined;
|
|
9345
|
+
/** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
|
|
9346
|
+
id?: undefined;
|
|
9347
|
+
};
|
|
9331
9348
|
|
|
9332
9349
|
/**
|
|
9333
9350
|
* A context hosting extension content.
|
|
@@ -9412,7 +9429,7 @@ declare namespace chrome {
|
|
|
9412
9429
|
postMessage: (message: any) => void;
|
|
9413
9430
|
/** Immediately disconnect the port. Calling `disconnect()` on an already-disconnected port has no effect. When a port is disconnected, no new events will be dispatched to this port. */
|
|
9414
9431
|
disconnect: () => void;
|
|
9415
|
-
/** This property will **only** be present on ports passed to {@link runtime.onConnect onConnect} / {@link runtime.onConnectExternal onConnectExternal} / {@link runtime.
|
|
9432
|
+
/** This property will **only** be present on ports passed to {@link runtime.onConnect onConnect} / {@link runtime.onConnectExternal onConnectExternal} / {@link runtime.onConnectNative onConnectNative} listeners. */
|
|
9416
9433
|
sender?: MessageSender;
|
|
9417
9434
|
/** Fired when the port is disconnected from the other end(s). {@link runtime.lastError} may be set if the port was disconnected by an error. If the port is closed via {@link Port.disconnect disconnect}, then this event is _only_ fired on the other end. This event is fired at most once (see also Port lifetime). */
|
|
9418
9435
|
onDisconnect: events.Event<(port: Port) => void>;
|
|
@@ -9555,7 +9572,6 @@ declare namespace chrome {
|
|
|
9555
9572
|
ManifestPermission,
|
|
9556
9573
|
| "debugger"
|
|
9557
9574
|
| "declarativeNetRequest"
|
|
9558
|
-
| "devtools"
|
|
9559
9575
|
| "experimental"
|
|
9560
9576
|
| "fontSettings"
|
|
9561
9577
|
| "geolocation"
|
|
@@ -9741,6 +9757,8 @@ declare namespace chrome {
|
|
|
9741
9757
|
omnibox?: { keyword: string } | undefined;
|
|
9742
9758
|
/** Specifies a path to an options.html file for the extension to use as an options page. */
|
|
9743
9759
|
options_page?: string | undefined;
|
|
9760
|
+
/** URL of the web app that replaces this extension. */
|
|
9761
|
+
replacement_web_app?: string | undefined;
|
|
9744
9762
|
/** Lists technologies required to use the extension. */
|
|
9745
9763
|
requirements?: {
|
|
9746
9764
|
"3D"?: { features?: string[] | undefined } | undefined;
|
|
@@ -9756,6 +9774,12 @@ declare namespace chrome {
|
|
|
9756
9774
|
short_name?: string | undefined;
|
|
9757
9775
|
/** Declares a JSON schema for the managed storage area. */
|
|
9758
9776
|
storage?: { managed_schema: string } | undefined;
|
|
9777
|
+
/**
|
|
9778
|
+
* An array of trial tokens to enable Origin Trial and Deprecation Trial features in extension contexts. You can browse and register for active trials on the active trials page.
|
|
9779
|
+
*
|
|
9780
|
+
* To participate in multiple trials simultaneously, include each token as a separate array entry.
|
|
9781
|
+
*/
|
|
9782
|
+
trial_tokens?: string[] | undefined;
|
|
9759
9783
|
/** Registers the extension as a text to speech engine. */
|
|
9760
9784
|
tts_engine?: {
|
|
9761
9785
|
voices: Array<{
|
|
@@ -9882,6 +9906,11 @@ declare namespace chrome {
|
|
|
9882
9906
|
/** Indicates whether the extension's options page will be opened in a new tab. If set to `false`, the extension's options page is embedded in `chrome://extensions` rather than opened in a new tab. */
|
|
9883
9907
|
open_in_tab?: boolean | undefined;
|
|
9884
9908
|
} | undefined;
|
|
9909
|
+
/**
|
|
9910
|
+
* The message serialization format used to communicate with extension pages/content scripts/frames running in this extension. The default value is "json".
|
|
9911
|
+
* @since Chrome 148
|
|
9912
|
+
*/
|
|
9913
|
+
message_serialization?: "json" | "structured_clone" | undefined;
|
|
9885
9914
|
/**
|
|
9886
9915
|
* Maps MIME types to the extension pages that render them. As of Chrome 151, `application/pdf` is the only MIME type available to public handlers. Declaring an unsupported MIME type causes an installation warning.
|
|
9887
9916
|
* @since Chrome 151
|
|
@@ -10080,7 +10109,7 @@ declare namespace chrome {
|
|
|
10080
10109
|
*
|
|
10081
10110
|
* The precise behavior may depend on your manifest's options_ui or options_page key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
|
|
10082
10111
|
*
|
|
10083
|
-
* If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link runtime.lastError lastError}
|
|
10112
|
+
* If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link runtime.lastError lastError}.
|
|
10084
10113
|
*
|
|
10085
10114
|
* Can return its result via Promise in Manifest V3 or later since Chrome 99
|
|
10086
10115
|
*/
|
|
@@ -10135,13 +10164,13 @@ declare namespace chrome {
|
|
|
10135
10164
|
|
|
10136
10165
|
/**
|
|
10137
10166
|
* Fired when a connection is made from a user script from this extension.
|
|
10138
|
-
* @since
|
|
10167
|
+
* @since Chrome 115, MV3
|
|
10139
10168
|
*/
|
|
10140
10169
|
const onUserScriptConnect: events.Event<(port: Port) => void>;
|
|
10141
10170
|
|
|
10142
10171
|
/**
|
|
10143
10172
|
* Fired when a message is sent from a user script associated with the same extension.
|
|
10144
|
-
* @since
|
|
10173
|
+
* @since Chrome 115, MV3
|
|
10145
10174
|
*/
|
|
10146
10175
|
const onUserScriptMessage: events.Event<
|
|
10147
10176
|
(message: any, sender: MessageSender, sendResponse: (response?: any) => void) => void
|
chrome/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chrome",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "TypeScript definitions for chrome",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"@types/har-format": "*"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {},
|
|
57
|
-
"typesPublisherContentHash": "
|
|
57
|
+
"typesPublisherContentHash": "c958f1f1f0fdca9974a3d23c01aace79ba0b941c3831e233535929542b6e690d",
|
|
58
58
|
"typeScriptVersion": "5.6"
|
|
59
59
|
}
|