@types/chrome 0.1.43 → 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 +15 -39
- 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
|
@@ -2248,7 +2248,7 @@ declare namespace chrome {
|
|
|
2248
2248
|
*
|
|
2249
2249
|
* Permissions: "debugger"
|
|
2250
2250
|
*/
|
|
2251
|
-
|
|
2251
|
+
namespace _debugger {
|
|
2252
2252
|
/** Debuggee identifier. Either tabId, extensionId or targetId must be specified */
|
|
2253
2253
|
interface Debuggee {
|
|
2254
2254
|
/** The id of the tab which you intend to debug. */
|
|
@@ -9223,11 +9223,6 @@ declare namespace chrome {
|
|
|
9223
9223
|
| "webRequestBlocking"
|
|
9224
9224
|
| "webRequestAuthProvider";
|
|
9225
9225
|
|
|
9226
|
-
/**
|
|
9227
|
-
* @deprecated Use `ManifestPermission` instead.
|
|
9228
|
-
*/
|
|
9229
|
-
type ManifestPermissions = ManifestPermission;
|
|
9230
|
-
|
|
9231
9226
|
/** Source : https://developer.chrome.com/docs/extensions/reference/api/permissions */
|
|
9232
9227
|
type ManifestOptionalPermission = Exclude<
|
|
9233
9228
|
ManifestPermission,
|
|
@@ -9245,11 +9240,6 @@ declare namespace chrome {
|
|
|
9245
9240
|
| "webAuthenticationProxy"
|
|
9246
9241
|
>;
|
|
9247
9242
|
|
|
9248
|
-
/**
|
|
9249
|
-
* @deprecated Use `ManifestOptionalPermission` instead.
|
|
9250
|
-
*/
|
|
9251
|
-
type ManifestOptionalPermissions = ManifestOptionalPermission;
|
|
9252
|
-
|
|
9253
9243
|
interface SearchProvider {
|
|
9254
9244
|
name?: string | undefined;
|
|
9255
9245
|
keyword?: string | undefined;
|
|
@@ -10118,12 +10108,7 @@ declare namespace chrome {
|
|
|
10118
10108
|
* Permissions: "storage"
|
|
10119
10109
|
*/
|
|
10120
10110
|
export namespace storage {
|
|
10121
|
-
|
|
10122
|
-
type NoInferX<T> = T[][T extends any ? 0 : never];
|
|
10123
|
-
// The next line prevents things without the export keyword from being automatically exported (like NoInferX)
|
|
10124
|
-
export {};
|
|
10125
|
-
|
|
10126
|
-
export interface StorageArea {
|
|
10111
|
+
interface StorageArea {
|
|
10127
10112
|
/**
|
|
10128
10113
|
* Gets the amount of space (in bytes) being used by one or more items.
|
|
10129
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.
|
|
@@ -10170,11 +10155,11 @@ declare namespace chrome {
|
|
|
10170
10155
|
* Can return its result via Promise in Manifest V3 or later since Chrome 95.
|
|
10171
10156
|
*/
|
|
10172
10157
|
get<T = { [key: string]: unknown }>(
|
|
10173
|
-
keys?:
|
|
10158
|
+
keys?: NoInfer<keyof T> | Array<NoInfer<keyof T>> | Partial<NoInfer<T>> | null | undefined,
|
|
10174
10159
|
): Promise<T>;
|
|
10175
10160
|
get<T = { [key: string]: unknown }>(callback: (items: T) => void): void;
|
|
10176
10161
|
get<T = { [key: string]: unknown }>(
|
|
10177
|
-
keys:
|
|
10162
|
+
keys: NoInfer<keyof T> | Array<NoInfer<keyof T>> | Partial<NoInfer<T>> | null | undefined,
|
|
10178
10163
|
callback: (items: T) => void,
|
|
10179
10164
|
): void;
|
|
10180
10165
|
|
|
@@ -10201,19 +10186,19 @@ declare namespace chrome {
|
|
|
10201
10186
|
getKeys(callback: (keys: string[]) => void): void;
|
|
10202
10187
|
}
|
|
10203
10188
|
|
|
10204
|
-
|
|
10189
|
+
interface StorageChange {
|
|
10205
10190
|
/** The new value of the item, if there is a new value. */
|
|
10206
10191
|
newValue?: unknown;
|
|
10207
10192
|
/** The old value of the item, if there was an old value. */
|
|
10208
10193
|
oldValue?: unknown;
|
|
10209
10194
|
}
|
|
10210
10195
|
|
|
10211
|
-
|
|
10196
|
+
interface LocalStorageArea extends StorageArea {
|
|
10212
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. */
|
|
10213
10198
|
QUOTA_BYTES: 10485760;
|
|
10214
10199
|
}
|
|
10215
10200
|
|
|
10216
|
-
|
|
10201
|
+
interface SyncStorageArea extends StorageArea {
|
|
10217
10202
|
/** @deprecated The storage.sync API no longer has a sustained write operation quota. */
|
|
10218
10203
|
MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: 1000000;
|
|
10219
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. */
|
|
@@ -10236,18 +10221,18 @@ declare namespace chrome {
|
|
|
10236
10221
|
MAX_WRITE_OPERATIONS_PER_MINUTE: 120;
|
|
10237
10222
|
}
|
|
10238
10223
|
|
|
10239
|
-
|
|
10224
|
+
interface SessionStorageArea extends StorageArea {
|
|
10240
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. */
|
|
10241
10226
|
QUOTA_BYTES: 10485760;
|
|
10242
10227
|
}
|
|
10243
10228
|
|
|
10244
|
-
|
|
10229
|
+
type AreaName = "sync" | "local" | "managed" | "session";
|
|
10245
10230
|
|
|
10246
10231
|
/**
|
|
10247
10232
|
* The storage area's access level.
|
|
10248
10233
|
* @since Chrome 102
|
|
10249
10234
|
*/
|
|
10250
|
-
|
|
10235
|
+
enum AccessLevel {
|
|
10251
10236
|
/** Specifies contexts originating from the extension itself. */
|
|
10252
10237
|
TRUSTED_CONTEXTS = "TRUSTED_CONTEXTS",
|
|
10253
10238
|
/** Specifies contexts originating from outside the extension. */
|
|
@@ -10255,13 +10240,13 @@ declare namespace chrome {
|
|
|
10255
10240
|
}
|
|
10256
10241
|
|
|
10257
10242
|
/** Items in the `local` storage area are local to each machine. */
|
|
10258
|
-
|
|
10243
|
+
const local: LocalStorageArea;
|
|
10259
10244
|
|
|
10260
10245
|
/** Items in the `sync` storage area are synced using Chrome Sync. */
|
|
10261
|
-
|
|
10246
|
+
const sync: SyncStorageArea;
|
|
10262
10247
|
|
|
10263
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. */
|
|
10264
|
-
|
|
10249
|
+
const managed: StorageArea;
|
|
10265
10250
|
|
|
10266
10251
|
/**
|
|
10267
10252
|
* Items in the `session` storage area are stored in-memory and will not be persisted to disk.
|
|
@@ -10269,10 +10254,10 @@ declare namespace chrome {
|
|
|
10269
10254
|
* MV3 only
|
|
10270
10255
|
* @since Chrome 102
|
|
10271
10256
|
*/
|
|
10272
|
-
|
|
10257
|
+
const session: SessionStorageArea;
|
|
10273
10258
|
|
|
10274
10259
|
/** Fired when one or more items change. */
|
|
10275
|
-
|
|
10260
|
+
const onChanged: events.Event<(changes: { [key: string]: StorageChange }, areaName: AreaName) => void>;
|
|
10276
10261
|
}
|
|
10277
10262
|
|
|
10278
10263
|
////////////////////
|
|
@@ -10295,10 +10280,6 @@ declare namespace chrome {
|
|
|
10295
10280
|
total: number;
|
|
10296
10281
|
}
|
|
10297
10282
|
|
|
10298
|
-
/** @deprecated Use {@link CpuTime} instead. */
|
|
10299
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
10300
|
-
interface ProcessorUsage extends CpuTime {}
|
|
10301
|
-
|
|
10302
10283
|
interface ProcessorInfo {
|
|
10303
10284
|
/** Cumulative usage info for this logical processor. */
|
|
10304
10285
|
usage: CpuTime;
|
|
@@ -12531,10 +12512,6 @@ declare namespace chrome {
|
|
|
12531
12512
|
reconnect?: string | undefined;
|
|
12532
12513
|
}
|
|
12533
12514
|
|
|
12534
|
-
/** @deprecated Use {@link Parameters} instead */
|
|
12535
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
12536
|
-
interface VpnSessionParameters extends Parameters {}
|
|
12537
|
-
|
|
12538
12515
|
/** The enum is used by the platform to notify the client of the VPN session status. */
|
|
12539
12516
|
enum PlatformMessage {
|
|
12540
12517
|
/** Indicates that the VPN configuration connected. */
|
|
@@ -13439,7 +13416,6 @@ declare namespace chrome {
|
|
|
13439
13416
|
|
|
13440
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. */
|
|
13441
13418
|
const onBeforeSendHeaders: WebRequestEvent<
|
|
13442
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
13443
13419
|
(details: OnBeforeSendHeadersDetails) => BlockingResponse | undefined,
|
|
13444
13420
|
`${OnBeforeSendHeadersOptions}`[]
|
|
13445
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
|
}
|