@types/chrome 0.2.3 → 0.2.4
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 +67 -28
- 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: Fri, 31 Jul 2026
|
|
11
|
+
* Last updated: Fri, 31 Jul 2026 19:30:21 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
|
@@ -1071,7 +1071,10 @@ declare namespace chrome {
|
|
|
1071
1071
|
|
|
1072
1072
|
/** A set of data types. Missing data types are interpreted as `false`. */
|
|
1073
1073
|
interface DataTypeSet {
|
|
1074
|
-
/**
|
|
1074
|
+
/**
|
|
1075
|
+
* Websites' WebSQL data.
|
|
1076
|
+
* @deprecated since Chrome 139. Support for WebSQL has been removed. This data type will be ignored.
|
|
1077
|
+
*/
|
|
1075
1078
|
webSQL?: boolean | undefined;
|
|
1076
1079
|
/** Websites' IndexedDB data. */
|
|
1077
1080
|
indexedDB?: boolean | undefined;
|
|
@@ -1093,7 +1096,10 @@ declare namespace chrome {
|
|
|
1093
1096
|
cache?: boolean | undefined;
|
|
1094
1097
|
/** Cache storage. */
|
|
1095
1098
|
cacheStorage?: boolean | undefined;
|
|
1096
|
-
/**
|
|
1099
|
+
/**
|
|
1100
|
+
* Websites' appcaches.
|
|
1101
|
+
* @deprecated since Chrome 98. Support for appcache has been removed. This data type will be ignored.
|
|
1102
|
+
*/
|
|
1097
1103
|
appcache?: boolean | undefined;
|
|
1098
1104
|
/** Websites' file systems. */
|
|
1099
1105
|
fileSystems?: boolean | undefined;
|
|
@@ -1192,6 +1198,7 @@ declare namespace chrome {
|
|
|
1192
1198
|
* Clears websites' WebSQL data.
|
|
1193
1199
|
*
|
|
1194
1200
|
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1201
|
+
* @deprecated since Chrome 139. Support for WebSQL has been removed. This function has no effect.
|
|
1195
1202
|
*/
|
|
1196
1203
|
function removeWebSQL(options: RemovalOptions): Promise<void>;
|
|
1197
1204
|
function removeWebSQL(options: RemovalOptions, callback: () => void): void;
|
|
@@ -1200,6 +1207,7 @@ declare namespace chrome {
|
|
|
1200
1207
|
* Clears websites' appcache data.
|
|
1201
1208
|
*
|
|
1202
1209
|
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1210
|
+
* @deprecated since Chrome 98. Support for appcache has been removed. This function has no effect.
|
|
1203
1211
|
*/
|
|
1204
1212
|
function removeAppcache(options: RemovalOptions): Promise<void>;
|
|
1205
1213
|
function removeAppcache(options: RemovalOptions, callback: () => void): void;
|
|
@@ -2504,7 +2512,7 @@ declare namespace chrome {
|
|
|
2504
2512
|
*
|
|
2505
2513
|
* Permissions: "declarativeWebRequest"
|
|
2506
2514
|
*
|
|
2507
|
-
* MV2 only
|
|
2515
|
+
* Beta and MV2 only
|
|
2508
2516
|
* @deprecated Check out the {@link declarativeNetRequest} API instead
|
|
2509
2517
|
*/
|
|
2510
2518
|
export namespace declarativeWebRequest {
|
|
@@ -2559,9 +2567,9 @@ declare namespace chrome {
|
|
|
2559
2567
|
/** Matches if the MIME media type of a response (from the HTTP Content-Type header) is not contained in the list. */
|
|
2560
2568
|
excludeContentType?: string[] | undefined;
|
|
2561
2569
|
/** Matches if none of the request headers is matched by any of the HeaderFilters. */
|
|
2562
|
-
|
|
2570
|
+
excludeRequestHeaders?: HeaderFilter[] | undefined;
|
|
2563
2571
|
/** Matches if none of the response headers is matched by any of the HeaderFilters. */
|
|
2564
|
-
|
|
2572
|
+
excludeResponseHeaders?: HeaderFilter[] | undefined;
|
|
2565
2573
|
/**
|
|
2566
2574
|
* Matches if the conditions of the UrlFilter are fulfilled for the 'first party' URL of the request. The 'first party' URL of a request, when present, can be different from the request's target URL, and describes what is considered 'first party' for the sake of third-party checks for cookies.
|
|
2567
2575
|
* @deprecated since Chrome 82
|
|
@@ -2628,7 +2636,7 @@ declare namespace chrome {
|
|
|
2628
2636
|
/** Edits one or more cookies of response. Note that it is preferred to use the Cookies API because this is computationally less expensive. */
|
|
2629
2637
|
interface EditResponseCookie {
|
|
2630
2638
|
/** Filter for cookies that will be modified. All empty entries are ignored. */
|
|
2631
|
-
filter:
|
|
2639
|
+
filter: FilterResponseCookie;
|
|
2632
2640
|
/** Attributes that shall be overridden in cookies that matched the filter. Attributes that are set to an empty string are removed. */
|
|
2633
2641
|
modification: ResponseCookie;
|
|
2634
2642
|
}
|
|
@@ -2672,7 +2680,7 @@ declare namespace chrome {
|
|
|
2672
2680
|
/** Existence of the Secure cookie attribute. */
|
|
2673
2681
|
secure?: string | undefined;
|
|
2674
2682
|
/** Filters session cookies. Session cookies have no lifetime specified in any of 'max-age' or 'expires' attributes. */
|
|
2675
|
-
|
|
2683
|
+
sessionCookie?: boolean | undefined;
|
|
2676
2684
|
/** Value of a cookie, may be padded in double-quotes. */
|
|
2677
2685
|
value?: string | undefined;
|
|
2678
2686
|
}
|
|
@@ -7241,7 +7249,7 @@ declare namespace chrome {
|
|
|
7241
7249
|
enum ExtensionType {
|
|
7242
7250
|
EXTENSION = "extension",
|
|
7243
7251
|
HOSTED_APP = "hosted_app",
|
|
7244
|
-
|
|
7252
|
+
PACKAGED_APP = "packaged_app",
|
|
7245
7253
|
LEGACY_PACKAGED_APP = "legacy_packaged_app",
|
|
7246
7254
|
THEME = "theme",
|
|
7247
7255
|
LOGIN_SCREEN_EXTENSION = "login_screen_extension",
|
|
@@ -9176,9 +9184,11 @@ declare namespace chrome {
|
|
|
9176
9184
|
}
|
|
9177
9185
|
|
|
9178
9186
|
interface ManifestAction {
|
|
9179
|
-
default_icon?: ManifestIcons | undefined;
|
|
9187
|
+
default_icon?: ManifestIcons | string | undefined;
|
|
9180
9188
|
default_title?: string | undefined;
|
|
9181
9189
|
default_popup?: string | undefined;
|
|
9190
|
+
/** @default 'enabled' */
|
|
9191
|
+
default_state?: "enabled" | "disabled";
|
|
9182
9192
|
}
|
|
9183
9193
|
|
|
9184
9194
|
/** Source: https://developer.chrome.com/docs/extensions/reference/permissions-list */
|
|
@@ -9284,22 +9294,37 @@ declare namespace chrome {
|
|
|
9284
9294
|
| "webAuthenticationProxy"
|
|
9285
9295
|
>;
|
|
9286
9296
|
|
|
9297
|
+
/** A search engine. */
|
|
9287
9298
|
interface SearchProvider {
|
|
9299
|
+
/** Name of the search engine displayed to user. This is required if you don't set `prepopulated_id`. */
|
|
9288
9300
|
name?: string | undefined;
|
|
9301
|
+
/** An omnibox keyword for the search engine. This is required if you don't set `prepopulated_id`. */
|
|
9289
9302
|
keyword?: string | undefined;
|
|
9303
|
+
/** An icon URL for the search engine. This is required if you don't set `prepopulated_id`. */
|
|
9290
9304
|
favicon_url?: string | undefined;
|
|
9305
|
+
/** The search URL the search engine uses. */
|
|
9291
9306
|
search_url: string;
|
|
9307
|
+
/** The encoding used for search terms. This is required if you don't set `prepopulated_id`. */
|
|
9292
9308
|
encoding?: string | undefined;
|
|
9309
|
+
/** The URL the search engine uses for suggestions. If this isn't used, the engine doesn't support suggestions. */
|
|
9293
9310
|
suggest_url?: string | undefined;
|
|
9294
9311
|
instant_url?: string | undefined;
|
|
9312
|
+
/** The URL the search engine uses for image search. If this isn't used, the engine doesn't support image search. */
|
|
9295
9313
|
image_url?: string | undefined;
|
|
9314
|
+
/** The post parameters for `search_url`. */
|
|
9296
9315
|
search_url_post_params?: string | undefined;
|
|
9316
|
+
/** The post parameters for `suggest_url`. */
|
|
9297
9317
|
suggest_url_post_params?: string | undefined;
|
|
9318
|
+
/** The post parameters for `instant_url`. */
|
|
9298
9319
|
instant_url_post_params?: string | undefined;
|
|
9320
|
+
/** The post parameters for `image_url`. */
|
|
9299
9321
|
image_url_post_params?: string | undefined;
|
|
9322
|
+
/** A list of URL patterns that can be used in addition to `search_url`. */
|
|
9300
9323
|
alternate_urls?: string[] | undefined;
|
|
9324
|
+
/** An ID for Chrome's built-in search engine. */
|
|
9301
9325
|
prepopulated_id?: number | undefined;
|
|
9302
|
-
|
|
9326
|
+
/** Specifies whether the search provider should be default. */
|
|
9327
|
+
is_default: boolean;
|
|
9303
9328
|
}
|
|
9304
9329
|
|
|
9305
9330
|
interface ManifestBase {
|
|
@@ -9324,8 +9349,10 @@ declare namespace chrome {
|
|
|
9324
9349
|
author?: { email: string } | undefined;
|
|
9325
9350
|
/** Defines overrides for selected Chrome settings. */
|
|
9326
9351
|
chrome_settings_overrides?: {
|
|
9352
|
+
/** The new value for the homepage. */
|
|
9327
9353
|
homepage?: string | undefined;
|
|
9328
9354
|
search_provider?: SearchProvider | undefined;
|
|
9355
|
+
/** An array of length one containing a URL to be used as the startup page. */
|
|
9329
9356
|
startup_pages?: string[] | undefined;
|
|
9330
9357
|
} | undefined;
|
|
9331
9358
|
/** Defines overrides for default Chrome pages. */
|
|
@@ -9337,13 +9364,16 @@ declare namespace chrome {
|
|
|
9337
9364
|
/** Defines keyboard shortcuts within the extension. */
|
|
9338
9365
|
commands?: {
|
|
9339
9366
|
[name: string]: {
|
|
9340
|
-
suggested_key?:
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9367
|
+
suggested_key?:
|
|
9368
|
+
| {
|
|
9369
|
+
default?: string | undefined;
|
|
9370
|
+
windows?: string | undefined;
|
|
9371
|
+
mac?: string | undefined;
|
|
9372
|
+
chromeos?: string | undefined;
|
|
9373
|
+
linux?: string | undefined;
|
|
9374
|
+
}
|
|
9375
|
+
| string
|
|
9376
|
+
| undefined;
|
|
9347
9377
|
description?: string | undefined;
|
|
9348
9378
|
global?: boolean | undefined;
|
|
9349
9379
|
};
|
|
@@ -9359,7 +9389,7 @@ declare namespace chrome {
|
|
|
9359
9389
|
cross_origin_opener_policy?: { value: string } | undefined;
|
|
9360
9390
|
current_locale?: string | undefined;
|
|
9361
9391
|
/** Defines static rules for the declarativeNetRequest API, which allows blocking and modifying of network requests. */
|
|
9362
|
-
declarative_net_request?: { rule_resources
|
|
9392
|
+
declarative_net_request?: { rule_resources: declarativeNetRequest.Ruleset[] } | undefined;
|
|
9363
9393
|
/** Defines pages that use the DevTools APIs. */
|
|
9364
9394
|
devtools_page?: string | undefined;
|
|
9365
9395
|
event_rules?:
|
|
@@ -9431,20 +9461,13 @@ declare namespace chrome {
|
|
|
9431
9461
|
/** Allows the use of an OAuth 2.0 security ID. The value of this key must be an object with "client_id" and "scopes" properties. */
|
|
9432
9462
|
oauth2?: {
|
|
9433
9463
|
client_id: string;
|
|
9434
|
-
scopes
|
|
9464
|
+
scopes: string[];
|
|
9435
9465
|
} | undefined;
|
|
9436
9466
|
offline_enabled?: boolean | undefined;
|
|
9437
9467
|
/** Allows the extension to register a keyword in Chrome's address bar. */
|
|
9438
9468
|
omnibox?: { keyword: string } | undefined;
|
|
9439
9469
|
/** Specifies a path to an options.html file for the extension to use as an options page. */
|
|
9440
9470
|
options_page?: string | undefined;
|
|
9441
|
-
/** Specifies a path to an HTML file that lets a user change extension options from the Chrome Extensions page. */
|
|
9442
|
-
options_ui?: {
|
|
9443
|
-
/** Path to the options page, relative to the extension's root. */
|
|
9444
|
-
page: string;
|
|
9445
|
-
/** Specify as `false` to declare an embedded options page. If `true`, the extension's options page will be opened in a new tab rather than embedded in `chrome://extensions`. */
|
|
9446
|
-
open_in_tab: boolean;
|
|
9447
|
-
} | undefined;
|
|
9448
9471
|
/** Lists technologies required to use the extension. */
|
|
9449
9472
|
requirements?: {
|
|
9450
9473
|
"3D"?: { features?: string[] | undefined } | undefined;
|
|
@@ -9480,8 +9503,8 @@ declare namespace chrome {
|
|
|
9480
9503
|
manifest_version: 2;
|
|
9481
9504
|
|
|
9482
9505
|
// Pick one (or none)
|
|
9483
|
-
browser_action?: ManifestAction | undefined;
|
|
9484
|
-
page_action?: ManifestAction | undefined;
|
|
9506
|
+
browser_action?: Omit<ManifestAction, "default_state"> | undefined;
|
|
9507
|
+
page_action?: Omit<ManifestAction, "default_state"> | undefined;
|
|
9485
9508
|
|
|
9486
9509
|
// Optional
|
|
9487
9510
|
background?:
|
|
@@ -9507,6 +9530,15 @@ declare namespace chrome {
|
|
|
9507
9530
|
| undefined;
|
|
9508
9531
|
/** Defines restrictions on the scripts, styles, and other resources an extension can use. */
|
|
9509
9532
|
content_security_policy?: string | undefined;
|
|
9533
|
+
/** Specifies a path to an HTML file that lets a user change extension options from the Chrome Extensions page. */
|
|
9534
|
+
options_ui?: {
|
|
9535
|
+
/** Path to the options page, relative to the extension's root. */
|
|
9536
|
+
page: string;
|
|
9537
|
+
/** If `true`, a Chrome user agent stylesheet will be applied to your options page. Defaults to `false`. */
|
|
9538
|
+
chrome_style?: boolean | undefined;
|
|
9539
|
+
/** Specify as `false` to declare an embedded options page. If `true`, the extension's options page will be opened in a new tab rather than embedded in `chrome://extensions`. */
|
|
9540
|
+
open_in_tab?: boolean | undefined;
|
|
9541
|
+
} | undefined;
|
|
9510
9542
|
/** Declares optional permissions for your extension. */
|
|
9511
9543
|
optional_permissions?: (ManifestOptionalPermission | string)[] | undefined;
|
|
9512
9544
|
/** Enables use of particular extension APIs. */
|
|
@@ -9570,6 +9602,13 @@ declare namespace chrome {
|
|
|
9570
9602
|
| undefined;
|
|
9571
9603
|
/** Lists the web pages your extension is allowed to interact with, defined using URL match patterns. User permission for these sites is requested at install time. */
|
|
9572
9604
|
host_permissions?: string[] | undefined;
|
|
9605
|
+
/** Specifies a path to an HTML file that lets a user change extension options from the Chrome Extensions page. */
|
|
9606
|
+
options_ui?: {
|
|
9607
|
+
/** Specifies the path to the options page, relative to the extension's root. */
|
|
9608
|
+
page: string;
|
|
9609
|
+
/** 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. */
|
|
9610
|
+
open_in_tab?: boolean | undefined;
|
|
9611
|
+
} | undefined;
|
|
9573
9612
|
/** Declares optional permissions for your extension. */
|
|
9574
9613
|
optional_permissions?: ManifestOptionalPermission[] | undefined;
|
|
9575
9614
|
/** Declares optional host permissions for your extension. */
|
chrome/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chrome",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "TypeScript definitions for chrome",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,6 +94,6 @@
|
|
|
94
94
|
"@types/har-format": "*"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {},
|
|
97
|
-
"typesPublisherContentHash": "
|
|
97
|
+
"typesPublisherContentHash": "95d0e80767c8eccf24fb23319a9a50f80476549772d641082f1d22a6a2df3825",
|
|
98
98
|
"typeScriptVersion": "5.6"
|
|
99
99
|
}
|