@types/chrome 0.1.42 → 0.2.0
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 +26 -44
- 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:
|
|
11
|
+
* Last updated: Sat, 20 Jun 2026 14:44:50 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
|
@@ -1725,7 +1725,7 @@ declare namespace chrome {
|
|
|
1725
1725
|
*
|
|
1726
1726
|
* `allow`: Allow sites to use advanced clipboard capabilities,
|
|
1727
1727
|
*
|
|
1728
|
-
* `block`: Don't allow sites to use advanced clipboard
|
|
1728
|
+
* `block`: Don't allow sites to use advanced clipboard capabilities,
|
|
1729
1729
|
*
|
|
1730
1730
|
* `ask`: Ask when a site wants to use advanced clipboard capabilities.
|
|
1731
1731
|
*
|
|
@@ -1876,6 +1876,8 @@ declare namespace chrome {
|
|
|
1876
1876
|
BROWSER_ACTION = "browser_action",
|
|
1877
1877
|
PAGE_ACTION = "page_action",
|
|
1878
1878
|
ACTION = "action",
|
|
1879
|
+
/** @since Chrome 149 */
|
|
1880
|
+
TAB = "tab",
|
|
1879
1881
|
}
|
|
1880
1882
|
|
|
1881
1883
|
/**
|
|
@@ -2246,7 +2248,7 @@ declare namespace chrome {
|
|
|
2246
2248
|
*
|
|
2247
2249
|
* Permissions: "debugger"
|
|
2248
2250
|
*/
|
|
2249
|
-
|
|
2251
|
+
namespace _debugger {
|
|
2250
2252
|
/** Debuggee identifier. Either tabId, extensionId or targetId must be specified */
|
|
2251
2253
|
interface Debuggee {
|
|
2252
2254
|
/** The id of the tab which you intend to debug. */
|
|
@@ -2585,7 +2587,7 @@ declare namespace chrome {
|
|
|
2585
2587
|
interface EditResponseCookie {
|
|
2586
2588
|
/** Filter for cookies that will be modified. All empty entries are ignored. */
|
|
2587
2589
|
filter: ResponseCookie;
|
|
2588
|
-
/** Attributes that shall be overridden in cookies that
|
|
2590
|
+
/** Attributes that shall be overridden in cookies that matched the filter. Attributes that are set to an empty string are removed. */
|
|
2589
2591
|
modification: ResponseCookie;
|
|
2590
2592
|
}
|
|
2591
2593
|
|
|
@@ -2603,7 +2605,7 @@ declare namespace chrome {
|
|
|
2603
2605
|
interface EditRequestCookie {
|
|
2604
2606
|
/** Filter for cookies that will be modified. All empty entries are ignored. */
|
|
2605
2607
|
filter: RequestCookie;
|
|
2606
|
-
/** Attributes that shall be overridden in cookies that
|
|
2608
|
+
/** Attributes that shall be overridden in cookies that matched the filter. Attributes that are set to an empty string are removed. */
|
|
2607
2609
|
modification: RequestCookie;
|
|
2608
2610
|
}
|
|
2609
2611
|
|
|
@@ -4545,7 +4547,7 @@ declare namespace chrome {
|
|
|
4545
4547
|
const inIncognitoContext: boolean;
|
|
4546
4548
|
|
|
4547
4549
|
/**
|
|
4548
|
-
* Set for the lifetime of a callback if an
|
|
4550
|
+
* Set for the lifetime of a callback if an asynchronous extension api has resulted in an error. If no error has occurred lastError will be `undefined`.
|
|
4549
4551
|
* @deprecated since Chrome 58. Please use {@link runtime.lastError}
|
|
4550
4552
|
*/
|
|
4551
4553
|
const lastError: runtime.LastError | undefined;
|
|
@@ -8912,6 +8914,7 @@ declare namespace chrome {
|
|
|
8912
8914
|
/**
|
|
8913
8915
|
* The native client architecture. This may be different from arch on some platforms.
|
|
8914
8916
|
* @since Chrome 44
|
|
8917
|
+
* @deprecated since Chrome 149. This enum is deprecated following complete removal of Native Client.
|
|
8915
8918
|
*/
|
|
8916
8919
|
enum PlatformNaclArch {
|
|
8917
8920
|
/** Specifies the native client architecture as arm. */
|
|
@@ -9072,7 +9075,10 @@ declare namespace chrome {
|
|
|
9072
9075
|
os: `${PlatformOs}`;
|
|
9073
9076
|
/** The machine's processor architecture. */
|
|
9074
9077
|
arch: `${PlatformArch}`;
|
|
9075
|
-
/**
|
|
9078
|
+
/**
|
|
9079
|
+
* The native client architecture. This may be different from arch on some platforms.
|
|
9080
|
+
* @deprecated since Chrome 149. This attribute is deprecated following complete removal of Native Client.
|
|
9081
|
+
*/
|
|
9076
9082
|
nacl_arch?: `${PlatformNaclArch}`;
|
|
9077
9083
|
}
|
|
9078
9084
|
|
|
@@ -9217,11 +9223,6 @@ declare namespace chrome {
|
|
|
9217
9223
|
| "webRequestBlocking"
|
|
9218
9224
|
| "webRequestAuthProvider";
|
|
9219
9225
|
|
|
9220
|
-
/**
|
|
9221
|
-
* @deprecated Use `ManifestPermission` instead.
|
|
9222
|
-
*/
|
|
9223
|
-
type ManifestPermissions = ManifestPermission;
|
|
9224
|
-
|
|
9225
9226
|
/** Source : https://developer.chrome.com/docs/extensions/reference/api/permissions */
|
|
9226
9227
|
type ManifestOptionalPermission = Exclude<
|
|
9227
9228
|
ManifestPermission,
|
|
@@ -9239,11 +9240,6 @@ declare namespace chrome {
|
|
|
9239
9240
|
| "webAuthenticationProxy"
|
|
9240
9241
|
>;
|
|
9241
9242
|
|
|
9242
|
-
/**
|
|
9243
|
-
* @deprecated Use `ManifestOptionalPermission` instead.
|
|
9244
|
-
*/
|
|
9245
|
-
type ManifestOptionalPermissions = ManifestOptionalPermission;
|
|
9246
|
-
|
|
9247
9243
|
interface SearchProvider {
|
|
9248
9244
|
name?: string | undefined;
|
|
9249
9245
|
keyword?: string | undefined;
|
|
@@ -10112,12 +10108,7 @@ declare namespace chrome {
|
|
|
10112
10108
|
* Permissions: "storage"
|
|
10113
10109
|
*/
|
|
10114
10110
|
export namespace storage {
|
|
10115
|
-
|
|
10116
|
-
type NoInferX<T> = T[][T extends any ? 0 : never];
|
|
10117
|
-
// The next line prevents things without the export keyword from being automatically exported (like NoInferX)
|
|
10118
|
-
export {};
|
|
10119
|
-
|
|
10120
|
-
export interface StorageArea {
|
|
10111
|
+
interface StorageArea {
|
|
10121
10112
|
/**
|
|
10122
10113
|
* Gets the amount of space (in bytes) being used by one or more items.
|
|
10123
10114
|
* @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
|
|
@@ -10164,11 +10155,11 @@ declare namespace chrome {
|
|
|
10164
10155
|
* Can return its result via Promise in Manifest V3 or later since Chrome 95.
|
|
10165
10156
|
*/
|
|
10166
10157
|
get<T = { [key: string]: unknown }>(
|
|
10167
|
-
keys?:
|
|
10158
|
+
keys?: NoInfer<keyof T> | Array<NoInfer<keyof T>> | Partial<NoInfer<T>> | null | undefined,
|
|
10168
10159
|
): Promise<T>;
|
|
10169
10160
|
get<T = { [key: string]: unknown }>(callback: (items: T) => void): void;
|
|
10170
10161
|
get<T = { [key: string]: unknown }>(
|
|
10171
|
-
keys:
|
|
10162
|
+
keys: NoInfer<keyof T> | Array<NoInfer<keyof T>> | Partial<NoInfer<T>> | null | undefined,
|
|
10172
10163
|
callback: (items: T) => void,
|
|
10173
10164
|
): void;
|
|
10174
10165
|
|
|
@@ -10195,19 +10186,19 @@ declare namespace chrome {
|
|
|
10195
10186
|
getKeys(callback: (keys: string[]) => void): void;
|
|
10196
10187
|
}
|
|
10197
10188
|
|
|
10198
|
-
|
|
10189
|
+
interface StorageChange {
|
|
10199
10190
|
/** The new value of the item, if there is a new value. */
|
|
10200
10191
|
newValue?: unknown;
|
|
10201
10192
|
/** The old value of the item, if there was an old value. */
|
|
10202
10193
|
oldValue?: unknown;
|
|
10203
10194
|
}
|
|
10204
10195
|
|
|
10205
|
-
|
|
10196
|
+
interface LocalStorageArea extends StorageArea {
|
|
10206
10197
|
/** The maximum amount (in bytes) of data that can be stored in local storage, as measured by the JSON stringification of every value plus every key's length. This value will be ignored if the extension has the unlimitedStorage permission. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError when using a callback, or a rejected Promise if using async/await. */
|
|
10207
10198
|
QUOTA_BYTES: 10485760;
|
|
10208
10199
|
}
|
|
10209
10200
|
|
|
10210
|
-
|
|
10201
|
+
interface SyncStorageArea extends StorageArea {
|
|
10211
10202
|
/** @deprecated The storage.sync API no longer has a sustained write operation quota. */
|
|
10212
10203
|
MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: 1000000;
|
|
10213
10204
|
/** The maximum total amount (in bytes) of data that can be stored in sync storage, as measured by the JSON stringification of every value plus every key's length. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError when using a callback, or when a Promise is rejected. */
|
|
@@ -10230,18 +10221,18 @@ declare namespace chrome {
|
|
|
10230
10221
|
MAX_WRITE_OPERATIONS_PER_MINUTE: 120;
|
|
10231
10222
|
}
|
|
10232
10223
|
|
|
10233
|
-
|
|
10224
|
+
interface SessionStorageArea extends StorageArea {
|
|
10234
10225
|
/** The maximum amount (in bytes) of data that can be stored in memory, as measured by estimating the dynamically allocated memory usage of every value and key. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError when using a callback, or when a Promise is rejected. */
|
|
10235
10226
|
QUOTA_BYTES: 10485760;
|
|
10236
10227
|
}
|
|
10237
10228
|
|
|
10238
|
-
|
|
10229
|
+
type AreaName = "sync" | "local" | "managed" | "session";
|
|
10239
10230
|
|
|
10240
10231
|
/**
|
|
10241
10232
|
* The storage area's access level.
|
|
10242
10233
|
* @since Chrome 102
|
|
10243
10234
|
*/
|
|
10244
|
-
|
|
10235
|
+
enum AccessLevel {
|
|
10245
10236
|
/** Specifies contexts originating from the extension itself. */
|
|
10246
10237
|
TRUSTED_CONTEXTS = "TRUSTED_CONTEXTS",
|
|
10247
10238
|
/** Specifies contexts originating from outside the extension. */
|
|
@@ -10249,13 +10240,13 @@ declare namespace chrome {
|
|
|
10249
10240
|
}
|
|
10250
10241
|
|
|
10251
10242
|
/** Items in the `local` storage area are local to each machine. */
|
|
10252
|
-
|
|
10243
|
+
const local: LocalStorageArea;
|
|
10253
10244
|
|
|
10254
10245
|
/** Items in the `sync` storage area are synced using Chrome Sync. */
|
|
10255
|
-
|
|
10246
|
+
const sync: SyncStorageArea;
|
|
10256
10247
|
|
|
10257
10248
|
/** Items in the `managed` storage area are set by an enterprise policy configured by the domain administrator, and are read-only for the extension; trying to modify this namespace results in an error. For information on configuring a policy, see Manifest for storage areas. */
|
|
10258
|
-
|
|
10249
|
+
const managed: StorageArea;
|
|
10259
10250
|
|
|
10260
10251
|
/**
|
|
10261
10252
|
* Items in the `session` storage area are stored in-memory and will not be persisted to disk.
|
|
@@ -10263,10 +10254,10 @@ declare namespace chrome {
|
|
|
10263
10254
|
* MV3 only
|
|
10264
10255
|
* @since Chrome 102
|
|
10265
10256
|
*/
|
|
10266
|
-
|
|
10257
|
+
const session: SessionStorageArea;
|
|
10267
10258
|
|
|
10268
10259
|
/** Fired when one or more items change. */
|
|
10269
|
-
|
|
10260
|
+
const onChanged: events.Event<(changes: { [key: string]: StorageChange }, areaName: AreaName) => void>;
|
|
10270
10261
|
}
|
|
10271
10262
|
|
|
10272
10263
|
////////////////////
|
|
@@ -10289,10 +10280,6 @@ declare namespace chrome {
|
|
|
10289
10280
|
total: number;
|
|
10290
10281
|
}
|
|
10291
10282
|
|
|
10292
|
-
/** @deprecated Use {@link CpuTime} instead. */
|
|
10293
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
10294
|
-
interface ProcessorUsage extends CpuTime {}
|
|
10295
|
-
|
|
10296
10283
|
interface ProcessorInfo {
|
|
10297
10284
|
/** Cumulative usage info for this logical processor. */
|
|
10298
10285
|
usage: CpuTime;
|
|
@@ -12525,10 +12512,6 @@ declare namespace chrome {
|
|
|
12525
12512
|
reconnect?: string | undefined;
|
|
12526
12513
|
}
|
|
12527
12514
|
|
|
12528
|
-
/** @deprecated Use {@link Parameters} instead */
|
|
12529
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
12530
|
-
interface VpnSessionParameters extends Parameters {}
|
|
12531
|
-
|
|
12532
12515
|
/** The enum is used by the platform to notify the client of the VPN session status. */
|
|
12533
12516
|
enum PlatformMessage {
|
|
12534
12517
|
/** Indicates that the VPN configuration connected. */
|
|
@@ -13433,7 +13416,6 @@ declare namespace chrome {
|
|
|
13433
13416
|
|
|
13434
13417
|
/** Fired before sending an HTTP request, once the request headers are available. This may occur after a TCP connection is made to the server, but before any HTTP data is sent. */
|
|
13435
13418
|
const onBeforeSendHeaders: WebRequestEvent<
|
|
13436
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
13437
13419
|
(details: OnBeforeSendHeadersDetails) => BlockingResponse | undefined,
|
|
13438
13420
|
`${OnBeforeSendHeadersOptions}`[]
|
|
13439
13421
|
>;
|
chrome/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chrome",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
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": "1d1d517ed45196c095ef5696a00f7e76653f02d2855a463a18166cda428a35fd",
|
|
98
|
+
"typeScriptVersion": "5.6"
|
|
99
99
|
}
|