@types/chrome 0.0.320 → 0.0.322
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/chrome-cast/index.d.ts +1 -0
- chrome/index.d.ts +42 -37
- 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,
|
11
|
+
* Last updated: Mon, 12 May 2025 12:44:33 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/chrome-cast/index.d.ts
CHANGED
chrome/index.d.ts
CHANGED
@@ -2355,13 +2355,13 @@ declare namespace chrome {
|
|
2355
2355
|
export function sendCommand(
|
2356
2356
|
target: DebuggerSession,
|
2357
2357
|
method: string,
|
2358
|
-
commandParams?:
|
2359
|
-
): Promise<
|
2358
|
+
commandParams?: { [key: string]: unknown },
|
2359
|
+
): Promise<object | undefined>;
|
2360
2360
|
export function sendCommand(
|
2361
2361
|
target: DebuggerSession,
|
2362
2362
|
method: string,
|
2363
|
-
commandParams?:
|
2364
|
-
callback?: (result?:
|
2363
|
+
commandParams?: { [key: string]: unknown },
|
2364
|
+
callback?: (result?: object) => void,
|
2365
2365
|
): void;
|
2366
2366
|
|
2367
2367
|
/**
|
@@ -2375,7 +2375,7 @@ declare namespace chrome {
|
|
2375
2375
|
/** Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab. */
|
2376
2376
|
export const onDetach: chrome.events.Event<(source: Debuggee, reason: `${DetachReason}`) => void>;
|
2377
2377
|
/** Fired whenever debugging target issues instrumentation event. */
|
2378
|
-
export const onEvent: chrome.events.Event<(source: DebuggerSession, method: string, params?:
|
2378
|
+
export const onEvent: chrome.events.Event<(source: DebuggerSession, method: string, params?: object) => void>;
|
2379
2379
|
}
|
2380
2380
|
|
2381
2381
|
export { _debugger as debugger };
|
@@ -2669,7 +2669,7 @@ declare namespace chrome {
|
|
2669
2669
|
/**
|
2670
2670
|
* Set to undefined if the resource content was set successfully; describes error otherwise.
|
2671
2671
|
*/
|
2672
|
-
error?:
|
2672
|
+
error?: object,
|
2673
2673
|
) => void,
|
2674
2674
|
): void;
|
2675
2675
|
}
|
@@ -2942,13 +2942,13 @@ declare namespace chrome {
|
|
2942
2942
|
* @param rootTitle An optional title for the root of the expression tree.
|
2943
2943
|
* @param callback A callback invoked after the sidebar is updated with the object.
|
2944
2944
|
*/
|
2945
|
-
setObject(jsonObject:
|
2945
|
+
setObject(jsonObject: { [key: string]: unknown }, rootTitle?: string, callback?: () => void): void;
|
2946
2946
|
/**
|
2947
2947
|
* Sets a JSON-compliant object to be displayed in the sidebar pane.
|
2948
2948
|
* @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
|
2949
2949
|
* @param callback A callback invoked after the sidebar is updated with the object.
|
2950
2950
|
*/
|
2951
|
-
setObject(jsonObject:
|
2951
|
+
setObject(jsonObject: { [key: string]: unknown }, callback?: () => void): void;
|
2952
2952
|
/**
|
2953
2953
|
* Sets an HTML page to be displayed in the sidebar pane.
|
2954
2954
|
* @param path Relative path of an extension page to display within the sidebar.
|
@@ -2986,9 +2986,10 @@ declare namespace chrome {
|
|
2986
2986
|
* Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.
|
2987
2987
|
* @param callback A function that is called when the user clicks on a valid resource link in Developer Tools window. Note that if the user clicks an invalid URL or an XHR, this function is not called.
|
2988
2988
|
* Parameter resource: A devtools.inspectedWindow.Resource object for the resource that was clicked.
|
2989
|
+
* Parameter lineNumber: Specifies the line number within the resource that was clicked.
|
2989
2990
|
*/
|
2990
2991
|
export function setOpenResourceHandler(
|
2991
|
-
callback?: (resource: chrome.devtools.inspectedWindow.Resource) => void,
|
2992
|
+
callback?: (resource: chrome.devtools.inspectedWindow.Resource, lineNumber: number) => void,
|
2992
2993
|
): void;
|
2993
2994
|
/**
|
2994
2995
|
* @since Chrome 38
|
@@ -3035,19 +3036,19 @@ declare namespace chrome {
|
|
3035
3036
|
* @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
|
3036
3037
|
* @since Chrome 112
|
3037
3038
|
*/
|
3038
|
-
replay?(recording:
|
3039
|
+
replay?(recording: { [key: string]: unknown }): void;
|
3039
3040
|
|
3040
3041
|
/**
|
3041
3042
|
* Converts a recording from the Recorder panel format into a string.
|
3042
3043
|
* @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
|
3043
3044
|
*/
|
3044
|
-
stringify?(recording:
|
3045
|
+
stringify?(recording: { [key: string]: unknown }): void;
|
3045
3046
|
|
3046
3047
|
/**
|
3047
3048
|
* Converts a step of the recording from the Recorder panel format into a string.
|
3048
3049
|
* @param step A step of the recording of a user interaction with the page. This should match [Puppeteer's step schema](https://github.com/puppeteer/replay/blob/main/docs/api/modules/Schema.md#step).
|
3049
3050
|
*/
|
3050
|
-
stringifyStep?(step:
|
3051
|
+
stringifyStep?(step: { [key: string]: unknown }): void;
|
3051
3052
|
}
|
3052
3053
|
|
3053
3054
|
/**
|
@@ -4516,7 +4517,7 @@ declare namespace chrome {
|
|
4516
4517
|
|
4517
4518
|
export interface SelectionResult {
|
4518
4519
|
/** Optional. Selected file entry. It will be null if a file hasn't been selected. */
|
4519
|
-
entry?:
|
4520
|
+
entry?: object | null | undefined;
|
4520
4521
|
/** Whether the file has been selected. */
|
4521
4522
|
success: boolean;
|
4522
4523
|
}
|
@@ -5412,25 +5413,25 @@ declare namespace chrome {
|
|
5412
5413
|
* @param details This parameter is currently unused.
|
5413
5414
|
* @return The `getDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
|
5414
5415
|
*/
|
5415
|
-
export function getDefaultFontSize(details?:
|
5416
|
+
export function getDefaultFontSize(details?: unknown): Promise<FontSizeDetails>;
|
5416
5417
|
/**
|
5417
5418
|
* Gets the default font size.
|
5418
5419
|
* @param details This parameter is currently unused.
|
5419
5420
|
*/
|
5420
5421
|
export function getDefaultFontSize(callback: (options: FontSizeDetails) => void): void;
|
5421
|
-
export function getDefaultFontSize(details:
|
5422
|
+
export function getDefaultFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
|
5422
5423
|
/**
|
5423
5424
|
* Gets the minimum font size.
|
5424
5425
|
* @param details This parameter is currently unused.
|
5425
5426
|
* @return The `getMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
|
5426
5427
|
*/
|
5427
|
-
export function getMinimumFontSize(details?:
|
5428
|
+
export function getMinimumFontSize(details?: unknown): Promise<FontSizeDetails>;
|
5428
5429
|
/**
|
5429
5430
|
* Gets the minimum font size.
|
5430
5431
|
* @param details This parameter is currently unused.
|
5431
5432
|
*/
|
5432
5433
|
export function getMinimumFontSize(callback: (options: FontSizeDetails) => void): void;
|
5433
|
-
export function getMinimumFontSize(details:
|
5434
|
+
export function getMinimumFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
|
5434
5435
|
/**
|
5435
5436
|
* Sets the minimum font size.
|
5436
5437
|
* @return The `setMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -5445,25 +5446,25 @@ declare namespace chrome {
|
|
5445
5446
|
* @param details This parameter is currently unused.
|
5446
5447
|
* @return The `getDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
|
5447
5448
|
*/
|
5448
|
-
export function getDefaultFixedFontSize(details?:
|
5449
|
+
export function getDefaultFixedFontSize(details?: unknown): Promise<FontSizeDetails>;
|
5449
5450
|
/**
|
5450
5451
|
* Gets the default size for fixed width fonts.
|
5451
5452
|
* @param details This parameter is currently unused.
|
5452
5453
|
*/
|
5453
5454
|
export function getDefaultFixedFontSize(callback: (details: FontSizeDetails) => void): void;
|
5454
|
-
export function getDefaultFixedFontSize(details:
|
5455
|
+
export function getDefaultFixedFontSize(details: unknown, callback: (details: FontSizeDetails) => void): void;
|
5455
5456
|
/**
|
5456
5457
|
* Clears the default font size set by this extension, if any.
|
5457
5458
|
* @param details This parameter is currently unused.
|
5458
5459
|
* @return The `clearDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
5459
5460
|
*/
|
5460
|
-
export function clearDefaultFontSize(details?:
|
5461
|
+
export function clearDefaultFontSize(details?: unknown): Promise<void>;
|
5461
5462
|
/**
|
5462
5463
|
* Clears the default font size set by this extension, if any.
|
5463
5464
|
* @param details This parameter is currently unused.
|
5464
5465
|
*/
|
5465
5466
|
export function clearDefaultFontSize(callback: () => void): void;
|
5466
|
-
export function clearDefaultFontSize(details:
|
5467
|
+
export function clearDefaultFontSize(details: unknown, callback: () => void): void;
|
5467
5468
|
/**
|
5468
5469
|
* Sets the default size for fixed width fonts.
|
5469
5470
|
* @return The `setDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -5496,13 +5497,13 @@ declare namespace chrome {
|
|
5496
5497
|
* @param details This parameter is currently unused.
|
5497
5498
|
* @return The `clearMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
5498
5499
|
*/
|
5499
|
-
export function clearMinimumFontSize(details?:
|
5500
|
+
export function clearMinimumFontSize(details?: unknown): Promise<void>;
|
5500
5501
|
/**
|
5501
5502
|
* Clears the minimum font size set by this extension, if any.
|
5502
5503
|
* @param details This parameter is currently unused.
|
5503
5504
|
*/
|
5504
5505
|
export function clearMinimumFontSize(callback: () => void): void;
|
5505
|
-
export function clearMinimumFontSize(details:
|
5506
|
+
export function clearMinimumFontSize(details: unknown, callback: () => void): void;
|
5506
5507
|
/**
|
5507
5508
|
* Gets a list of fonts on the system.
|
5508
5509
|
* @return The `getFontList` method provides its result via callback or returned as a `Promise` (MV3 only).
|
@@ -5517,12 +5518,12 @@ declare namespace chrome {
|
|
5517
5518
|
* @param details This parameter is currently unused.
|
5518
5519
|
* @return The `clearDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
5519
5520
|
*/
|
5520
|
-
export function clearDefaultFixedFontSize(details:
|
5521
|
+
export function clearDefaultFixedFontSize(details: unknown): Promise<void>;
|
5521
5522
|
/**
|
5522
5523
|
* Clears the default fixed font size set by this extension, if any.
|
5523
5524
|
* @param details This parameter is currently unused.
|
5524
5525
|
*/
|
5525
|
-
export function clearDefaultFixedFontSize(details:
|
5526
|
+
export function clearDefaultFixedFontSize(details: unknown, callback: () => void): void;
|
5526
5527
|
|
5527
5528
|
/** Fired when the default fixed font size setting changes. */
|
5528
5529
|
export var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
|
@@ -5551,12 +5552,12 @@ declare namespace chrome {
|
|
5551
5552
|
/** Optional. Time-to-live of the message in seconds. If it is not possible to send the message within that time, an onSendError event will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 86400 seconds (1 day). */
|
5552
5553
|
timeToLive?: number | undefined;
|
5553
5554
|
/** Message data to send to the server. Case-insensitive goog. and google, as well as case-sensitive collapse_key are disallowed as key prefixes. Sum of all key/value pairs should not exceed gcm.MAX_MESSAGE_SIZE. */
|
5554
|
-
data:
|
5555
|
+
data: { [key: string]: unknown };
|
5555
5556
|
}
|
5556
5557
|
|
5557
5558
|
export interface IncomingMessage {
|
5558
5559
|
/** The message data. */
|
5559
|
-
data:
|
5560
|
+
data: { [key: string]: unknown };
|
5560
5561
|
/**
|
5561
5562
|
* Optional.
|
5562
5563
|
* The sender who issued the message.
|
@@ -5576,7 +5577,7 @@ declare namespace chrome {
|
|
5576
5577
|
/** Optional. The ID of the message with this error, if error is related to a specific message. */
|
5577
5578
|
messageId?: string | undefined;
|
5578
5579
|
/** Additional details related to the error, when available. */
|
5579
|
-
detail:
|
5580
|
+
detail: object;
|
5580
5581
|
}
|
5581
5582
|
|
5582
5583
|
export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {}
|
@@ -6245,7 +6246,7 @@ declare namespace chrome {
|
|
6245
6246
|
}
|
6246
6247
|
|
6247
6248
|
export interface MenuItemParameters {
|
6248
|
-
items:
|
6249
|
+
items: MenuItem[];
|
6249
6250
|
engineId: string;
|
6250
6251
|
}
|
6251
6252
|
|
@@ -7186,7 +7187,7 @@ declare namespace chrome {
|
|
7186
7187
|
* @since Chrome 29
|
7187
7188
|
* @param callback Returns the set of notification_ids currently in the system.
|
7188
7189
|
*/
|
7189
|
-
export function getAll(callback: (notifications:
|
7190
|
+
export function getAll(callback: (notifications: { [key: string]: true }) => void): void;
|
7190
7191
|
/**
|
7191
7192
|
* Retrieves whether the user has enabled notifications from this app or extension.
|
7192
7193
|
* @since Chrome 32
|
@@ -7626,7 +7627,7 @@ declare namespace chrome {
|
|
7626
7627
|
*/
|
7627
7628
|
export function getKeyPair(
|
7628
7629
|
certificate: ArrayBuffer,
|
7629
|
-
parameters:
|
7630
|
+
parameters: { [key: string]: unknown },
|
7630
7631
|
callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
|
7631
7632
|
): void;
|
7632
7633
|
/**
|
@@ -7640,7 +7641,7 @@ declare namespace chrome {
|
|
7640
7641
|
*/
|
7641
7642
|
export function getKeyPairBySpki(
|
7642
7643
|
publicKeySpkiDer: ArrayBuffer,
|
7643
|
-
parameters:
|
7644
|
+
parameters: { [key: string]: unknown },
|
7644
7645
|
callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
|
7645
7646
|
): void;
|
7646
7647
|
/** An implementation of WebCrypto's SubtleCrypto that allows crypto operations on keys of client certificates that are available to this extension. */
|
@@ -7716,7 +7717,7 @@ declare namespace chrome {
|
|
7716
7717
|
/** The print job title. */
|
7717
7718
|
title: string;
|
7718
7719
|
/** Print ticket in CJT format. */
|
7719
|
-
ticket:
|
7720
|
+
ticket: { [key: string]: unknown };
|
7720
7721
|
/** The document content type. Supported formats are "application/pdf" and "image/pwg-raster". */
|
7721
7722
|
contentType: string;
|
7722
7723
|
/** Blob containing the document data to print. Format must match |contentType|. */
|
@@ -9508,7 +9509,7 @@ declare namespace chrome {
|
|
9508
9509
|
*/
|
9509
9510
|
export function sendNativeMessage(
|
9510
9511
|
application: string,
|
9511
|
-
message:
|
9512
|
+
message: object,
|
9512
9513
|
responseCallback: (response: any) => void,
|
9513
9514
|
): void;
|
9514
9515
|
/**
|
@@ -9519,7 +9520,7 @@ declare namespace chrome {
|
|
9519
9520
|
*/
|
9520
9521
|
export function sendNativeMessage(
|
9521
9522
|
application: string,
|
9522
|
-
message:
|
9523
|
+
message: object,
|
9523
9524
|
): Promise<any>;
|
9524
9525
|
/**
|
9525
9526
|
* Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
|
@@ -10205,7 +10206,11 @@ declare namespace chrome {
|
|
10205
10206
|
address: string;
|
10206
10207
|
}
|
10207
10208
|
|
10208
|
-
export function create(
|
10209
|
+
export function create(
|
10210
|
+
type: string,
|
10211
|
+
options?: { [key: string]: unknown },
|
10212
|
+
callback?: (createInfo: CreateInfo) => void,
|
10213
|
+
): void;
|
10209
10214
|
export function destroy(socketId: number): void;
|
10210
10215
|
export function connect(
|
10211
10216
|
socketId: number,
|
@@ -12840,7 +12845,7 @@ declare namespace chrome {
|
|
12840
12845
|
export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {}
|
12841
12846
|
|
12842
12847
|
export interface VpnConfigCreationEvent
|
12843
|
-
extends chrome.events.Event<(id: string, name: string, data:
|
12848
|
+
extends chrome.events.Event<(id: string, name: string, data: { [key: string]: unknown }) => void>
|
12844
12849
|
{}
|
12845
12850
|
|
12846
12851
|
export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {}
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.322",
|
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": "d2211cafb9d168b91482e87001e7cbfcd764551a4d73eac6e6f957699d0b7015",
|
98
98
|
"typeScriptVersion": "5.1"
|
99
99
|
}
|