@types/chrome 0.0.250 → 0.0.252
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +1 -1
- chrome/chrome-cast/index.d.ts +35 -35
- chrome/index.d.ts +198 -70
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
|
|
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, 20 Nov 2023 23:36:23 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
@@ -95,7 +95,7 @@ declare namespace chrome.cast {
|
|
95
95
|
/**
|
96
96
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.VERSION
|
97
97
|
*/
|
98
|
-
export var VERSION:
|
98
|
+
export var VERSION: number[];
|
99
99
|
|
100
100
|
/**
|
101
101
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast#.isAvailable
|
@@ -156,7 +156,7 @@ declare namespace chrome.cast {
|
|
156
156
|
* @param errorCallback
|
157
157
|
*/
|
158
158
|
export function setCustomReceivers(
|
159
|
-
receivers:
|
159
|
+
receivers: chrome.cast.Receiver[],
|
160
160
|
successCallback: Function,
|
161
161
|
errorCallback: (error: chrome.cast.Error) => void,
|
162
162
|
): void;
|
@@ -247,10 +247,10 @@ declare namespace chrome.cast {
|
|
247
247
|
* @param opt_timeout
|
248
248
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SessionRequest
|
249
249
|
*/
|
250
|
-
constructor(appId: string, capabilities?:
|
250
|
+
constructor(appId: string, capabilities?: chrome.cast.Capability[], timeout?: number);
|
251
251
|
|
252
252
|
appId: string;
|
253
|
-
capabilities:
|
253
|
+
capabilities: chrome.cast.Capability[];
|
254
254
|
requestSessionTimeout: number;
|
255
255
|
language: string | null;
|
256
256
|
}
|
@@ -268,18 +268,18 @@ declare namespace chrome.cast {
|
|
268
268
|
sessionId: string,
|
269
269
|
appId: string,
|
270
270
|
displayName: string,
|
271
|
-
appImages:
|
271
|
+
appImages: chrome.cast.Image[],
|
272
272
|
receiver: chrome.cast.Receiver,
|
273
273
|
);
|
274
274
|
|
275
275
|
sessionId: string;
|
276
276
|
appId: string;
|
277
277
|
displayName: string;
|
278
|
-
appImages:
|
278
|
+
appImages: chrome.cast.Image[];
|
279
279
|
receiver: chrome.cast.Receiver;
|
280
|
-
senderApps:
|
280
|
+
senderApps: chrome.cast.SenderApplication[];
|
281
281
|
namespaces: Array<{ name: string }>;
|
282
|
-
media:
|
282
|
+
media: chrome.cast.media.Media[];
|
283
283
|
status: chrome.cast.SessionStatus;
|
284
284
|
statusText: string | null;
|
285
285
|
transportId: string;
|
@@ -397,13 +397,13 @@ declare namespace chrome.cast {
|
|
397
397
|
constructor(
|
398
398
|
label: string,
|
399
399
|
friendlyName: string,
|
400
|
-
capabilities?:
|
400
|
+
capabilities?: chrome.cast.Capability[],
|
401
401
|
volume?: chrome.cast.Volume,
|
402
402
|
);
|
403
403
|
|
404
404
|
label: string;
|
405
405
|
friendlyName: string;
|
406
|
-
capabilities:
|
406
|
+
capabilities: chrome.cast.Capability[];
|
407
407
|
volume: chrome.cast.Volume;
|
408
408
|
receiverType: chrome.cast.ReceiverType;
|
409
409
|
displayStatus: chrome.cast.ReceiverDisplayStatus;
|
@@ -415,10 +415,10 @@ declare namespace chrome.cast {
|
|
415
415
|
* @param appImages
|
416
416
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverDisplayStatus
|
417
417
|
*/
|
418
|
-
constructor(statusText: string, appImages:
|
418
|
+
constructor(statusText: string, appImages: chrome.cast.Image[]);
|
419
419
|
|
420
420
|
statusText: string;
|
421
|
-
appImages:
|
421
|
+
appImages: chrome.cast.Image[];
|
422
422
|
}
|
423
423
|
|
424
424
|
export class Volume {
|
@@ -512,7 +512,7 @@ declare namespace chrome.cast.media {
|
|
512
512
|
*/
|
513
513
|
constructor(mediaInfo: chrome.cast.media.MediaInfo);
|
514
514
|
|
515
|
-
activeTrackIds:
|
515
|
+
activeTrackIds: Number[];
|
516
516
|
autoplay: boolean;
|
517
517
|
customData: Object;
|
518
518
|
itemId: number;
|
@@ -526,10 +526,10 @@ declare namespace chrome.cast.media {
|
|
526
526
|
* @param items
|
527
527
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.QueueLoadRequest
|
528
528
|
*/
|
529
|
-
constructor(items:
|
529
|
+
constructor(items: chrome.cast.media.QueueItem[]);
|
530
530
|
|
531
531
|
customData: Object;
|
532
|
-
items:
|
532
|
+
items: chrome.cast.media.QueueItem[];
|
533
533
|
repeatMode: chrome.cast.media.RepeatMode;
|
534
534
|
startIndex: number;
|
535
535
|
}
|
@@ -539,11 +539,11 @@ declare namespace chrome.cast.media {
|
|
539
539
|
* @param itemsToInsert
|
540
540
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.QueueInsertItemsRequest
|
541
541
|
*/
|
542
|
-
constructor(itemsToInsert:
|
542
|
+
constructor(itemsToInsert: chrome.cast.media.QueueItem[]);
|
543
543
|
|
544
544
|
customData: Object;
|
545
545
|
insertBefore: number;
|
546
|
-
items:
|
546
|
+
items: chrome.cast.media.QueueItem[];
|
547
547
|
}
|
548
548
|
|
549
549
|
export class QueueRemoveItemsRequest {
|
@@ -551,10 +551,10 @@ declare namespace chrome.cast.media {
|
|
551
551
|
* @param itemIdsToRemove
|
552
552
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.QueueRemoveItemsRequest
|
553
553
|
*/
|
554
|
-
constructor(itemIdsToRemove:
|
554
|
+
constructor(itemIdsToRemove: number[]);
|
555
555
|
|
556
556
|
customData: Object;
|
557
|
-
itemIds:
|
557
|
+
itemIds: number[];
|
558
558
|
}
|
559
559
|
|
560
560
|
export class QueueReorderItemsRequest {
|
@@ -562,11 +562,11 @@ declare namespace chrome.cast.media {
|
|
562
562
|
* @param itemIdsToReorder
|
563
563
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.QueueReorderItemsRequest
|
564
564
|
*/
|
565
|
-
constructor(itemIdsToReorder:
|
565
|
+
constructor(itemIdsToReorder: number[]);
|
566
566
|
|
567
567
|
customData: Object;
|
568
568
|
insertBefore: number;
|
569
|
-
itemIds:
|
569
|
+
itemIds: number[];
|
570
570
|
}
|
571
571
|
|
572
572
|
export class QueueUpdateItemsRequest {
|
@@ -574,10 +574,10 @@ declare namespace chrome.cast.media {
|
|
574
574
|
* @param itemsToUpdate
|
575
575
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.QueueUpdateItemsRequest
|
576
576
|
*/
|
577
|
-
constructor(itemsToUpdate:
|
577
|
+
constructor(itemsToUpdate: chrome.cast.media.QueueItem[]);
|
578
578
|
|
579
579
|
customData: Object;
|
580
|
-
item:
|
580
|
+
item: chrome.cast.media.QueueItem[];
|
581
581
|
}
|
582
582
|
|
583
583
|
/**
|
@@ -708,7 +708,7 @@ declare namespace chrome.cast.media {
|
|
708
708
|
*/
|
709
709
|
constructor(mediaInfo: chrome.cast.media.MediaInfo);
|
710
710
|
|
711
|
-
activeTrackIds:
|
711
|
+
activeTrackIds: number[];
|
712
712
|
autoplay: boolean;
|
713
713
|
currentTime: number;
|
714
714
|
customData: Object;
|
@@ -722,14 +722,14 @@ declare namespace chrome.cast.media {
|
|
722
722
|
* @param opt_textTrackStyle
|
723
723
|
* @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.EditTracksInfoRequest
|
724
724
|
*/
|
725
|
-
constructor(activeTrackIds?:
|
725
|
+
constructor(activeTrackIds?: number[], textTrackStyle?: chrome.cast.media.TextTrackStyle);
|
726
726
|
|
727
|
-
activeTrackIds:
|
727
|
+
activeTrackIds: number[];
|
728
728
|
textTrackStyle: chrome.cast.media.TextTrackStyle;
|
729
729
|
}
|
730
730
|
|
731
731
|
export class GenericMediaMetadata {
|
732
|
-
images:
|
732
|
+
images: chrome.cast.Image[];
|
733
733
|
metadataType: chrome.cast.media.MetadataType;
|
734
734
|
releaseDate: string;
|
735
735
|
/** @deprecated Use releaseDate instead. */
|
@@ -746,7 +746,7 @@ declare namespace chrome.cast.media {
|
|
746
746
|
*/
|
747
747
|
constructor();
|
748
748
|
|
749
|
-
images:
|
749
|
+
images: chrome.cast.Image[];
|
750
750
|
metadataType: chrome.cast.media.MetadataType;
|
751
751
|
releaseDate: string;
|
752
752
|
/** @deprecated Use releaseDate instead. */
|
@@ -769,7 +769,7 @@ declare namespace chrome.cast.media {
|
|
769
769
|
title: string;
|
770
770
|
season: number;
|
771
771
|
episode: number;
|
772
|
-
images:
|
772
|
+
images: chrome.cast.Image[];
|
773
773
|
originalAirdate: string;
|
774
774
|
|
775
775
|
/** @deprecated Use metadataType instead. */
|
@@ -799,7 +799,7 @@ declare namespace chrome.cast.media {
|
|
799
799
|
songName: string;
|
800
800
|
trackNumber: number;
|
801
801
|
discNumber: number;
|
802
|
-
images:
|
802
|
+
images: chrome.cast.Image[];
|
803
803
|
releaseDate: string;
|
804
804
|
|
805
805
|
/** @deprecated Use metadataType instead. */
|
@@ -820,7 +820,7 @@ declare namespace chrome.cast.media {
|
|
820
820
|
title: string;
|
821
821
|
artist: string;
|
822
822
|
location: string;
|
823
|
-
images:
|
823
|
+
images: chrome.cast.Image[];
|
824
824
|
latitude: number;
|
825
825
|
longitude: number;
|
826
826
|
width: number;
|
@@ -844,7 +844,7 @@ declare namespace chrome.cast.media {
|
|
844
844
|
contentType: string;
|
845
845
|
metadata: any;
|
846
846
|
duration: number;
|
847
|
-
tracks:
|
847
|
+
tracks: chrome.cast.media.Track[];
|
848
848
|
textTrackStyle: chrome.cast.media.TextTrackStyle;
|
849
849
|
customData: Object;
|
850
850
|
}
|
@@ -857,11 +857,11 @@ declare namespace chrome.cast.media {
|
|
857
857
|
*/
|
858
858
|
constructor(sessionId: string, mediaSessionId: number);
|
859
859
|
|
860
|
-
activeTrackIds:
|
860
|
+
activeTrackIds: number[];
|
861
861
|
currentItemId: number;
|
862
862
|
customData: Object;
|
863
863
|
idleReason: chrome.cast.media.IdleReason | null;
|
864
|
-
items:
|
864
|
+
items: chrome.cast.media.QueueItem[];
|
865
865
|
liveSeekableRange?: chrome.cast.media.LiveSeekableRange | undefined;
|
866
866
|
loadingItemId: number;
|
867
867
|
media: chrome.cast.media.MediaInfo;
|
@@ -871,7 +871,7 @@ declare namespace chrome.cast.media {
|
|
871
871
|
preloadedItemId: number;
|
872
872
|
repeatMode: chrome.cast.media.RepeatMode;
|
873
873
|
sessionId: string;
|
874
|
-
supportedMediaCommands:
|
874
|
+
supportedMediaCommands: chrome.cast.media.MediaCommand[];
|
875
875
|
volume: chrome.cast.Volume;
|
876
876
|
|
877
877
|
/** @deprecated Use getEstimatedTime instead */
|
chrome/index.d.ts
CHANGED
@@ -2166,7 +2166,7 @@ declare namespace chrome.declarativeContent {
|
|
2166
2166
|
/** Optional. Matches if the scheme of the URL is equal to any of the schemes specified in the array. */
|
2167
2167
|
schemes?: string[] | undefined;
|
2168
2168
|
/** Optional. Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. */
|
2169
|
-
ports?:
|
2169
|
+
ports?: Array<number | number[]> | undefined;
|
2170
2170
|
}
|
2171
2171
|
|
2172
2172
|
export class PageStateMatcherProperties {
|
@@ -3411,7 +3411,7 @@ declare namespace chrome.events {
|
|
3411
3411
|
/** Optional. Matches if the URL (without fragment identifier) ends with a specified string. Port numbers are stripped from the URL if they match the default port number. */
|
3412
3412
|
urlSuffix?: string | undefined;
|
3413
3413
|
/** Optional. Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. */
|
3414
|
-
ports?:
|
3414
|
+
ports?: Array<number | number[]> | undefined;
|
3415
3415
|
/**
|
3416
3416
|
* Optional.
|
3417
3417
|
* Since Chrome 28.
|
@@ -7270,37 +7270,45 @@ declare namespace chrome.runtime {
|
|
7270
7270
|
matches?: string[] | undefined;
|
7271
7271
|
permissions?: string[] | undefined;
|
7272
7272
|
} | undefined;
|
7273
|
-
content_scripts?:
|
7274
|
-
|
7275
|
-
|
7276
|
-
|
7277
|
-
|
7278
|
-
|
7279
|
-
|
7280
|
-
|
7281
|
-
|
7282
|
-
|
7283
|
-
|
7273
|
+
content_scripts?:
|
7274
|
+
| Array<{
|
7275
|
+
matches?: string[] | undefined;
|
7276
|
+
exclude_matches?: string[] | undefined;
|
7277
|
+
css?: string[] | undefined;
|
7278
|
+
js?: string[] | undefined;
|
7279
|
+
run_at?: string | undefined;
|
7280
|
+
all_frames?: boolean | undefined;
|
7281
|
+
match_about_blank?: boolean | undefined;
|
7282
|
+
include_globs?: string[] | undefined;
|
7283
|
+
exclude_globs?: string[] | undefined;
|
7284
|
+
}>
|
7285
|
+
| undefined;
|
7284
7286
|
converted_from_user_script?: boolean | undefined;
|
7285
7287
|
current_locale?: string | undefined;
|
7286
7288
|
devtools_page?: string | undefined;
|
7287
|
-
event_rules?:
|
7288
|
-
|
7289
|
-
|
7290
|
-
|
7291
|
-
|
7292
|
-
|
7293
|
-
|
7289
|
+
event_rules?:
|
7290
|
+
| Array<{
|
7291
|
+
event?: string | undefined;
|
7292
|
+
actions?:
|
7293
|
+
| Array<{
|
7294
|
+
type: string;
|
7295
|
+
}>
|
7296
|
+
| undefined;
|
7297
|
+
conditions?: chrome.declarativeContent.PageStateMatcherProperties[] | undefined;
|
7298
|
+
}>
|
7299
|
+
| undefined;
|
7294
7300
|
externally_connectable?: {
|
7295
7301
|
ids?: string[] | undefined;
|
7296
7302
|
matches?: string[] | undefined;
|
7297
7303
|
accepts_tls_channel_id?: boolean | undefined;
|
7298
7304
|
} | undefined;
|
7299
|
-
file_browser_handlers?:
|
7300
|
-
|
7301
|
-
|
7302
|
-
|
7303
|
-
|
7305
|
+
file_browser_handlers?:
|
7306
|
+
| Array<{
|
7307
|
+
id?: string | undefined;
|
7308
|
+
default_title?: string | undefined;
|
7309
|
+
file_filters?: string[] | undefined;
|
7310
|
+
}>
|
7311
|
+
| undefined;
|
7304
7312
|
file_system_provider_capabilities?: {
|
7305
7313
|
configurable?: boolean | undefined;
|
7306
7314
|
watchable?: boolean | undefined;
|
@@ -7308,29 +7316,35 @@ declare namespace chrome.runtime {
|
|
7308
7316
|
source?: string | undefined;
|
7309
7317
|
} | undefined;
|
7310
7318
|
homepage_url?: string | undefined;
|
7311
|
-
import?:
|
7312
|
-
|
7313
|
-
|
7314
|
-
|
7319
|
+
import?:
|
7320
|
+
| Array<{
|
7321
|
+
id: string;
|
7322
|
+
minimum_version?: string | undefined;
|
7323
|
+
}>
|
7324
|
+
| undefined;
|
7315
7325
|
export?: {
|
7316
7326
|
whitelist?: string[] | undefined;
|
7317
7327
|
} | undefined;
|
7318
7328
|
incognito?: string | undefined;
|
7319
|
-
input_components?:
|
7320
|
-
|
7321
|
-
|
7322
|
-
|
7323
|
-
|
7324
|
-
|
7325
|
-
|
7326
|
-
|
7327
|
-
|
7329
|
+
input_components?:
|
7330
|
+
| Array<{
|
7331
|
+
name?: string | undefined;
|
7332
|
+
type?: string | undefined;
|
7333
|
+
id?: string | undefined;
|
7334
|
+
description?: string | undefined;
|
7335
|
+
language?: string[] | string | undefined;
|
7336
|
+
layouts?: string[] | undefined;
|
7337
|
+
indicator?: string | undefined;
|
7338
|
+
}>
|
7339
|
+
| undefined;
|
7328
7340
|
key?: string | undefined;
|
7329
7341
|
minimum_chrome_version?: string | undefined;
|
7330
|
-
nacl_modules?:
|
7331
|
-
|
7332
|
-
|
7333
|
-
|
7342
|
+
nacl_modules?:
|
7343
|
+
| Array<{
|
7344
|
+
path: string;
|
7345
|
+
mime_type: string;
|
7346
|
+
}>
|
7347
|
+
| undefined;
|
7334
7348
|
oauth2?: {
|
7335
7349
|
client_id: string;
|
7336
7350
|
scopes?: string[] | undefined;
|
@@ -7345,13 +7359,17 @@ declare namespace chrome.runtime {
|
|
7345
7359
|
chrome_style?: boolean | undefined;
|
7346
7360
|
open_in_tab?: boolean | undefined;
|
7347
7361
|
} | undefined;
|
7348
|
-
platforms?:
|
7349
|
-
|
7350
|
-
|
7351
|
-
|
7352
|
-
|
7353
|
-
|
7354
|
-
|
7362
|
+
platforms?:
|
7363
|
+
| Array<{
|
7364
|
+
nacl_arch?: string | undefined;
|
7365
|
+
sub_package_path: string;
|
7366
|
+
}>
|
7367
|
+
| undefined;
|
7368
|
+
plugins?:
|
7369
|
+
| Array<{
|
7370
|
+
path: string;
|
7371
|
+
}>
|
7372
|
+
| undefined;
|
7355
7373
|
requirements?: {
|
7356
7374
|
"3D"?: {
|
7357
7375
|
features?: string[] | undefined;
|
@@ -7375,12 +7393,12 @@ declare namespace chrome.runtime {
|
|
7375
7393
|
managed_schema: string;
|
7376
7394
|
} | undefined;
|
7377
7395
|
tts_engine?: {
|
7378
|
-
voices: {
|
7396
|
+
voices: Array<{
|
7379
7397
|
voice_name: string;
|
7380
7398
|
lang?: string | undefined;
|
7381
7399
|
gender?: string | undefined;
|
7382
7400
|
event_types?: string[] | undefined;
|
7383
|
-
}
|
7401
|
+
}>;
|
7384
7402
|
} | undefined;
|
7385
7403
|
update_url?: string | undefined;
|
7386
7404
|
version_name?: string | undefined;
|
@@ -7421,18 +7439,20 @@ declare namespace chrome.runtime {
|
|
7421
7439
|
type?: "module"; // If the service worker uses ES modules
|
7422
7440
|
}
|
7423
7441
|
| undefined;
|
7424
|
-
content_scripts?:
|
7425
|
-
|
7426
|
-
|
7427
|
-
|
7428
|
-
|
7429
|
-
|
7430
|
-
|
7431
|
-
|
7432
|
-
|
7433
|
-
|
7434
|
-
|
7435
|
-
|
7442
|
+
content_scripts?:
|
7443
|
+
| Array<{
|
7444
|
+
matches?: string[] | undefined;
|
7445
|
+
exclude_matches?: string[] | undefined;
|
7446
|
+
css?: string[] | undefined;
|
7447
|
+
js?: string[] | undefined;
|
7448
|
+
run_at?: string | undefined;
|
7449
|
+
all_frames?: boolean | undefined;
|
7450
|
+
match_about_blank?: boolean | undefined;
|
7451
|
+
include_globs?: string[] | undefined;
|
7452
|
+
exclude_globs?: string[] | undefined;
|
7453
|
+
world?: "ISOLATED" | "MAIN" | undefined;
|
7454
|
+
}>
|
7455
|
+
| undefined;
|
7436
7456
|
content_security_policy?: {
|
7437
7457
|
extension_pages?: string;
|
7438
7458
|
sandbox?: string;
|
@@ -7440,7 +7460,7 @@ declare namespace chrome.runtime {
|
|
7440
7460
|
host_permissions?: string[] | undefined;
|
7441
7461
|
optional_permissions?: ManifestPermissions[] | undefined;
|
7442
7462
|
permissions?: ManifestPermissions[] | undefined;
|
7443
|
-
web_accessible_resources?: { resources: string[]; matches: string[] }
|
7463
|
+
web_accessible_resources?: Array<{ resources: string[]; matches: string[] }> | undefined;
|
7444
7464
|
}
|
7445
7465
|
|
7446
7466
|
export type Manifest = ManifestV2 | ManifestV3;
|
@@ -7781,7 +7801,7 @@ declare namespace chrome.scripting {
|
|
7781
7801
|
*/
|
7782
7802
|
export function executeScript<Args extends any[], Result>(
|
7783
7803
|
injection: ScriptInjection<Args, Result>,
|
7784
|
-
): Promise<InjectionResult<Awaited<Result
|
7804
|
+
): Promise<Array<InjectionResult<Awaited<Result>>>>;
|
7785
7805
|
|
7786
7806
|
/**
|
7787
7807
|
* Injects a script into a target context. The script will be run at document_end.
|
@@ -7792,7 +7812,7 @@ declare namespace chrome.scripting {
|
|
7792
7812
|
*/
|
7793
7813
|
export function executeScript<Args extends any[], Result>(
|
7794
7814
|
injection: ScriptInjection<Args, Result>,
|
7795
|
-
callback: (results: InjectionResult<Awaited<Result
|
7815
|
+
callback: (results: Array<InjectionResult<Awaited<Result>>>) => void,
|
7796
7816
|
): void;
|
7797
7817
|
|
7798
7818
|
/**
|
@@ -12565,31 +12585,139 @@ declare namespace chrome.declarativeNetRequest {
|
|
12565
12585
|
*/
|
12566
12586
|
declare namespace chrome.sidePanel {
|
12567
12587
|
export interface GetPanelOptions {
|
12588
|
+
/**
|
12589
|
+
* If specified, the side panel options for the given tab will be returned.
|
12590
|
+
* Otherwise, returns the default side panel options (used for any tab that doesn't have specific settings).
|
12591
|
+
*/
|
12568
12592
|
tabId?: number;
|
12569
12593
|
}
|
12570
12594
|
|
12595
|
+
/**
|
12596
|
+
* @since Chrome 116
|
12597
|
+
*/
|
12598
|
+
export type OpenOptions =
|
12599
|
+
& {
|
12600
|
+
/** The tab in which to open the side panel.
|
12601
|
+
* If the corresponding tab has a tab-specific side panel, the panel will only be open for that tab.
|
12602
|
+
* If there is not a tab-specific panel, the global panel will be open in the specified tab and any other tabs without a currently-open tab- specific panel.
|
12603
|
+
* This will override any currently-active side panel (global or tab-specific) in the corresponding tab.
|
12604
|
+
* At least one of this and windowId must be provided. */
|
12605
|
+
tabId?: number;
|
12606
|
+
/**
|
12607
|
+
* The window in which to open the side panel.
|
12608
|
+
* This is only applicable if the extension has a global (non-tab-specific) side panel or tabId is also specified.
|
12609
|
+
* This will override any currently-active global side panel the user has open in the given window.
|
12610
|
+
* At least one of this and tabId must be provided.
|
12611
|
+
*/
|
12612
|
+
windowId?: number;
|
12613
|
+
}
|
12614
|
+
& ({
|
12615
|
+
tabId: number;
|
12616
|
+
} | {
|
12617
|
+
windowId: number;
|
12618
|
+
});
|
12619
|
+
|
12571
12620
|
export interface PanelBehavior {
|
12621
|
+
/** Whether clicking the extension's icon will toggle showing the extension's entry in the side panel. Defaults to false. */
|
12572
12622
|
openPanelOnActionClick?: boolean;
|
12573
12623
|
}
|
12574
12624
|
|
12575
12625
|
export interface PanelOptions {
|
12626
|
+
/** Whether the side panel should be enabled. This is optional. The default value is true. */
|
12576
12627
|
enabled?: boolean;
|
12628
|
+
/** The path to the side panel HTML file to use. This must be a local resource within the extension package. */
|
12577
12629
|
path?: string;
|
12630
|
+
/**
|
12631
|
+
* If specified, the side panel options will only apply to the tab with this id.
|
12632
|
+
* If omitted, these options set the default behavior (used for any tab that doesn't have specific settings).
|
12633
|
+
* Note: if the same path is set for this tabId and the default tabId, then the panel for this tabId will be a different instance than the panel for the default tabId.
|
12634
|
+
*/
|
12578
12635
|
tabId?: number;
|
12579
12636
|
}
|
12580
12637
|
|
12581
12638
|
export interface SidePanel {
|
12639
|
+
/** Developer specified path for side panel display. */
|
12582
12640
|
default_path: string;
|
12583
12641
|
}
|
12584
12642
|
|
12643
|
+
/**
|
12644
|
+
* Returns the active panel configuration.
|
12645
|
+
* Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility.
|
12646
|
+
* You cannot use both on the same function call.
|
12647
|
+
* The promise resolves with the same type that is passed to the callback.
|
12648
|
+
*/
|
12649
|
+
export function getOptions(
|
12650
|
+
/** Specifies the context to return the configuration for. */
|
12651
|
+
options: GetPanelOptions,
|
12652
|
+
callback: (options: PanelOptions) => void,
|
12653
|
+
): void;
|
12654
|
+
|
12585
12655
|
export function getOptions(
|
12656
|
+
/** Specifies the context to return the configuration for. */
|
12586
12657
|
options: GetPanelOptions,
|
12587
|
-
callback?: (options: PanelOptions) => void,
|
12588
12658
|
): Promise<PanelOptions>;
|
12589
12659
|
|
12590
|
-
|
12660
|
+
/**
|
12661
|
+
* Returns the extension's current side panel behavior.
|
12662
|
+
* Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility.
|
12663
|
+
* You cannot use both on the same function call.
|
12664
|
+
* The promise resolves with the same type that is passed to the callback.
|
12665
|
+
*/
|
12666
|
+
export function getPanelBehavior(
|
12667
|
+
callback: (behavior: PanelBehavior) => void,
|
12668
|
+
): void;
|
12591
12669
|
|
12592
|
-
export function
|
12670
|
+
export function getPanelBehavior(): Promise<PanelBehavior>;
|
12671
|
+
|
12672
|
+
/**
|
12673
|
+
* @since Chrome 116
|
12674
|
+
* Opens the side panel for the extension. This may only be called in response to a user action.
|
12675
|
+
* Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility.
|
12676
|
+
* You cannot use both on the same function call.
|
12677
|
+
* The promise resolves with the same type that is passed to the callback.
|
12678
|
+
*/
|
12679
|
+
export function open(
|
12680
|
+
/** Specifies the context in which to open the side panel. */
|
12681
|
+
options: OpenOptions,
|
12682
|
+
callback: () => void,
|
12683
|
+
): void;
|
12684
|
+
|
12685
|
+
export function open(
|
12686
|
+
/** Specifies the context in which to open the side panel. */
|
12687
|
+
options: OpenOptions,
|
12688
|
+
): Promise<void>;
|
12689
|
+
|
12690
|
+
/**
|
12691
|
+
* Configures the side panel.
|
12692
|
+
* Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility.
|
12693
|
+
* You cannot use both on the same function call.
|
12694
|
+
* The promise resolves with the same type that is passed to the callback.
|
12695
|
+
*/
|
12696
|
+
export function setOptions(
|
12697
|
+
/** The configuration options to apply to the panel. */
|
12698
|
+
options: PanelOptions,
|
12699
|
+
callback: () => void,
|
12700
|
+
): void;
|
12701
|
+
|
12702
|
+
export function setOptions(
|
12703
|
+
/** The configuration options to apply to the panel. */
|
12704
|
+
options: PanelOptions,
|
12705
|
+
): Promise<void>;
|
12706
|
+
|
12707
|
+
/**
|
12708
|
+
* Configures the extension's side panel behavior. This is an upsert operation.
|
12709
|
+
* Promises are supported in Manifest V3 and later, but callbacks are provided for backward compatibility.
|
12710
|
+
* You cannot use both on the same function call.
|
12711
|
+
* The promise resolves with the same type that is passed to the callback.
|
12712
|
+
*/
|
12713
|
+
export function setPanelBehavior(
|
12714
|
+
/** The new behavior to be set. */
|
12715
|
+
behavior: PanelBehavior,
|
12716
|
+
callback: () => void,
|
12717
|
+
): void;
|
12593
12718
|
|
12594
|
-
export function setPanelBehavior(
|
12719
|
+
export function setPanelBehavior(
|
12720
|
+
/** The new behavior to be set. */
|
12721
|
+
behavior: PanelBehavior,
|
12722
|
+
): Promise<void>;
|
12595
12723
|
}
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.252",
|
4
4
|
"description": "TypeScript definitions for chrome",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -93,6 +93,6 @@
|
|
93
93
|
"@types/filesystem": "*",
|
94
94
|
"@types/har-format": "*"
|
95
95
|
},
|
96
|
-
"typesPublisherContentHash": "
|
96
|
+
"typesPublisherContentHash": "dca1bd9e1bd607c199132d09e1051c5c05dd3351ac7400b5749a5775f7daf4e5",
|
97
97
|
"typeScriptVersion": "4.5"
|
98
98
|
}
|