@types/chrome 0.1.37 → 0.1.39
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 +44 -24
- chrome/package.json +3 -3
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,
|
|
11
|
+
* Last updated: Fri, 03 Apr 2026 06:33:57 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
|
@@ -346,9 +346,10 @@ declare namespace chrome {
|
|
|
346
346
|
export function setIcon(details: TabIconDetails, callback: () => void): void;
|
|
347
347
|
|
|
348
348
|
/**
|
|
349
|
-
* Sets the
|
|
349
|
+
* Sets the HTML document to be opened as a popup when the user clicks on the action's icon.
|
|
350
350
|
*
|
|
351
351
|
* Can return its result via Promise.
|
|
352
|
+
* @since Chrome 96
|
|
352
353
|
*/
|
|
353
354
|
export function setPopup(details: PopupDetails): Promise<void>;
|
|
354
355
|
export function setPopup(details: PopupDetails, callback: () => void): void;
|
|
@@ -1165,6 +1166,7 @@ declare namespace chrome {
|
|
|
1165
1166
|
* Clears websites' cache storage data.
|
|
1166
1167
|
*
|
|
1167
1168
|
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1169
|
+
* @since Chrome 72
|
|
1168
1170
|
*/
|
|
1169
1171
|
export function removeCacheStorage(options: RemovalOptions): Promise<void>;
|
|
1170
1172
|
export function removeCacheStorage(options: RemovalOptions, callback: () => void): void;
|
|
@@ -2433,7 +2435,17 @@ declare namespace chrome {
|
|
|
2433
2435
|
* Exactly one of `imageData` or `path` must be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in `imageData` is an `ImageData` object; for example, from a `canvas` element, while the image representation in `path` is the path to an image file relative to the extension's manifest. If `scale` screen pixels fit into a device-independent pixel, the `scale * n` icon is used. If that scale is missing, another image is resized to the required size.
|
|
2434
2436
|
*/
|
|
2435
2437
|
export class SetIcon {
|
|
2436
|
-
constructor(
|
|
2438
|
+
constructor(
|
|
2439
|
+
options:
|
|
2440
|
+
| {
|
|
2441
|
+
imageData: ImageData | { [index: number]: ImageData };
|
|
2442
|
+
path?: string | { [index: number]: string } | undefined;
|
|
2443
|
+
}
|
|
2444
|
+
| {
|
|
2445
|
+
imageData?: ImageData | { [index: number]: ImageData } | undefined;
|
|
2446
|
+
path: string | { [index: number]: string };
|
|
2447
|
+
},
|
|
2448
|
+
);
|
|
2437
2449
|
}
|
|
2438
2450
|
|
|
2439
2451
|
/** Provides the Declarative Event API consisting of {@link events.Event.addRules addRules}, {@link events.Event.removeRules removeRules}, and {@link events.Event.getRules getRules}. */
|
|
@@ -3330,7 +3342,7 @@ declare namespace chrome {
|
|
|
3330
3342
|
/** Indicates the data type of the option. The requested data type must match the real data type of the underlying option. */
|
|
3331
3343
|
type: `${OptionType}`;
|
|
3332
3344
|
/** Indicates the value to set. Leave unset to request automatic setting for options that have `autoSettable` enabled. The data type supplied for `value` must match `type`. */
|
|
3333
|
-
value?: string | number | boolean | number;
|
|
3345
|
+
value?: string | number | boolean | number[];
|
|
3334
3346
|
}
|
|
3335
3347
|
|
|
3336
3348
|
/**
|
|
@@ -3560,6 +3572,8 @@ declare namespace chrome {
|
|
|
3560
3572
|
/**
|
|
3561
3573
|
* Performs a document scan and returns a Promise that resolves with a {@link ScanResults} object. If a callback is passed to this function, the returned data is passed to it instead.
|
|
3562
3574
|
* @param options An object containing scan parameters.
|
|
3575
|
+
*
|
|
3576
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
3563
3577
|
*/
|
|
3564
3578
|
export function scan(options: ScanOptions): Promise<ScanResults>;
|
|
3565
3579
|
export function scan(options: ScanOptions, callback: (result: ScanResults) => void): void;
|
|
@@ -4074,14 +4088,17 @@ declare namespace chrome {
|
|
|
4074
4088
|
id: string;
|
|
4075
4089
|
/**
|
|
4076
4090
|
* Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are hardware-backed.
|
|
4077
|
-
*
|
|
4091
|
+
*
|
|
4092
|
+
* Only non-extractable keys can be generated. The supported key types are RSASSA-PKCS1-V1_5 with `modulusLength` up to 2048 and ECDSA with `namedCurve` P-256. Each key can be used for signing data at most once, unless the extension is allowlisted by the KeyPermissions policy, in which case the key can be used indefinitely.
|
|
4093
|
+
*
|
|
4078
4094
|
* Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
|
|
4079
4095
|
*/
|
|
4080
4096
|
subtleCrypto: SubtleCrypto;
|
|
4081
4097
|
/**
|
|
4082
|
-
* Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are software-backed.
|
|
4083
|
-
*
|
|
4084
|
-
* Only non-extractable keys can be generated. The supported key
|
|
4098
|
+
* Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are software-backed. Protection of the keys, and thus implementation of the non-extractable property, is done in software, so the keys are less protected than hardware-backed keys.
|
|
4099
|
+
*
|
|
4100
|
+
* Only non-extractable keys can be generated. The only supported key type is RSASSA-PKCS1-V1_5 with `modulusLength` up to 2048. up to 2048. Each key can be used for signing data at most once, unless the extension is allowlisted through the KeyPermissions policy, in which case the key can be used indefinitely.
|
|
4101
|
+
*
|
|
4085
4102
|
* Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
|
|
4086
4103
|
* @since Chrome 97
|
|
4087
4104
|
*/
|
|
@@ -4361,9 +4378,12 @@ declare namespace chrome {
|
|
|
4361
4378
|
}
|
|
4362
4379
|
|
|
4363
4380
|
/**
|
|
4364
|
-
* Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, runtime.lastError will be set with a failure reason.
|
|
4381
|
+
* Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, {@link runtime.lastError} will be set with a failure reason.
|
|
4365
4382
|
* @param callback Called with the device's default network's NetworkDetails.
|
|
4383
|
+
*
|
|
4384
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
4366
4385
|
*/
|
|
4386
|
+
export function getNetworkDetails(): Promise<NetworkDetails>;
|
|
4367
4387
|
export function getNetworkDetails(callback: (networkDetails: NetworkDetails) => void): void;
|
|
4368
4388
|
}
|
|
4369
4389
|
|
|
@@ -6305,7 +6325,7 @@ declare namespace chrome {
|
|
|
6305
6325
|
* This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile.
|
|
6306
6326
|
* @param details Profile options.
|
|
6307
6327
|
*
|
|
6308
|
-
* Can return its result via Promise since Chrome
|
|
6328
|
+
* Can return its result via Promise since Chrome 106.
|
|
6309
6329
|
*/
|
|
6310
6330
|
export function getProfileUserInfo(details?: ProfileDetails): Promise<ProfileUserInfo>;
|
|
6311
6331
|
export function getProfileUserInfo(
|
|
@@ -6320,7 +6340,7 @@ declare namespace chrome {
|
|
|
6320
6340
|
* If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with `getAuthToken`.
|
|
6321
6341
|
* @param details Token information.
|
|
6322
6342
|
*
|
|
6323
|
-
* Can return its result via Promise since Chrome
|
|
6343
|
+
* Can return its result via Promise since Chrome 106.
|
|
6324
6344
|
*/
|
|
6325
6345
|
export function removeCachedAuthToken(details: InvalidTokenDetails): Promise<void>;
|
|
6326
6346
|
export function removeCachedAuthToken(details: InvalidTokenDetails, callback: () => void): void;
|
|
@@ -7908,7 +7928,7 @@ declare namespace chrome {
|
|
|
7908
7928
|
|
|
7909
7929
|
export enum ClientCertificateType {
|
|
7910
7930
|
ECDSA_SIGN = "ecdsaSign",
|
|
7911
|
-
|
|
7931
|
+
RSA_SIGN = "rsaSign",
|
|
7912
7932
|
}
|
|
7913
7933
|
|
|
7914
7934
|
export interface SelectDetails {
|
|
@@ -8803,7 +8823,7 @@ declare namespace chrome {
|
|
|
8803
8823
|
export type QueryInfo =
|
|
8804
8824
|
& {
|
|
8805
8825
|
/** String to query with the default search provider. */
|
|
8806
|
-
text
|
|
8826
|
+
text: string;
|
|
8807
8827
|
}
|
|
8808
8828
|
& (
|
|
8809
8829
|
| {
|
|
@@ -9690,7 +9710,7 @@ declare namespace chrome {
|
|
|
9690
9710
|
/** Sent after onSuspend to indicate that the app won't be unloaded after all. */
|
|
9691
9711
|
export const onSuspendCanceled: events.Event<() => void>;
|
|
9692
9712
|
|
|
9693
|
-
/** Fired when a message is sent from either
|
|
9713
|
+
/** Fired when a message is sent from either {@link runtime.sendMessage} or {@link tabs.sendMessage}. */
|
|
9694
9714
|
export const onMessage: events.Event<
|
|
9695
9715
|
(message: any, sender: MessageSender, sendResponse: (response?: any) => void) => void
|
|
9696
9716
|
>;
|
|
@@ -11056,7 +11076,7 @@ declare namespace chrome {
|
|
|
11056
11076
|
sessionId?: string | undefined;
|
|
11057
11077
|
/**
|
|
11058
11078
|
* The ID of the Split View that the tab belongs to.
|
|
11059
|
-
* @since Chrome
|
|
11079
|
+
* @since Chrome 140
|
|
11060
11080
|
*/
|
|
11061
11081
|
splitViewId?: number | undefined;
|
|
11062
11082
|
/**
|
|
@@ -11132,7 +11152,7 @@ declare namespace chrome {
|
|
|
11132
11152
|
|
|
11133
11153
|
/**
|
|
11134
11154
|
* An ID that represents the absence of a split tab.
|
|
11135
|
-
* @since Chrome
|
|
11155
|
+
* @since Chrome 140
|
|
11136
11156
|
*/
|
|
11137
11157
|
export const SPLIT_VIEW_ID_NONE: -1;
|
|
11138
11158
|
|
|
@@ -11579,7 +11599,7 @@ declare namespace chrome {
|
|
|
11579
11599
|
export function duplicate(tabId: number, callback: (tab?: Tab) => void): void;
|
|
11580
11600
|
|
|
11581
11601
|
/**
|
|
11582
|
-
* Sends a single message to the content script(s) in the specified tab
|
|
11602
|
+
* Sends a single message to the content script(s) in the specified tab. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
|
|
11583
11603
|
*
|
|
11584
11604
|
* Can return its result via Promise in Manifest V3 or later since Chrome 99.
|
|
11585
11605
|
*/
|
|
@@ -12139,7 +12159,7 @@ declare namespace chrome {
|
|
|
12139
12159
|
* Called when the list of {@link TtsVoice} that would be returned by getVoices has changed.
|
|
12140
12160
|
* @since Chrome 124
|
|
12141
12161
|
*/
|
|
12142
|
-
const onVoicesChanged: chrome.events.Event<() => void>;
|
|
12162
|
+
export const onVoicesChanged: chrome.events.Event<() => void>;
|
|
12143
12163
|
}
|
|
12144
12164
|
|
|
12145
12165
|
////////////////////
|
|
@@ -13091,7 +13111,7 @@ declare namespace chrome {
|
|
|
13091
13111
|
EXTRA_HEADERS = "extraHeaders",
|
|
13092
13112
|
}
|
|
13093
13113
|
|
|
13094
|
-
/** @since Chrome
|
|
13114
|
+
/** @since Chrome 79 */
|
|
13095
13115
|
export enum OnErrorOccurredOptions {
|
|
13096
13116
|
/** Specifies that headers can violate Cross-Origin Resource Sharing (CORS). */
|
|
13097
13117
|
EXTRA_HEADERS = "extraHeaders",
|
|
@@ -13283,14 +13303,14 @@ declare namespace chrome {
|
|
|
13283
13303
|
extends SetPartial<WebRequestDetails, "documentId" | "documentLifecycle" | "frameType">
|
|
13284
13304
|
{
|
|
13285
13305
|
/** Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'. */
|
|
13286
|
-
requestBody
|
|
13306
|
+
requestBody?: {
|
|
13287
13307
|
/** Errors when obtaining request body data. */
|
|
13288
13308
|
error?: string;
|
|
13289
13309
|
/** If the request method is POST and the body is a sequence of key-value pairs encoded in UTF8, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of another media type, or if it is malformed, the dictionary is not present. An example value of this dictionary is {'key': \['value1', 'value2'\]}. */
|
|
13290
13310
|
formData?: { [key: string]: FormDataItem[] };
|
|
13291
13311
|
/** If the request method is PUT or POST, and the body is not already parsed in formData, then the unparsed request body elements are contained in this array. */
|
|
13292
13312
|
raw?: UploadData[];
|
|
13293
|
-
}
|
|
13313
|
+
};
|
|
13294
13314
|
}
|
|
13295
13315
|
|
|
13296
13316
|
export interface OnBeforeSendHeadersDetails extends WebRequestDetails {
|
|
@@ -14342,7 +14362,7 @@ declare namespace chrome {
|
|
|
14342
14362
|
* The headers provided by a hypothetical response if the request does not get blocked or redirected before it is sent. Represented as an object which maps a header name to a list of string values. If not specified, the hypothetical response would return empty response headers, which can match rules which match on the non-existence of headers. E.g. `{"content-type": ["text/html; charset=utf-8", "multipart/form-data"]}`
|
|
14343
14363
|
* @since Chrome 129
|
|
14344
14364
|
*/
|
|
14345
|
-
responseHeaders?: { [name: string]:
|
|
14365
|
+
responseHeaders?: { [name: string]: string[] };
|
|
14346
14366
|
/** The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab. */
|
|
14347
14367
|
tabId?: number;
|
|
14348
14368
|
/**
|
|
@@ -14680,13 +14700,13 @@ declare namespace chrome {
|
|
|
14680
14700
|
* Fired when the extension's side panel is closed.
|
|
14681
14701
|
* @since Chrome 142
|
|
14682
14702
|
*/
|
|
14683
|
-
const onClosed: events.Event<(info: PanelClosedInfo) => void>;
|
|
14703
|
+
export const onClosed: events.Event<(info: PanelClosedInfo) => void>;
|
|
14684
14704
|
|
|
14685
14705
|
/**
|
|
14686
14706
|
* Fired when the extension's side panel is opened.
|
|
14687
14707
|
* @since Chrome 141
|
|
14688
14708
|
*/
|
|
14689
|
-
const onOpened: events.Event<(info: PanelOpenedInfo) => void>;
|
|
14709
|
+
export const onOpened: events.Event<(info: PanelOpenedInfo) => void>;
|
|
14690
14710
|
}
|
|
14691
14711
|
|
|
14692
14712
|
////////////////////
|
|
@@ -14792,7 +14812,7 @@ declare namespace chrome {
|
|
|
14792
14812
|
/** Specifies wildcard patterns for pages this user script will be injected into. */
|
|
14793
14813
|
includeGlobs?: string[] | undefined;
|
|
14794
14814
|
/** The list of ScriptSource objects defining sources of scripts to be injected into matching pages. This property must be specified for {@link register}, and when specified it must be a non-empty array.*/
|
|
14795
|
-
js
|
|
14815
|
+
js?: ScriptSource[] | undefined;
|
|
14796
14816
|
/** Specifies which pages this user script will be injected into. See Match Patterns for more details on the syntax of these strings. This property must be specified for {@link register}. */
|
|
14797
14817
|
matches?: string[] | undefined;
|
|
14798
14818
|
/** Specifies when JavaScript files are injected into the web page. The preferred and default value is `document_idle` */
|
chrome/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chrome",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
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": "
|
|
98
|
-
"typeScriptVersion": "5.
|
|
97
|
+
"typesPublisherContentHash": "cc4b7880e79be5e7d9371832e77f1c91aa47682063b9d54a5e2e2b4055640aab",
|
|
98
|
+
"typeScriptVersion": "5.3"
|
|
99
99
|
}
|