@types/chrome 0.0.243 → 0.0.245

Sign up to get free protection for your applications and to get access to all the features.
chrome/index.d.ts CHANGED
@@ -131,7 +131,7 @@ declare namespace chrome.action {
131
131
  popup: string;
132
132
  }
133
133
 
134
- export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { }
134
+ export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
135
135
 
136
136
  export interface TabIconDetails {
137
137
  /** Optional. Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' */
@@ -347,7 +347,7 @@ declare namespace chrome.action {
347
347
  * or as dictionary of either one of those. Either the path or the imageData property must be specified.
348
348
  * @return The `setIcon` method provides its result via callback or returned as a `Promise` (MV3 only). Since Chrome 96.
349
349
  */
350
- export function setIcon(details: TabIconDetails): Promise<void>
350
+ export function setIcon(details: TabIconDetails): Promise<void>;
351
351
  export function setIcon(details: TabIconDetails, callback: () => void): void;
352
352
 
353
353
  /**
@@ -407,7 +407,7 @@ declare namespace chrome.alarms {
407
407
  name: string;
408
408
  }
409
409
 
410
- export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> { }
410
+ export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> {}
411
411
 
412
412
  /**
413
413
  * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
@@ -570,7 +570,7 @@ declare namespace chrome.bookmarks {
570
570
  * Since Chrome 37.
571
571
  * Indicates the reason why this node is unmodifiable. The managed value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
572
572
  */
573
- unmodifiable?: 'managed' | undefined;
573
+ unmodifiable?: "managed" | undefined;
574
574
  }
575
575
 
576
576
  export interface BookmarkRemoveInfo {
@@ -596,22 +596,26 @@ declare namespace chrome.bookmarks {
596
596
  }
597
597
 
598
598
  export interface BookmarkRemovedEvent
599
- extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void> { }
599
+ extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void>
600
+ {}
600
601
 
601
- export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> { }
602
+ export interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> {}
602
603
 
603
- export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> { }
604
+ export interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> {}
604
605
 
605
- export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> { }
606
+ export interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> {}
606
607
 
607
608
  export interface BookmarkChangedEvent
608
- extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void> { }
609
+ extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void>
610
+ {}
609
611
 
610
612
  export interface BookmarkCreatedEvent
611
- extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void> { }
613
+ extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void>
614
+ {}
612
615
 
613
616
  export interface BookmarkChildrenReordered
614
- extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void> { }
617
+ extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void>
618
+ {}
615
619
 
616
620
  export interface BookmarkSearchQuery {
617
621
  query?: string | undefined;
@@ -857,7 +861,7 @@ declare namespace chrome.browserAction {
857
861
  popup: string;
858
862
  }
859
863
 
860
- export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { }
864
+ export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
861
865
 
862
866
  /**
863
867
  * Since Chrome 22.
@@ -1200,16 +1204,16 @@ declare namespace chrome.browsingData {
1200
1204
  /** Clears websites' cache storage data.
1201
1205
  * @return The `removeCacheStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
1202
1206
  */
1203
- export function removeCacheStorage(options: RemovalOptions): Promise<void>
1207
+ export function removeCacheStorage(options: RemovalOptions): Promise<void>;
1204
1208
  /** Clears websites' cache storage data.
1205
1209
  * @param callback Called when websites' appcache data has been cleared.
1206
1210
  */
1207
- export function removeCacheStorage(options: RemovalOptions, callback: () => void): void
1211
+ export function removeCacheStorage(options: RemovalOptions, callback: () => void): void;
1208
1212
  /**
1209
1213
  * Clears the browser's list of downloaded files (not the downloaded files themselves).
1210
1214
  * @return The `removeDownloads` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
1211
1215
  */
1212
- export function removeDownloads(options: RemovalOptions): Promise<void>
1216
+ export function removeDownloads(options: RemovalOptions): Promise<void>;
1213
1217
  /**
1214
1218
  * Clears the browser's list of downloaded files (not the downloaded files themselves).
1215
1219
  * @param callback Called when the browser's list of downloaded files has been cleared.
@@ -1275,7 +1279,7 @@ declare namespace chrome.commands {
1275
1279
  shortcut?: string | undefined;
1276
1280
  }
1277
1281
 
1278
- export interface CommandEvent extends chrome.events.Event<(command: string, tab: chrome.tabs.Tab) => void> { }
1282
+ export interface CommandEvent extends chrome.events.Event<(command: string, tab: chrome.tabs.Tab) => void> {}
1279
1283
 
1280
1284
  /**
1281
1285
  * Returns all the registered extension commands for this extension and their shortcut (if active).
@@ -1301,7 +1305,7 @@ declare namespace chrome.commands {
1301
1305
  * Permissions: "contentSettings"
1302
1306
  */
1303
1307
  declare namespace chrome.contentSettings {
1304
- type ScopeEnum = 'regular' | 'incognito_session_only';
1308
+ type ScopeEnum = "regular" | "incognito_session_only";
1305
1309
 
1306
1310
  export interface ClearDetails {
1307
1311
  /**
@@ -1314,7 +1318,7 @@ declare namespace chrome.contentSettings {
1314
1318
  scope?: ScopeEnum | undefined;
1315
1319
  }
1316
1320
 
1317
- type DefaultContentSettingDetails = 'allow' | 'ask' | 'block' | 'detect_important_content' | 'session_only';
1321
+ type DefaultContentSettingDetails = "allow" | "ask" | "block" | "detect_important_content" | "session_only";
1318
1322
 
1319
1323
  export interface SetDetails {
1320
1324
  /** Optional. The resource identifier for the content type. */
@@ -1330,55 +1334,55 @@ declare namespace chrome.contentSettings {
1330
1334
  }
1331
1335
 
1332
1336
  export interface CookieSetDetails extends SetDetails {
1333
- setting: 'allow' | 'block' | 'session_only';
1337
+ setting: "allow" | "block" | "session_only";
1334
1338
  }
1335
1339
 
1336
1340
  export interface ImagesSetDetails extends SetDetails {
1337
- setting: 'allow' | 'block';
1341
+ setting: "allow" | "block";
1338
1342
  }
1339
1343
 
1340
1344
  export interface JavascriptSetDetails extends SetDetails {
1341
- setting: 'allow' | 'block';
1345
+ setting: "allow" | "block";
1342
1346
  }
1343
1347
 
1344
1348
  export interface LocationSetDetails extends SetDetails {
1345
- setting: 'allow' | 'block' | 'ask';
1349
+ setting: "allow" | "block" | "ask";
1346
1350
  }
1347
1351
 
1348
1352
  export interface PluginsSetDetails extends SetDetails {
1349
- setting: 'allow' | 'block' | 'detect_important_content';
1353
+ setting: "allow" | "block" | "detect_important_content";
1350
1354
  }
1351
1355
 
1352
1356
  export interface PopupsSetDetails extends SetDetails {
1353
- setting: 'allow' | 'block';
1357
+ setting: "allow" | "block";
1354
1358
  }
1355
1359
 
1356
1360
  export interface NotificationsSetDetails extends SetDetails {
1357
- setting: 'allow' | 'block' | 'ask';
1361
+ setting: "allow" | "block" | "ask";
1358
1362
  }
1359
1363
 
1360
1364
  export interface FullscreenSetDetails extends SetDetails {
1361
- setting: 'allow';
1365
+ setting: "allow";
1362
1366
  }
1363
1367
 
1364
1368
  export interface MouselockSetDetails extends SetDetails {
1365
- setting: 'allow';
1369
+ setting: "allow";
1366
1370
  }
1367
1371
 
1368
1372
  export interface MicrophoneSetDetails extends SetDetails {
1369
- setting: 'allow' | 'block' | 'ask';
1373
+ setting: "allow" | "block" | "ask";
1370
1374
  }
1371
1375
 
1372
1376
  export interface CameraSetDetails extends SetDetails {
1373
- setting: 'allow' | 'block' | 'ask';
1377
+ setting: "allow" | "block" | "ask";
1374
1378
  }
1375
1379
 
1376
1380
  export interface PpapiBrokerSetDetails extends SetDetails {
1377
- setting: 'allow' | 'block' | 'ask';
1381
+ setting: "allow" | "block" | "ask";
1378
1382
  }
1379
1383
 
1380
1384
  export interface MultipleAutomaticDownloadsSetDetails extends SetDetails {
1381
- setting: 'allow' | 'block' | 'ask';
1385
+ setting: "allow" | "block" | "ask";
1382
1386
  }
1383
1387
 
1384
1388
  export interface GetDetails {
@@ -1411,8 +1415,8 @@ declare namespace chrome.contentSettings {
1411
1415
  /**
1412
1416
  * A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
1413
1417
  */
1414
- resourceIdentifiers?: ResourceIdentifier[]
1415
- ) => void
1418
+ resourceIdentifiers?: ResourceIdentifier[],
1419
+ ) => void,
1416
1420
  ): void;
1417
1421
  /**
1418
1422
  * Gets the current content setting for a given pair of URLs.
@@ -1667,7 +1671,7 @@ declare namespace chrome.contextMenus {
1667
1671
  * Since Chrome 35.
1668
1672
  * One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements.
1669
1673
  */
1670
- mediaType?: 'image' | 'video' | 'audio' | undefined;
1674
+ mediaType?: "image" | "video" | "audio" | undefined;
1671
1675
  /**
1672
1676
  * Optional.
1673
1677
  * Since Chrome 35.
@@ -1699,7 +1703,20 @@ declare namespace chrome.contextMenus {
1699
1703
  srcUrl?: string | undefined;
1700
1704
  }
1701
1705
 
1702
- type ContextType = "all" | "page" | "frame" | "selection" | "link" | "editable" | "image" | "video" | "audio" | "launcher" | "browser_action" | "page_action" | "action";
1706
+ type ContextType =
1707
+ | "all"
1708
+ | "page"
1709
+ | "frame"
1710
+ | "selection"
1711
+ | "link"
1712
+ | "editable"
1713
+ | "image"
1714
+ | "video"
1715
+ | "audio"
1716
+ | "launcher"
1717
+ | "browser_action"
1718
+ | "page_action"
1719
+ | "action";
1703
1720
 
1704
1721
  type ContextItemType = "normal" | "checkbox" | "radio" | "separator";
1705
1722
 
@@ -1765,7 +1782,7 @@ declare namespace chrome.contextMenus {
1765
1782
  visible?: boolean | undefined;
1766
1783
  }
1767
1784
 
1768
- export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> { }
1785
+ export interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> {}
1769
1786
 
1770
1787
  /**
1771
1788
  * Since Chrome 38.
@@ -1815,7 +1832,7 @@ declare namespace chrome.contextMenus {
1815
1832
  */
1816
1833
  declare namespace chrome.cookies {
1817
1834
  /** A cookie's 'SameSite' state (https://tools.ietf.org/html/draft-west-first-party-cookies). 'no_restriction' corresponds to a cookie set with 'SameSite=None', 'lax' to 'SameSite=Lax', and 'strict' to 'SameSite=Strict'. 'unspecified' corresponds to a cookie set without the SameSite attribute. **/
1818
- export type SameSiteStatus = 'unspecified' | 'no_restriction' | 'lax' | 'strict';
1835
+ export type SameSiteStatus = "unspecified" | "no_restriction" | "lax" | "strict";
1819
1836
 
1820
1837
  /** Represents information about an HTTP cookie. */
1821
1838
  export interface Cookie {
@@ -1915,7 +1932,7 @@ declare namespace chrome.cookies {
1915
1932
  cause: string;
1916
1933
  }
1917
1934
 
1918
- export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> { }
1935
+ export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> {}
1919
1936
 
1920
1937
  /**
1921
1938
  * Lists all existing cookie stores.
@@ -1987,7 +2004,7 @@ declare namespace chrome.cookies {
1987
2004
  * Availability: Since Chrome 18.
1988
2005
  * Permissions: "debugger"
1989
2006
  */
1990
- declare module chrome {
2007
+ declare namespace chrome {
1991
2008
  namespace _debugger {
1992
2009
  /** Debuggee identifier. Either tabId or extensionId must be specified */
1993
2010
  export interface Debuggee {
@@ -2039,10 +2056,12 @@ declare module chrome {
2039
2056
  }
2040
2057
 
2041
2058
  export interface DebuggerDetachedEvent
2042
- extends chrome.events.Event<(source: Debuggee, reason: string) => void> { }
2059
+ extends chrome.events.Event<(source: Debuggee, reason: string) => void>
2060
+ {}
2043
2061
 
2044
2062
  export interface DebuggerEventEvent
2045
- extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void> { }
2063
+ extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void>
2064
+ {}
2046
2065
 
2047
2066
  /**
2048
2067
  * Attaches debugger to the given target.
@@ -2192,13 +2211,13 @@ declare namespace chrome.declarativeContent {
2192
2211
  * Declarative event action that enables the extension's action while the corresponding conditions are met.
2193
2212
  * Manifest v3.
2194
2213
  */
2195
- export class ShowAction { }
2214
+ export class ShowAction {}
2196
2215
 
2197
2216
  /**
2198
2217
  * Declarative event action that shows the extension's page action while the corresponding conditions are met.
2199
2218
  * Manifest v2.
2200
2219
  */
2201
- export class ShowPageAction { }
2220
+ export class ShowPageAction {}
2202
2221
 
2203
2222
  /** Declarative event action that changes the icon of the page action while the corresponding conditions are met. */
2204
2223
  export class SetIcon {
@@ -2206,7 +2225,7 @@ declare namespace chrome.declarativeContent {
2206
2225
  }
2207
2226
 
2208
2227
  /** Provides the Declarative Event API consisting of addRules, removeRules, and getRules. */
2209
- export interface PageChangedEvent extends chrome.events.Event<() => void> { }
2228
+ export interface PageChangedEvent extends chrome.events.Event<() => void> {}
2210
2229
 
2211
2230
  export var onPageChanged: PageChangedEvent;
2212
2231
  }
@@ -2253,7 +2272,7 @@ declare namespace chrome.declarativeWebRequest {
2253
2272
  lowerPriorityThan: number;
2254
2273
  }
2255
2274
 
2256
- export interface RedirectToEmptyDocument { }
2275
+ export interface RedirectToEmptyDocument {}
2257
2276
 
2258
2277
  export interface RedirectRequest {
2259
2278
  redirectUrl: string;
@@ -2279,7 +2298,7 @@ declare namespace chrome.declarativeWebRequest {
2279
2298
  modification: ResponseCookie;
2280
2299
  }
2281
2300
 
2282
- export interface CancelRequest { }
2301
+ export interface CancelRequest {}
2283
2302
 
2284
2303
  export interface RemoveRequestHeader {
2285
2304
  name: string;
@@ -2305,7 +2324,7 @@ declare namespace chrome.declarativeWebRequest {
2305
2324
  from: string;
2306
2325
  }
2307
2326
 
2308
- export interface RedirectToTransparentImage { }
2327
+ export interface RedirectToTransparentImage {}
2309
2328
 
2310
2329
  export interface AddRequestCookie {
2311
2330
  cookie: RequestCookie;
@@ -2315,7 +2334,7 @@ declare namespace chrome.declarativeWebRequest {
2315
2334
  filter: RequestCookie;
2316
2335
  }
2317
2336
 
2318
- export interface RequestedEvent extends chrome.events.Event<Function> { }
2337
+ export interface RequestedEvent extends chrome.events.Event<Function> {}
2319
2338
 
2320
2339
  export var onRequest: RequestedEvent;
2321
2340
  }
@@ -2339,7 +2358,10 @@ declare namespace chrome.desktopCapture {
2339
2358
  * @param sources Set of sources that should be shown to the user.
2340
2359
  * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
2341
2360
  */
2342
- export function chooseDesktopMedia(sources: string[], callback: (streamId: string, options: StreamOptions) => void): number;
2361
+ export function chooseDesktopMedia(
2362
+ sources: string[],
2363
+ callback: (streamId: string, options: StreamOptions) => void,
2364
+ ): number;
2343
2365
  /**
2344
2366
  * Shows desktop media picker UI with the specified set of sources.
2345
2367
  * @param sources Set of sources that should be shown to the user.
@@ -2368,36 +2390,36 @@ declare namespace chrome.desktopCapture {
2368
2390
  declare namespace chrome.devtools.inspectedWindow {
2369
2391
  /** A resource within the inspected page, such as a document, a script, or an image. */
2370
2392
  export interface Resource {
2371
- /** The URL of the resource. */
2372
- url: string;
2373
- /**
2374
- * Gets the content of the resource.
2375
- * @param callback A function that receives resource content when the request completes.
2376
- */
2377
- getContent(
2378
- callback: (
2379
- /** Content of the resource (potentially encoded) */
2380
- content: string,
2381
- /** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
2382
- encoding: string
2383
- ) => void
2384
- ): void;
2385
- /**
2386
- * Sets the content of the resource.
2387
- * @param content New content of the resource. Only resources with the text type are currently supported.
2388
- * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
2389
- * @param callback A function called upon request completion.
2390
- */
2391
- setContent(
2392
- content: string,
2393
- commit: boolean,
2394
- callback?: (
2395
- /**
2396
- * Set to undefined if the resource content was set successfully; describes error otherwise.
2397
- */
2398
- error?: Object
2399
- ) => void
2400
- ): void;
2393
+ /** The URL of the resource. */
2394
+ url: string;
2395
+ /**
2396
+ * Gets the content of the resource.
2397
+ * @param callback A function that receives resource content when the request completes.
2398
+ */
2399
+ getContent(
2400
+ callback: (
2401
+ /** Content of the resource (potentially encoded) */
2402
+ content: string,
2403
+ /** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
2404
+ encoding: string,
2405
+ ) => void,
2406
+ ): void;
2407
+ /**
2408
+ * Sets the content of the resource.
2409
+ * @param content New content of the resource. Only resources with the text type are currently supported.
2410
+ * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
2411
+ * @param callback A function called upon request completion.
2412
+ */
2413
+ setContent(
2414
+ content: string,
2415
+ commit: boolean,
2416
+ callback?: (
2417
+ /**
2418
+ * Set to undefined if the resource content was set successfully; describes error otherwise.
2419
+ */
2420
+ error?: Object,
2421
+ ) => void,
2422
+ ): void;
2401
2423
  }
2402
2424
 
2403
2425
  export interface ReloadOptions {
@@ -2430,10 +2452,11 @@ declare namespace chrome.devtools.inspectedWindow {
2430
2452
  value: string;
2431
2453
  }
2432
2454
 
2433
- export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> { }
2455
+ export interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> {}
2434
2456
 
2435
2457
  export interface ResourceContentCommittedEvent
2436
- extends chrome.events.Event<(resource: Resource, content: string) => void> { }
2458
+ extends chrome.events.Event<(resource: Resource, content: string) => void>
2459
+ {}
2437
2460
 
2438
2461
  /** The ID of the tab being inspected. This ID may be used with chrome.tabs.* API. */
2439
2462
  export var tabId: number;
@@ -2494,28 +2517,28 @@ declare namespace chrome.devtools.inspectedWindow {
2494
2517
  */
2495
2518
  declare namespace chrome.devtools.network {
2496
2519
  /** Represents a HAR entry for a specific finished request. */
2497
- export interface HAREntry extends HARFormatEntry { }
2520
+ export interface HAREntry extends HARFormatEntry {}
2498
2521
  /** Represents a HAR log that contains all known network requests. */
2499
- export interface HARLog extends HARFormatLog { }
2522
+ export interface HARLog extends HARFormatLog {}
2500
2523
  /** Represents a network request for a document resource (script, image and so on). See HAR Specification for reference. */
2501
2524
  export interface Request extends chrome.devtools.network.HAREntry {
2502
- /**
2503
- * Returns content of the response body.
2504
- * @param callback A function that receives the response body when the request completes.
2505
- */
2506
- getContent(
2507
- callback: (
2508
- /** Content of the response body (potentially encoded) */
2509
- content: string,
2510
- /** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported */
2511
- encoding: string
2512
- ) => void
2513
- ): void;
2525
+ /**
2526
+ * Returns content of the response body.
2527
+ * @param callback A function that receives the response body when the request completes.
2528
+ */
2529
+ getContent(
2530
+ callback: (
2531
+ /** Content of the response body (potentially encoded) */
2532
+ content: string,
2533
+ /** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported */
2534
+ encoding: string,
2535
+ ) => void,
2536
+ ): void;
2514
2537
  }
2515
2538
 
2516
- export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> { }
2539
+ export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> {}
2517
2540
 
2518
- export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> { }
2541
+ export interface NavigatedEvent extends chrome.events.Event<(url: string) => void> {}
2519
2542
 
2520
2543
  /**
2521
2544
  * Returns HAR log that contains all known network requests.
@@ -2538,11 +2561,11 @@ declare namespace chrome.devtools.network {
2538
2561
  * Availability: Since Chrome 18.
2539
2562
  */
2540
2563
  declare namespace chrome.devtools.panels {
2541
- export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> { }
2564
+ export interface PanelShownEvent extends chrome.events.Event<(window: Window) => void> {}
2542
2565
 
2543
- export interface PanelHiddenEvent extends chrome.events.Event<() => void> { }
2566
+ export interface PanelHiddenEvent extends chrome.events.Event<() => void> {}
2544
2567
 
2545
- export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> { }
2568
+ export interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> {}
2546
2569
 
2547
2570
  /** Represents a panel created by extension. */
2548
2571
  export interface ExtensionPanel {
@@ -2561,7 +2584,7 @@ declare namespace chrome.devtools.panels {
2561
2584
  onSearch: PanelSearchEvent;
2562
2585
  }
2563
2586
 
2564
- export interface ButtonClickedEvent extends chrome.events.Event<() => void> { }
2587
+ export interface ButtonClickedEvent extends chrome.events.Event<() => void> {}
2565
2588
 
2566
2589
  /** A button created by the extension. */
2567
2590
  export interface Button {
@@ -2576,24 +2599,24 @@ declare namespace chrome.devtools.panels {
2576
2599
  onClicked: ButtonClickedEvent;
2577
2600
  }
2578
2601
 
2579
- export interface SelectionChangedEvent extends chrome.events.Event<() => void> { }
2602
+ export interface SelectionChangedEvent extends chrome.events.Event<() => void> {}
2580
2603
 
2581
2604
  /** Represents the Elements panel. */
2582
2605
  export interface ElementsPanel {
2583
- /**
2584
- * Creates a pane within panel's sidebar.
2585
- * @param title Text that is displayed in sidebar caption.
2586
- * @param callback A callback invoked when the sidebar is created.
2587
- */
2588
- createSidebarPane(
2589
- title: string,
2590
- callback?: (
2591
- /** An ExtensionSidebarPane object for created sidebar pane */
2592
- result: ExtensionSidebarPane
2593
- ) => void
2594
- ): void;
2595
- /** Fired when an object is selected in the panel. */
2596
- onSelectionChanged: SelectionChangedEvent;
2606
+ /**
2607
+ * Creates a pane within panel's sidebar.
2608
+ * @param title Text that is displayed in sidebar caption.
2609
+ * @param callback A callback invoked when the sidebar is created.
2610
+ */
2611
+ createSidebarPane(
2612
+ title: string,
2613
+ callback?: (
2614
+ /** An ExtensionSidebarPane object for created sidebar pane */
2615
+ result: ExtensionSidebarPane,
2616
+ ) => void,
2617
+ ): void;
2618
+ /** Fired when an object is selected in the panel. */
2619
+ onSelectionChanged: SelectionChangedEvent;
2597
2620
  }
2598
2621
 
2599
2622
  /**
@@ -2610,17 +2633,18 @@ declare namespace chrome.devtools.panels {
2610
2633
  title: string,
2611
2634
  callback?: (
2612
2635
  /** An ExtensionSidebarPane object for created sidebar pane. */
2613
- result: ExtensionSidebarPane
2614
- ) => void
2636
+ result: ExtensionSidebarPane,
2637
+ ) => void,
2615
2638
  ): void;
2616
2639
  /** Fired when an object is selected in the panel. */
2617
2640
  onSelectionChanged: SelectionChangedEvent;
2618
2641
  }
2619
2642
 
2620
2643
  export interface ExtensionSidebarPaneShownEvent
2621
- extends chrome.events.Event<(window: chrome.windows.Window) => void> { }
2644
+ extends chrome.events.Event<(window: chrome.windows.Window) => void>
2645
+ {}
2622
2646
 
2623
- export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> { }
2647
+ export interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> {}
2624
2648
 
2625
2649
  /** A sidebar created by the extension. */
2626
2650
  export interface ExtensionSidebarPane {
@@ -2713,13 +2737,16 @@ declare namespace chrome.devtools.panels {
2713
2737
  * @param callback A function that is called when the resource has been successfully loaded.
2714
2738
  */
2715
2739
  export function openResource(
2716
- url: string, lineNumber: number, columnNumber: number, callback?: (response: unknown) => unknown,
2740
+ url: string,
2741
+ lineNumber: number,
2742
+ columnNumber: number,
2743
+ callback?: (response: unknown) => unknown,
2717
2744
  ): void;
2718
2745
  /**
2719
2746
  * @since Chrome 59.
2720
2747
  * The name of the color theme set in user's DevTools settings.
2721
2748
  */
2722
- export var themeName: 'default' | 'dark';
2749
+ export var themeName: "default" | "dark";
2723
2750
  }
2724
2751
 
2725
2752
  ////////////////////
@@ -2841,7 +2868,36 @@ declare namespace chrome.downloads {
2841
2868
  previous?: string | undefined;
2842
2869
  }
2843
2870
 
2844
- export type DownloadInterruptReason = "FILE_FAILED" | "FILE_ACCESS_DENIED" | "FILE_NO_SPACE" | "FILE_NAME_TOO_LONG" | "FILE_TOO_LARGE" | "FILE_VIRUS_INFECTED" | "FILE_TRANSIENT_ERROR" | "FILE_BLOCKED" | "FILE_SECURITY_CHECK_FAILED" | "FILE_TOO_SHORT" | "FILE_HASH_MISMATCH" | "FILE_SAME_AS_SOURCE" | "NETWORK_FAILED" | "NETWORK_TIMEOUT" | "NETWORK_DISCONNECTED" | "NETWORK_SERVER_DOWN" | "NETWORK_INVALID_REQUEST" | "SERVER_FAILED" | "SERVER_NO_RANGE" | "SERVER_BAD_CONTENT" | "SERVER_UNAUTHORIZED" | "SERVER_CERT_PROBLEM" | "SERVER_FORBIDDEN" | "SERVER_UNREACHABLE" | "SERVER_CONTENT_LENGTH_MISMATCH" | "SERVER_CROSS_ORIGIN_REDIRECT" | "USER_CANCELED" | "USER_SHUTDOWN" | "CRASH";
2871
+ export type DownloadInterruptReason =
2872
+ | "FILE_FAILED"
2873
+ | "FILE_ACCESS_DENIED"
2874
+ | "FILE_NO_SPACE"
2875
+ | "FILE_NAME_TOO_LONG"
2876
+ | "FILE_TOO_LARGE"
2877
+ | "FILE_VIRUS_INFECTED"
2878
+ | "FILE_TRANSIENT_ERROR"
2879
+ | "FILE_BLOCKED"
2880
+ | "FILE_SECURITY_CHECK_FAILED"
2881
+ | "FILE_TOO_SHORT"
2882
+ | "FILE_HASH_MISMATCH"
2883
+ | "FILE_SAME_AS_SOURCE"
2884
+ | "NETWORK_FAILED"
2885
+ | "NETWORK_TIMEOUT"
2886
+ | "NETWORK_DISCONNECTED"
2887
+ | "NETWORK_SERVER_DOWN"
2888
+ | "NETWORK_INVALID_REQUEST"
2889
+ | "SERVER_FAILED"
2890
+ | "SERVER_NO_RANGE"
2891
+ | "SERVER_BAD_CONTENT"
2892
+ | "SERVER_UNAUTHORIZED"
2893
+ | "SERVER_CERT_PROBLEM"
2894
+ | "SERVER_FORBIDDEN"
2895
+ | "SERVER_UNREACHABLE"
2896
+ | "SERVER_CONTENT_LENGTH_MISMATCH"
2897
+ | "SERVER_CROSS_ORIGIN_REDIRECT"
2898
+ | "USER_CANCELED"
2899
+ | "USER_SHUTDOWN"
2900
+ | "CRASH";
2845
2901
 
2846
2902
  export type DownloadState = "in_progress" | "interrupted" | "complete";
2847
2903
 
@@ -2966,16 +3022,17 @@ declare namespace chrome.downloads {
2966
3022
  enabled: boolean;
2967
3023
  }
2968
3024
 
2969
- export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> { }
3025
+ export interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> {}
2970
3026
 
2971
- export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> { }
3027
+ export interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> {}
2972
3028
 
2973
- export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> { }
3029
+ export interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> {}
2974
3030
 
2975
- export interface DownloadDeterminingFilenameEvent
2976
- extends chrome.events.Event<
3031
+ export interface DownloadDeterminingFilenameEvent extends
3032
+ chrome.events.Event<
2977
3033
  (downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void
2978
- > { }
3034
+ >
3035
+ {}
2979
3036
 
2980
3037
  /**
2981
3038
  * Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.
@@ -3376,8 +3433,8 @@ declare namespace chrome.events {
3376
3433
  getRules(
3377
3434
  callback: (
3378
3435
  /** Rules that were registered, the optional parameters are filled with values */
3379
- rules: Rule[]
3380
- ) => void
3436
+ rules: Rule[],
3437
+ ) => void,
3381
3438
  ): void;
3382
3439
  /**
3383
3440
  * Returns currently registered rules.
@@ -3388,8 +3445,8 @@ declare namespace chrome.events {
3388
3445
  ruleIdentifiers: string[],
3389
3446
  callback: (
3390
3447
  /** Rules that were registered, the optional parameters are filled with values */
3391
- rules: Rule[]
3392
- ) => void
3448
+ rules: Rule[],
3449
+ ) => void,
3393
3450
  ): void;
3394
3451
  /**
3395
3452
  * @param callback Listener whose registration status shall be tested.
@@ -3415,8 +3472,8 @@ declare namespace chrome.events {
3415
3472
  rules: Rule[],
3416
3473
  callback?: (
3417
3474
  /** Rules that were registered, the optional parameters are filled with values */
3418
- rules: Rule[]
3419
- ) => void
3475
+ rules: Rule[],
3476
+ ) => void,
3420
3477
  ): void;
3421
3478
  /**
3422
3479
  * Deregisters an event listener callback from an event.
@@ -3483,11 +3540,12 @@ declare namespace chrome.extension {
3483
3540
  message: string;
3484
3541
  }
3485
3542
 
3486
- export interface OnRequestEvent
3487
- extends chrome.events.Event<
3543
+ export interface OnRequestEvent extends
3544
+ chrome.events.Event<
3488
3545
  | ((request: any, sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)
3489
3546
  | ((sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)
3490
- > { }
3547
+ >
3548
+ {}
3491
3549
 
3492
3550
  /**
3493
3551
  * Since Chrome 7.
@@ -3543,7 +3601,11 @@ declare namespace chrome.extension {
3543
3601
  * function(any response) {...};
3544
3602
  * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
3545
3603
  */
3546
- export function sendRequest<Request = any, Response = any>(extensionId: string, request: Request, responseCallback?: (response: Response) => void): void;
3604
+ export function sendRequest<Request = any, Response = any>(
3605
+ extensionId: string,
3606
+ request: Request,
3607
+ responseCallback?: (response: Response) => void,
3608
+ ): void;
3547
3609
  /**
3548
3610
  * Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
3549
3611
  * @deprecated Deprecated since Chrome 33. Please use runtime.sendMessage.
@@ -3551,7 +3613,10 @@ declare namespace chrome.extension {
3551
3613
  * function(any response) {...};
3552
3614
  * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
3553
3615
  */
3554
- export function sendRequest<Request = any, Response = any>(request: Request, responseCallback?: (response: Response) => void): void;
3616
+ export function sendRequest<Request = any, Response = any>(
3617
+ request: Request,
3618
+ responseCallback?: (response: Response) => void,
3619
+ ): void;
3555
3620
  /**
3556
3621
  * Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.
3557
3622
  * @deprecated Deprecated since Chrome 33. Please use extension.getViews {type: "tab"}.
@@ -3607,7 +3672,8 @@ declare namespace chrome.fileBrowserHandler {
3607
3672
  }
3608
3673
 
3609
3674
  export interface FileBrowserHandlerExecuteEvent
3610
- extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void> { }
3675
+ extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void>
3676
+ {}
3611
3677
 
3612
3678
  /**
3613
3679
  * Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture.
@@ -3873,139 +3939,155 @@ declare namespace chrome.fileSystemProvider {
3873
3939
  operationRequestId: number;
3874
3940
  }
3875
3941
 
3876
- export interface RequestedEvent
3877
- extends chrome.events.Event<
3942
+ export interface RequestedEvent extends
3943
+ chrome.events.Event<
3878
3944
  (options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void
3879
- > { }
3945
+ >
3946
+ {}
3880
3947
 
3881
- export interface MetadataRequestedEvent
3882
- extends chrome.events.Event<
3948
+ export interface MetadataRequestedEvent extends
3949
+ chrome.events.Event<
3883
3950
  (
3884
3951
  options: MetadataRequestedEventOptions,
3885
3952
  successCallback: (metadata: EntryMetadata) => void,
3886
3953
  errorCallback: (error: string) => void,
3887
3954
  ) => void
3888
- > { }
3955
+ >
3956
+ {}
3889
3957
 
3890
- export interface DirectoryPathRequestedEvent
3891
- extends chrome.events.Event<
3958
+ export interface DirectoryPathRequestedEvent extends
3959
+ chrome.events.Event<
3892
3960
  (
3893
3961
  options: DirectoryPathRequestedEventOptions,
3894
3962
  successCallback: (entries: EntryMetadata[], hasMore: boolean) => void,
3895
3963
  errorCallback: (error: string) => void,
3896
3964
  ) => void
3897
- > { }
3965
+ >
3966
+ {}
3898
3967
 
3899
- export interface OpenFileRequestedEvent
3900
- extends chrome.events.Event<
3968
+ export interface OpenFileRequestedEvent extends
3969
+ chrome.events.Event<
3901
3970
  (
3902
3971
  options: OpenFileRequestedEventOptions,
3903
3972
  successCallback: Function,
3904
3973
  errorCallback: (error: string) => void,
3905
3974
  ) => void
3906
- > { }
3975
+ >
3976
+ {}
3907
3977
 
3908
- export interface OpenedFileRequestedEvent
3909
- extends chrome.events.Event<
3978
+ export interface OpenedFileRequestedEvent extends
3979
+ chrome.events.Event<
3910
3980
  (
3911
3981
  options: OpenedFileRequestedEventOptions,
3912
3982
  successCallback: Function,
3913
3983
  errorCallback: (error: string) => void,
3914
3984
  ) => void
3915
- > { }
3985
+ >
3986
+ {}
3916
3987
 
3917
- export interface OpenedFileOffsetRequestedEvent
3918
- extends chrome.events.Event<
3988
+ export interface OpenedFileOffsetRequestedEvent extends
3989
+ chrome.events.Event<
3919
3990
  (
3920
3991
  options: OpenedFileOffsetRequestedEventOptions,
3921
3992
  successCallback: (data: ArrayBuffer, hasMore: boolean) => void,
3922
3993
  errorCallback: (error: string) => void,
3923
3994
  ) => void
3924
- > { }
3995
+ >
3996
+ {}
3925
3997
 
3926
- export interface DirectoryPathRecursiveRequestedEvent
3927
- extends chrome.events.Event<
3998
+ export interface DirectoryPathRecursiveRequestedEvent extends
3999
+ chrome.events.Event<
3928
4000
  (
3929
4001
  options: DirectoryPathRecursiveRequestedEventOptions,
3930
4002
  successCallback: Function,
3931
4003
  errorCallback: (error: string) => void,
3932
4004
  ) => void
3933
- > { }
4005
+ >
4006
+ {}
3934
4007
 
3935
- export interface EntryPathRecursiveRequestedEvent
3936
- extends chrome.events.Event<
4008
+ export interface EntryPathRecursiveRequestedEvent extends
4009
+ chrome.events.Event<
3937
4010
  (
3938
4011
  options: EntryPathRecursiveRequestedEventOptions,
3939
4012
  successCallback: Function,
3940
4013
  errorCallback: (error: string) => void,
3941
4014
  ) => void
3942
- > { }
4015
+ >
4016
+ {}
3943
4017
 
3944
- export interface FilePathRequestedEvent
3945
- extends chrome.events.Event<
4018
+ export interface FilePathRequestedEvent extends
4019
+ chrome.events.Event<
3946
4020
  (
3947
4021
  options: FilePathRequestedEventOptions,
3948
4022
  successCallback: Function,
3949
4023
  errorCallback: (error: string) => void,
3950
4024
  ) => void
3951
- > { }
4025
+ >
4026
+ {}
3952
4027
 
3953
- export interface SourceTargetPathRequestedEvent
3954
- extends chrome.events.Event<
4028
+ export interface SourceTargetPathRequestedEvent extends
4029
+ chrome.events.Event<
3955
4030
  (
3956
4031
  options: SourceTargetPathRequestedEventOptions,
3957
4032
  successCallback: Function,
3958
4033
  errorCallback: (error: string) => void,
3959
4034
  ) => void
3960
- > { }
4035
+ >
4036
+ {}
3961
4037
 
3962
- export interface FilePathLengthRequestedEvent
3963
- extends chrome.events.Event<
4038
+ export interface FilePathLengthRequestedEvent extends
4039
+ chrome.events.Event<
3964
4040
  (
3965
4041
  options: FilePathLengthRequestedEventOptions,
3966
4042
  successCallback: Function,
3967
4043
  errorCallback: (error: string) => void,
3968
4044
  ) => void
3969
- > { }
4045
+ >
4046
+ {}
3970
4047
 
3971
- export interface OpenedFileIoRequestedEvent
3972
- extends chrome.events.Event<
4048
+ export interface OpenedFileIoRequestedEvent extends
4049
+ chrome.events.Event<
3973
4050
  (
3974
4051
  options: OpenedFileIoRequestedEventOptions,
3975
4052
  successCallback: Function,
3976
4053
  errorCallback: (error: string) => void,
3977
4054
  ) => void
3978
- > { }
4055
+ >
4056
+ {}
3979
4057
 
3980
- export interface OperationRequestedEvent
3981
- extends chrome.events.Event<
4058
+ export interface OperationRequestedEvent extends
4059
+ chrome.events.Event<
3982
4060
  (
3983
4061
  options: OperationRequestedEventOptions,
3984
4062
  successCallback: Function,
3985
4063
  errorCallback: (error: string) => void,
3986
4064
  ) => void
3987
- > { }
4065
+ >
4066
+ {}
3988
4067
 
3989
4068
  export interface OptionlessRequestedEvent
3990
- extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> { }
4069
+ extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void>
4070
+ {}
3991
4071
 
3992
- export interface GetActionsRequested
3993
- extends chrome.events.Event<
4072
+ export interface GetActionsRequested extends
4073
+ chrome.events.Event<
3994
4074
  (
3995
4075
  options: GetActionsRequestedOptions,
3996
4076
  successCallback: (actions: Action[]) => void,
3997
4077
  errorCallback: (error: string) => void,
3998
4078
  ) => void
3999
- > {}
4079
+ >
4080
+ {}
4000
4081
 
4001
- export interface ExecuteActionRequested
4002
- extends chrome.events.Event<
4082
+ export interface ExecuteActionRequested extends
4083
+ chrome.events.Event<
4003
4084
  (
4004
4085
  options: ExecuteActionRequestedOptions,
4005
4086
  successCallback: () => void,
4006
4087
  errorCallback: (error: string) => void,
4007
4088
  ) => void
4008
- > {}
4089
+ >
4090
+ {}
4009
4091
 
4010
4092
  /**
4011
4093
  * Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of Files.app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive but doesn't have to be unique. The fileSystemId must not be an empty string.
@@ -4134,12 +4216,12 @@ declare namespace chrome.fontSettings {
4134
4216
  export interface FontDetails {
4135
4217
  /** The generic font family for the font. */
4136
4218
  genericFamily:
4137
- | 'cursive'
4138
- | 'fantasy'
4139
- | 'fixed'
4140
- | 'sansserif'
4141
- | 'serif'
4142
- | 'standard';
4219
+ | "cursive"
4220
+ | "fantasy"
4221
+ | "fixed"
4222
+ | "sansserif"
4223
+ | "serif"
4224
+ | "standard";
4143
4225
  /** Optional. The script for the font. If omitted, the global script font setting is affected. */
4144
4226
  script?: string | undefined;
4145
4227
  }
@@ -4179,19 +4261,19 @@ declare namespace chrome.fontSettings {
4179
4261
  fontId: string;
4180
4262
  }
4181
4263
 
4182
- export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { }
4264
+ export interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
4183
4265
 
4184
- export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { }
4266
+ export interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
4185
4267
 
4186
- export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> { }
4268
+ export interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
4187
4269
 
4188
- export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> { }
4270
+ export interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> {}
4189
4271
 
4190
4272
  /**
4191
4273
  * Sets the default font size.
4192
4274
  * @return The `setDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
4193
4275
  */
4194
- export function setDefaultFontSize(details: DefaultFontSizeDetails): Promise<void>
4276
+ export function setDefaultFontSize(details: DefaultFontSizeDetails): Promise<void>;
4195
4277
  /**
4196
4278
  * Sets the default font size.
4197
4279
  */
@@ -4200,7 +4282,7 @@ declare namespace chrome.fontSettings {
4200
4282
  * Gets the font for a given script and generic font family.
4201
4283
  * @return The `getFont` method provides its result via callback or returned as a `Promise` (MV3 only).
4202
4284
  */
4203
- export function getFont(details: FontDetails): Promise<FontDetailsResult>
4285
+ export function getFont(details: FontDetails): Promise<FontDetailsResult>;
4204
4286
  /**
4205
4287
  * Gets the font for a given script and generic font family.
4206
4288
  */
@@ -4377,11 +4459,11 @@ declare namespace chrome.gcm {
4377
4459
  detail: Object;
4378
4460
  }
4379
4461
 
4380
- export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> { }
4462
+ export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {}
4381
4463
 
4382
- export interface MessageDeletionEvent extends chrome.events.Event<() => void> { }
4464
+ export interface MessageDeletionEvent extends chrome.events.Event<() => void> {}
4383
4465
 
4384
- export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> { }
4466
+ export interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> {}
4385
4467
 
4386
4468
  /** The maximum size (in bytes) of all key/value pairs in a message. */
4387
4469
  export var MAX_MESSAGE_SIZE: number;
@@ -4483,9 +4565,9 @@ declare namespace chrome.history {
4483
4565
  urls?: string[] | undefined;
4484
4566
  }
4485
4567
 
4486
- export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> { }
4568
+ export interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> {}
4487
4569
 
4488
- export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> { }
4570
+ export interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> {}
4489
4571
 
4490
4572
  /**
4491
4573
  * Searches the history for the last visit time of each page matching the query.
@@ -4628,8 +4710,8 @@ declare namespace chrome.identity {
4628
4710
 
4629
4711
  /** @since Chrome 84. */
4630
4712
  export enum AccountStatus {
4631
- SYNC = 'SYNC',
4632
- ANY = 'ANY',
4713
+ SYNC = "SYNC",
4714
+ ANY = "ANY",
4633
4715
  }
4634
4716
 
4635
4717
  export interface ProfileDetails {
@@ -4686,19 +4768,19 @@ declare namespace chrome.identity {
4686
4768
  interactive?: boolean | undefined;
4687
4769
  }
4688
4770
 
4689
- export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> { }
4771
+ export interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> {}
4690
4772
 
4691
4773
  export interface GetAuthTokenResult {
4692
4774
  /**
4693
4775
  * Optional.
4694
4776
  * A list of OAuth2 scopes granted to the extension.
4695
4777
  */
4696
- grantedScopes?: string[]
4778
+ grantedScopes?: string[];
4697
4779
  /**
4698
4780
  * Optional.
4699
4781
  * The specific token associated with the request.
4700
4782
  */
4701
- token?: string
4783
+ token?: string;
4702
4784
  }
4703
4785
 
4704
4786
  /**
@@ -4731,7 +4813,10 @@ declare namespace chrome.identity {
4731
4813
  * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error.
4732
4814
  */
4733
4815
  export function getAuthToken(details: TokenDetails): Promise<GetAuthTokenResult>;
4734
- export function getAuthToken(details: TokenDetails, callback: (token?: string, grantedScopes?: string[]) => void): void;
4816
+ export function getAuthToken(
4817
+ details: TokenDetails,
4818
+ callback: (token?: string, grantedScopes?: string[]) => void,
4819
+ ): void;
4735
4820
 
4736
4821
  /**
4737
4822
  * Retrieves email address and obfuscated gaia id of the user signed into a profile.
@@ -4790,8 +4875,8 @@ declare namespace chrome.identity {
4790
4875
  * @since Chrome 6.
4791
4876
  */
4792
4877
  declare namespace chrome.idle {
4793
- export type IdleState = 'active' | 'idle' | 'locked';
4794
- export interface IdleStateChangedEvent extends chrome.events.Event<(newState: IdleState) => void> { }
4878
+ export type IdleState = "active" | "idle" | "locked";
4879
+ export interface IdleStateChangedEvent extends chrome.events.Event<(newState: IdleState) => void> {}
4795
4880
 
4796
4881
  /**
4797
4882
  * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
@@ -4884,10 +4969,10 @@ declare namespace chrome.input.ime {
4884
4969
  }
4885
4970
 
4886
4971
  /**
4887
- * The auto-capitalize type of the text field.
4888
- * @since Chrome 69.
4889
- */
4890
- export type AutoCapitalizeType = 'characters' | 'words' | 'sentences';
4972
+ * The auto-capitalize type of the text field.
4973
+ * @since Chrome 69.
4974
+ */
4975
+ export type AutoCapitalizeType = "characters" | "words" | "sentences";
4891
4976
  /** Describes an input Context */
4892
4977
  export interface InputContext {
4893
4978
  /** This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called. */
@@ -5025,10 +5110,10 @@ declare namespace chrome.input.ime {
5025
5110
  }
5026
5111
 
5027
5112
  /** Type of the assistive window. */
5028
- export type AssistiveWindowType = 'undo';
5113
+ export type AssistiveWindowType = "undo";
5029
5114
 
5030
5115
  /** ID of a button in an assistive window. */
5031
- export type AssistiveWindowButton = 'undo' | 'addToDictionary';
5116
+ export type AssistiveWindowButton = "undo" | "addToDictionary";
5032
5117
 
5033
5118
  /** Properties of an assistive window. */
5034
5119
  export interface AssistiveWindowProperties {
@@ -5140,30 +5225,35 @@ declare namespace chrome.input.ime {
5140
5225
  windowType: AssistiveWindowType;
5141
5226
  }
5142
5227
 
5143
- export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> { }
5228
+ export interface BlurEvent extends chrome.events.Event<(contextID: number) => void> {}
5144
5229
 
5145
5230
  export interface AssistiveWindowButtonClickedEvent
5146
- extends chrome.events.Event<(details: AssistiveWindowButtonClickedDetails) => void> { }
5231
+ extends chrome.events.Event<(details: AssistiveWindowButtonClickedDetails) => void>
5232
+ {}
5147
5233
 
5148
5234
  export interface CandidateClickedEvent
5149
- extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void> { }
5235
+ extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void>
5236
+ {}
5150
5237
 
5151
- export interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent, requestId: string) => void> { }
5238
+ export interface KeyEventEvent
5239
+ extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent, requestId: string) => void>
5240
+ {}
5152
5241
 
5153
- export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> { }
5242
+ export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> {}
5154
5243
 
5155
- export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> { }
5244
+ export interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> {}
5156
5245
 
5157
- export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> { }
5246
+ export interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> {}
5158
5247
 
5159
- export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> { }
5248
+ export interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> {}
5160
5249
 
5161
- export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> { }
5250
+ export interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> {}
5162
5251
 
5163
5252
  export interface SurroundingTextChangedEvent
5164
- extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void> { }
5253
+ extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void>
5254
+ {}
5165
5255
 
5166
- export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> { }
5256
+ export interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> {}
5167
5257
 
5168
5258
  /**
5169
5259
  * Adds the provided menu items to the language menu when this IME is active.
@@ -5304,13 +5394,13 @@ declare namespace chrome.input.ime {
5304
5394
  * Important: This API works only on Chrome OS.
5305
5395
  */
5306
5396
  declare namespace chrome.loginState {
5307
- export interface SessionStateChangedEvent extends chrome.events.Event<(sessionState: SessionState) => void> { }
5397
+ export interface SessionStateChangedEvent extends chrome.events.Event<(sessionState: SessionState) => void> {}
5308
5398
 
5309
5399
  /** Possible profile types. */
5310
- export type ProfileType = 'SIGNIN_PROFILE' | 'USER_PROFILE';
5400
+ export type ProfileType = "SIGNIN_PROFILE" | "USER_PROFILE";
5311
5401
 
5312
5402
  /** Possible session states. */
5313
- export type SessionState = 'UNKNOWN' | 'IN_OOBE_SCREEN' | 'IN_LOGIN_SCREEN' | 'IN_SESSION' | 'IN_LOCK_SCREEN';
5403
+ export type SessionState = "UNKNOWN" | "IN_OOBE_SCREEN" | "IN_LOGIN_SCREEN" | "IN_SESSION" | "IN_LOCK_SCREEN";
5314
5404
 
5315
5405
  /** Gets the type of the profile the extension is in. */
5316
5406
  export function getProfileType(callback: (profileType: ProfileType) => void): void;
@@ -5443,13 +5533,13 @@ declare namespace chrome.management {
5443
5533
  showConfirmDialog?: boolean | undefined;
5444
5534
  }
5445
5535
 
5446
- export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { }
5536
+ export interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
5447
5537
 
5448
- export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> { }
5538
+ export interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> {}
5449
5539
 
5450
- export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { }
5540
+ export interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
5451
5541
 
5452
- export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> { }
5542
+ export interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
5453
5543
 
5454
5544
  /**
5455
5545
  * Enables or disables an app or extension.
@@ -5670,7 +5760,7 @@ declare namespace chrome.networking.config {
5670
5760
  Security?: string | undefined;
5671
5761
  }
5672
5762
 
5673
- export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> { }
5763
+ export interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> {}
5674
5764
 
5675
5765
  /**
5676
5766
  * Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list.
@@ -5718,91 +5808,96 @@ declare namespace chrome.notifications {
5718
5808
  message: string;
5719
5809
  }
5720
5810
 
5721
- export type NotificationOptions<T extends boolean = false> = {
5722
- /**
5723
- * Optional.
5724
- * Alternate notification content with a lower-weight font.
5725
- * @since Chrome 31.
5726
- */
5727
- contextMessage?: string | undefined;
5728
- /** Optional. Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero is default. */
5729
- priority?: number | undefined;
5730
- /** Optional. A timestamp associated with the notification, in milliseconds past the epoch (e.g. Date.now() + n). */
5731
- eventTime?: number | undefined;
5732
- /** Optional. Text and icons for up to two notification action buttons. */
5733
- buttons?: ButtonOptions[] | undefined;
5734
- /** Optional. Items for multi-item notifications. */
5735
- items?: ItemOptions[] | undefined;
5736
- /**
5737
- * Optional.
5738
- * Current progress ranges from 0 to 100.
5739
- * @since Chrome 30.
5740
- */
5741
- progress?: number | undefined;
5742
- /**
5743
- * Optional.
5744
- * Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
5745
- * @since Chrome 32.
5746
- */
5747
- isClickable?: boolean | undefined;
5748
- /**
5749
- * Optional.
5750
- * A URL to the app icon mask. URLs have the same restrictions as iconUrl. The app icon mask should be in alpha channel, as only the alpha channel of the image will be considered.
5751
- * @since Chrome 38.
5752
- */
5753
- appIconMaskUrl?: string | undefined;
5754
- /** Optional. A URL to the image thumbnail for image-type notifications. URLs have the same restrictions as iconUrl. */
5755
- imageUrl?: string | undefined;
5756
- /**
5757
- * Indicates that the notification should remain visible on screen until the user activates or dismisses the notification.
5758
- * This defaults to false.
5759
- * @since Chrome 50
5760
- */
5761
- requireInteraction?: boolean | undefined;
5762
- /**
5763
- * Optional.
5764
- * Indicates that no sounds or vibrations should be made when the notification is being shown. This defaults to false.
5765
- * @since Chrome 70
5766
- */
5767
- silent?: boolean | undefined;
5768
- } & (T extends true ? {
5769
- /**
5770
- * A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
5771
- * URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file. Required for notifications.create method.
5772
- */
5773
- iconUrl: string;
5774
- /** Main notification content. Required for notifications.create method. */
5775
- message: string;
5776
- /** Which type of notification to display. Required for notifications.create method. */
5777
- type: TemplateType;
5778
- /** Title of the notification (e.g. sender name for email). Required for notifications.create method. */
5779
- title: string;
5780
- } : {
5781
- /**
5782
- * Optional.
5783
- * A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
5784
- * URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file. Required for notifications.create method.
5785
- */
5786
- iconUrl?: string | undefined;
5787
- /** Optional. Main notification content. Required for notifications.create method. */
5788
- message?: string | undefined;
5789
- /** Optional. Which type of notification to display. Required for notifications.create method. */
5790
- type?: TemplateType | undefined;
5791
- /** Optional. Title of the notification (e.g. sender name for email). Required for notifications.create method. */
5792
- title?: string | undefined;
5793
- })
5811
+ export type NotificationOptions<T extends boolean = false> =
5812
+ & {
5813
+ /**
5814
+ * Optional.
5815
+ * Alternate notification content with a lower-weight font.
5816
+ * @since Chrome 31.
5817
+ */
5818
+ contextMessage?: string | undefined;
5819
+ /** Optional. Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero is default. */
5820
+ priority?: number | undefined;
5821
+ /** Optional. A timestamp associated with the notification, in milliseconds past the epoch (e.g. Date.now() + n). */
5822
+ eventTime?: number | undefined;
5823
+ /** Optional. Text and icons for up to two notification action buttons. */
5824
+ buttons?: ButtonOptions[] | undefined;
5825
+ /** Optional. Items for multi-item notifications. */
5826
+ items?: ItemOptions[] | undefined;
5827
+ /**
5828
+ * Optional.
5829
+ * Current progress ranges from 0 to 100.
5830
+ * @since Chrome 30.
5831
+ */
5832
+ progress?: number | undefined;
5833
+ /**
5834
+ * Optional.
5835
+ * Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
5836
+ * @since Chrome 32.
5837
+ */
5838
+ isClickable?: boolean | undefined;
5839
+ /**
5840
+ * Optional.
5841
+ * A URL to the app icon mask. URLs have the same restrictions as iconUrl. The app icon mask should be in alpha channel, as only the alpha channel of the image will be considered.
5842
+ * @since Chrome 38.
5843
+ */
5844
+ appIconMaskUrl?: string | undefined;
5845
+ /** Optional. A URL to the image thumbnail for image-type notifications. URLs have the same restrictions as iconUrl. */
5846
+ imageUrl?: string | undefined;
5847
+ /**
5848
+ * Indicates that the notification should remain visible on screen until the user activates or dismisses the notification.
5849
+ * This defaults to false.
5850
+ * @since Chrome 50
5851
+ */
5852
+ requireInteraction?: boolean | undefined;
5853
+ /**
5854
+ * Optional.
5855
+ * Indicates that no sounds or vibrations should be made when the notification is being shown. This defaults to false.
5856
+ * @since Chrome 70
5857
+ */
5858
+ silent?: boolean | undefined;
5859
+ }
5860
+ & (T extends true ? {
5861
+ /**
5862
+ * A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
5863
+ * URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file. Required for notifications.create method.
5864
+ */
5865
+ iconUrl: string;
5866
+ /** Main notification content. Required for notifications.create method. */
5867
+ message: string;
5868
+ /** Which type of notification to display. Required for notifications.create method. */
5869
+ type: TemplateType;
5870
+ /** Title of the notification (e.g. sender name for email). Required for notifications.create method. */
5871
+ title: string;
5872
+ }
5873
+ : {
5874
+ /**
5875
+ * Optional.
5876
+ * A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
5877
+ * URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file. Required for notifications.create method.
5878
+ */
5879
+ iconUrl?: string | undefined;
5880
+ /** Optional. Main notification content. Required for notifications.create method. */
5881
+ message?: string | undefined;
5882
+ /** Optional. Which type of notification to display. Required for notifications.create method. */
5883
+ type?: TemplateType | undefined;
5884
+ /** Optional. Title of the notification (e.g. sender name for email). Required for notifications.create method. */
5885
+ title?: string | undefined;
5886
+ });
5794
5887
 
5795
5888
  export interface NotificationClosedEvent
5796
- extends chrome.events.Event<(notificationId: string, byUser: boolean) => void> { }
5889
+ extends chrome.events.Event<(notificationId: string, byUser: boolean) => void>
5890
+ {}
5797
5891
 
5798
- export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> { }
5892
+ export interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> {}
5799
5893
 
5800
5894
  export interface NotificationButtonClickedEvent
5801
- extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void> { }
5895
+ extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void>
5896
+ {}
5802
5897
 
5803
- export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> { }
5898
+ export interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> {}
5804
5899
 
5805
- export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> { }
5900
+ export interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> {}
5806
5901
 
5807
5902
  /** The notification closed, either by the system or by user action. */
5808
5903
  export var onClosed: NotificationClosedEvent;
@@ -5989,19 +6084,21 @@ declare namespace chrome.omnibox {
5989
6084
  }
5990
6085
 
5991
6086
  /** The window disposition for the omnibox query. This is the recommended context to display results. */
5992
- export type OnInputEnteredDisposition = 'currentTab' | 'newForegroundTab' | 'newBackgroundTab';
6087
+ export type OnInputEnteredDisposition = "currentTab" | "newForegroundTab" | "newBackgroundTab";
5993
6088
 
5994
6089
  export interface OmniboxInputEnteredEvent
5995
- extends chrome.events.Event<(text: string, disposition: OnInputEnteredDisposition) => void> { }
6090
+ extends chrome.events.Event<(text: string, disposition: OnInputEnteredDisposition) => void>
6091
+ {}
5996
6092
 
5997
6093
  export interface OmniboxInputChangedEvent
5998
- extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void> { }
6094
+ extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void>
6095
+ {}
5999
6096
 
6000
- export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> { }
6097
+ export interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> {}
6001
6098
 
6002
- export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> { }
6099
+ export interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> {}
6003
6100
 
6004
- export interface OmniboxSuggestionDeletedEvent extends chrome.events.Event<(text: string) => void> { }
6101
+ export interface OmniboxSuggestionDeletedEvent extends chrome.events.Event<(text: string) => void> {}
6005
6102
 
6006
6103
  /**
6007
6104
  * Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.
@@ -6033,7 +6130,7 @@ declare namespace chrome.omnibox {
6033
6130
  * @since Chrome 5.
6034
6131
  */
6035
6132
  declare namespace chrome.pageAction {
6036
- export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { }
6133
+ export interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
6037
6134
 
6038
6135
  export interface TitleDetails {
6039
6136
  /** The id of the tab for which you want to modify the page action. */
@@ -6362,18 +6459,22 @@ declare namespace chrome.printerProvider {
6362
6459
  }
6363
6460
 
6364
6461
  export interface PrinterRequestedEvent
6365
- extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void> { }
6462
+ extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void>
6463
+ {}
6366
6464
 
6367
6465
  export interface PrinterInfoRequestedEvent
6368
- extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void> { }
6466
+ extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void>
6467
+ {}
6369
6468
 
6370
- export interface CapabilityRequestedEvent
6371
- extends chrome.events.Event<
6469
+ export interface CapabilityRequestedEvent extends
6470
+ chrome.events.Event<
6372
6471
  (printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void
6373
- > { }
6472
+ >
6473
+ {}
6374
6474
 
6375
6475
  export interface PrintRequestedEvent
6376
- extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void> { }
6476
+ extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void>
6477
+ {}
6377
6478
 
6378
6479
  /** Event fired when print manager requests printers provided by extensions. */
6379
6480
  export var onGetPrintersRequested: PrinterRequestedEvent;
@@ -6519,7 +6620,7 @@ declare namespace chrome.proxy {
6519
6620
  fatal: boolean;
6520
6621
  }
6521
6622
 
6522
- export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> { }
6623
+ export interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> {}
6523
6624
 
6524
6625
  export var settings: chrome.types.ChromeSetting;
6525
6626
  /** Notifies about proxy errors. */
@@ -6535,7 +6636,7 @@ declare namespace chrome.proxy {
6535
6636
  */
6536
6637
 
6537
6638
  declare namespace chrome.search {
6538
- export type Disposition = 'CURRENT_TAB' | 'NEW_TAB' | 'NEW_WINDOW';
6639
+ export type Disposition = "CURRENT_TAB" | "NEW_TAB" | "NEW_WINDOW";
6539
6640
 
6540
6641
  export interface QueryInfo {
6541
6642
  /** Location where search results should be displayed. CURRENT_TAB is the default. */
@@ -6571,17 +6672,17 @@ declare namespace chrome.search {
6571
6672
  */
6572
6673
  declare namespace chrome.serial {
6573
6674
  export const DataBits: {
6574
- SEVEN: 'seven';
6575
- EIGHT: 'eight';
6675
+ SEVEN: "seven";
6676
+ EIGHT: "eight";
6576
6677
  };
6577
6678
  export const ParityBit: {
6578
- NO: 'no';
6579
- ODD: 'odd';
6580
- EVEN: 'even';
6679
+ NO: "no";
6680
+ ODD: "odd";
6681
+ EVEN: "even";
6581
6682
  };
6582
6683
  export const StopBits: {
6583
- ONE: 'one';
6584
- TWO: 'two';
6684
+ ONE: "one";
6685
+ TWO: "two";
6585
6686
  };
6586
6687
 
6587
6688
  export interface DeviceInfo {
@@ -6784,23 +6885,23 @@ declare namespace chrome.serial.onReceive {
6784
6885
  declare namespace chrome.serial.onReceiveError {
6785
6886
  export const OnReceiveErrorEnum: {
6786
6887
  /* The connection was disconnected. */
6787
- disconnected: 'disconnected';
6888
+ disconnected: "disconnected";
6788
6889
  /* No data has been received for receiveTimeout milliseconds. */
6789
- timeout: 'timeout';
6890
+ timeout: "timeout";
6790
6891
  /* The device was most likely disconnected from the host. */
6791
- device_lost: 'device_lost';
6892
+ device_lost: "device_lost";
6792
6893
  /* The device detected a break condition. */
6793
- break: 'break';
6894
+ break: "break";
6794
6895
  /* The device detected a framing error. */
6795
- frame_error: 'frame_error';
6896
+ frame_error: "frame_error";
6796
6897
  /* A character-buffer overrun has occurred. The next character is lost. */
6797
- overrun: 'overrun';
6898
+ overrun: "overrun";
6798
6899
  /* An input buffer overflow has occurred. There is either no room in the input buffer, or a character was received after the end-of-file (EOF) character. */
6799
- buffer_overflow: 'buffer_overflow';
6900
+ buffer_overflow: "buffer_overflow";
6800
6901
  /* The device detected a parity error. */
6801
- parity_error: 'parity_error';
6902
+ parity_error: "parity_error";
6802
6903
  /* A system error occurred and the connection may be unrecoverable. */
6803
- system_error: 'system_error';
6904
+ system_error: "system_error";
6804
6905
  };
6805
6906
 
6806
6907
  export interface OnReceiveErrorInfo {
@@ -6819,8 +6920,8 @@ declare namespace chrome.serial.onReceiveError {
6819
6920
  export function addListener(callback: (info: OnReceiveErrorInfo) => void): void;
6820
6921
  }
6821
6922
 
6822
- type DocumentLifecycle = 'prerender' | 'active' | 'cached' | 'pending_deletion';
6823
- type FrameType = 'outermost_frame' | 'fenced_frame' | 'sub_frame';
6923
+ type DocumentLifecycle = "prerender" | "active" | "cached" | "pending_deletion";
6924
+ type FrameType = "outermost_frame" | "fenced_frame" | "sub_frame";
6824
6925
 
6825
6926
  ////////////////////
6826
6927
  // Runtime
@@ -6836,17 +6937,17 @@ declare namespace chrome.runtime {
6836
6937
  export var id: string;
6837
6938
 
6838
6939
  /** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformOs */
6839
- export type PlatformOs = 'mac' | 'win' | 'android' | 'cros' | 'linux' | 'openbsd';
6940
+ export type PlatformOs = "mac" | "win" | "android" | "cros" | "linux" | "openbsd";
6840
6941
  /** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformArch */
6841
- export type PlatformArch = 'arm' | 'arm64' | 'x86-32' | 'x86-64' | 'mips' | 'mips64';
6942
+ export type PlatformArch = "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64";
6842
6943
  /** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformNaclArch */
6843
- export type PlatformNaclArch = 'arm' | 'x86-32' | 'x86-64' | 'mips' | 'mips64';
6944
+ export type PlatformNaclArch = "arm" | "x86-32" | "x86-64" | "mips" | "mips64";
6844
6945
  /** https://developer.chrome.com/docs/extensions/reference/runtime/#type-OnInstalledReason */
6845
6946
  export enum OnInstalledReason {
6846
- INSTALL = 'install',
6847
- UPDATE = 'update',
6848
- CHROME_UPDATE = 'chrome_update',
6849
- SHARED_MODULE_UPDATE = 'shared_module_update'
6947
+ INSTALL = "install",
6948
+ UPDATE = "update",
6949
+ CHROME_UPDATE = "chrome_update",
6950
+ SHARED_MODULE_UPDATE = "shared_module_update",
6850
6951
  }
6851
6952
 
6852
6953
  export interface LastError {
@@ -6976,35 +7077,37 @@ declare namespace chrome.runtime {
6976
7077
  }
6977
7078
 
6978
7079
  /** Result of the update check. */
6979
- export type RequestUpdateCheckStatus = 'throttled' | 'no_update' | 'update_available';
7080
+ export type RequestUpdateCheckStatus = "throttled" | "no_update" | "update_available";
6980
7081
 
6981
7082
  /** Result of the update check. */
6982
7083
  export interface RequestUpdateCheckResult {
6983
- /** The status of the update check. */
6984
- status: RequestUpdateCheckStatus;
6985
- /** The version of the available update. */
6986
- version: string;
7084
+ /** The status of the update check. */
7085
+ status: RequestUpdateCheckStatus;
7086
+ /** The version of the available update. */
7087
+ version: string;
6987
7088
  }
6988
7089
 
6989
- export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> { }
7090
+ export interface PortDisconnectEvent extends chrome.events.Event<(port: Port) => void> {}
6990
7091
 
6991
- export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> { }
7092
+ export interface PortMessageEvent extends chrome.events.Event<(message: any, port: Port) => void> {}
6992
7093
 
6993
- export interface ExtensionMessageEvent
6994
- extends chrome.events.Event<
7094
+ export interface ExtensionMessageEvent extends
7095
+ chrome.events.Event<
6995
7096
  (message: any, sender: MessageSender, sendResponse: (response?: any) => void) => void
6996
- > { }
7097
+ >
7098
+ {}
6997
7099
 
6998
- export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> { }
7100
+ export interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> {}
6999
7101
 
7000
- export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> { }
7102
+ export interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> {}
7001
7103
 
7002
- export interface RuntimeEvent extends chrome.events.Event<() => void> { }
7104
+ export interface RuntimeEvent extends chrome.events.Event<() => void> {}
7003
7105
 
7004
- export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> { }
7106
+ export interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> {}
7005
7107
 
7006
7108
  export interface RuntimeUpdateAvailableEvent
7007
- extends chrome.events.Event<(details: UpdateAvailableDetails) => void> { }
7109
+ extends chrome.events.Event<(details: UpdateAvailableDetails) => void>
7110
+ {}
7008
7111
 
7009
7112
  export interface ManifestIcons {
7010
7113
  [size: number]: string;
@@ -7018,79 +7121,79 @@ declare namespace chrome.runtime {
7018
7121
 
7019
7122
  // Source: https://developer.chrome.com/docs/extensions/mv3/declare_permissions/
7020
7123
  export type ManifestPermissions =
7021
- | 'activeTab'
7022
- | 'alarms'
7023
- | 'background'
7024
- | 'bookmarks'
7025
- | 'browsingData'
7026
- | 'certificateProvider'
7027
- | 'clipboardRead'
7028
- | 'clipboardWrite'
7029
- | 'contentSettings'
7030
- | 'contextMenus'
7031
- | 'cookies'
7032
- | 'debugger'
7033
- | 'declarativeContent'
7034
- | 'declarativeNetRequest'
7035
- | 'declarativeNetRequestFeedback'
7036
- | 'declarativeNetRequestWithHostAccess'
7037
- | 'declarativeWebRequest'
7038
- | 'desktopCapture'
7039
- | 'documentScan'
7040
- | 'downloads'
7041
- | 'downloads.shelf'
7042
- | 'downloads.ui'
7043
- | 'enterprise.deviceAttributes'
7044
- | 'enterprise.hardwarePlatform'
7045
- | 'enterprise.networkingAttributes'
7046
- | 'enterprise.platformKeys'
7047
- | 'experimental'
7048
- | 'favicon'
7049
- | 'fileBrowserHandler'
7050
- | 'fileSystemProvider'
7051
- | 'fontSettings'
7052
- | 'gcm'
7053
- | 'geolocation'
7054
- | 'history'
7055
- | 'identity'
7056
- | 'identity.email'
7057
- | 'idle'
7058
- | 'loginState'
7059
- | 'management'
7060
- | 'nativeMessaging'
7061
- | 'notifications'
7062
- | 'offscreen'
7063
- | 'pageCapture'
7064
- | 'platformKeys'
7065
- | 'power'
7066
- | 'printerProvider'
7067
- | 'printing'
7068
- | 'printingMetrics'
7069
- | 'privacy'
7070
- | 'processes'
7071
- | 'proxy'
7072
- | 'scripting'
7073
- | 'search'
7074
- | 'sessions'
7075
- | 'sidePanel'
7076
- | 'signedInDevices'
7077
- | 'storage'
7078
- | 'system.cpu'
7079
- | 'system.display'
7080
- | 'system.memory'
7081
- | 'system.storage'
7082
- | 'tabCapture'
7083
- | 'tabGroups'
7084
- | 'tabs'
7085
- | 'topSites'
7086
- | 'tts'
7087
- | 'ttsEngine'
7088
- | 'unlimitedStorage'
7089
- | 'vpnProvider'
7090
- | 'wallpaper'
7091
- | 'webNavigation'
7092
- | 'webRequest'
7093
- | 'webRequestBlocking';
7124
+ | "activeTab"
7125
+ | "alarms"
7126
+ | "background"
7127
+ | "bookmarks"
7128
+ | "browsingData"
7129
+ | "certificateProvider"
7130
+ | "clipboardRead"
7131
+ | "clipboardWrite"
7132
+ | "contentSettings"
7133
+ | "contextMenus"
7134
+ | "cookies"
7135
+ | "debugger"
7136
+ | "declarativeContent"
7137
+ | "declarativeNetRequest"
7138
+ | "declarativeNetRequestFeedback"
7139
+ | "declarativeNetRequestWithHostAccess"
7140
+ | "declarativeWebRequest"
7141
+ | "desktopCapture"
7142
+ | "documentScan"
7143
+ | "downloads"
7144
+ | "downloads.shelf"
7145
+ | "downloads.ui"
7146
+ | "enterprise.deviceAttributes"
7147
+ | "enterprise.hardwarePlatform"
7148
+ | "enterprise.networkingAttributes"
7149
+ | "enterprise.platformKeys"
7150
+ | "experimental"
7151
+ | "favicon"
7152
+ | "fileBrowserHandler"
7153
+ | "fileSystemProvider"
7154
+ | "fontSettings"
7155
+ | "gcm"
7156
+ | "geolocation"
7157
+ | "history"
7158
+ | "identity"
7159
+ | "identity.email"
7160
+ | "idle"
7161
+ | "loginState"
7162
+ | "management"
7163
+ | "nativeMessaging"
7164
+ | "notifications"
7165
+ | "offscreen"
7166
+ | "pageCapture"
7167
+ | "platformKeys"
7168
+ | "power"
7169
+ | "printerProvider"
7170
+ | "printing"
7171
+ | "printingMetrics"
7172
+ | "privacy"
7173
+ | "processes"
7174
+ | "proxy"
7175
+ | "scripting"
7176
+ | "search"
7177
+ | "sessions"
7178
+ | "sidePanel"
7179
+ | "signedInDevices"
7180
+ | "storage"
7181
+ | "system.cpu"
7182
+ | "system.display"
7183
+ | "system.memory"
7184
+ | "system.storage"
7185
+ | "tabCapture"
7186
+ | "tabGroups"
7187
+ | "tabs"
7188
+ | "topSites"
7189
+ | "tts"
7190
+ | "ttsEngine"
7191
+ | "unlimitedStorage"
7192
+ | "vpnProvider"
7193
+ | "wallpaper"
7194
+ | "webNavigation"
7195
+ | "webRequest"
7196
+ | "webRequestBlocking";
7094
7197
 
7095
7198
  export interface SearchProvider {
7096
7199
  name?: string | undefined;
@@ -7240,7 +7343,7 @@ declare namespace chrome.runtime {
7240
7343
  path: string;
7241
7344
  }[] | undefined;
7242
7345
  requirements?: {
7243
- '3D'?: {
7346
+ "3D"?: {
7244
7347
  features?: string[] | undefined;
7245
7348
  } | undefined;
7246
7349
  plugins?: {
@@ -7284,12 +7387,12 @@ declare namespace chrome.runtime {
7284
7387
 
7285
7388
  // Optional
7286
7389
  background?:
7287
- | {
7288
- scripts?: string[] | undefined;
7289
- page?: string | undefined;
7290
- persistent?: boolean | undefined;
7291
- }
7292
- | undefined;
7390
+ | {
7391
+ scripts?: string[] | undefined;
7392
+ page?: string | undefined;
7393
+ persistent?: boolean | undefined;
7394
+ }
7395
+ | undefined;
7293
7396
  content_security_policy?: string | undefined;
7294
7397
  optional_permissions?: string[] | undefined;
7295
7398
  permissions?: string[] | undefined;
@@ -7303,11 +7406,11 @@ declare namespace chrome.runtime {
7303
7406
  // Optional
7304
7407
  action?: ManifestAction | undefined;
7305
7408
  background?:
7306
- | {
7307
- service_worker: string;
7308
- type?: 'module'; // If the service worker uses ES modules
7309
- }
7310
- | undefined;
7409
+ | {
7410
+ service_worker: string;
7411
+ type?: "module"; // If the service worker uses ES modules
7412
+ }
7413
+ | undefined;
7311
7414
  content_scripts?: {
7312
7415
  matches?: string[] | undefined;
7313
7416
  exclude_matches?: string[] | undefined;
@@ -7318,7 +7421,7 @@ declare namespace chrome.runtime {
7318
7421
  match_about_blank?: boolean | undefined;
7319
7422
  include_globs?: string[] | undefined;
7320
7423
  exclude_globs?: string[] | undefined;
7321
- world?: "ISOLATED" | "MAIN" | undefined
7424
+ world?: "ISOLATED" | "MAIN" | undefined;
7322
7425
  }[] | undefined;
7323
7426
  content_security_policy?: {
7324
7427
  extension_pages?: string;
@@ -7330,7 +7433,7 @@ declare namespace chrome.runtime {
7330
7433
  web_accessible_resources?: { resources: string[]; matches: string[] }[] | undefined;
7331
7434
  }
7332
7435
 
7333
- export type Manifest = ManifestV2 | ManifestV3
7436
+ export type Manifest = ManifestV2 | ManifestV3;
7334
7437
 
7335
7438
  /**
7336
7439
  * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
@@ -7438,7 +7541,11 @@ declare namespace chrome.runtime {
7438
7541
  * @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
7439
7542
  * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
7440
7543
  */
7441
- export function sendMessage<M = any, R = any>(extensionId: string | undefined | null, message: M, responseCallback: (response: R) => void): void;
7544
+ export function sendMessage<M = any, R = any>(
7545
+ extensionId: string | undefined | null,
7546
+ message: M,
7547
+ responseCallback: (response: R) => void,
7548
+ ): void;
7442
7549
  /**
7443
7550
  * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
7444
7551
  * @since Chrome 32.
@@ -7575,12 +7682,11 @@ declare namespace chrome.runtime {
7575
7682
  * @since Chrome 88.
7576
7683
  */
7577
7684
  declare namespace chrome.scripting {
7578
-
7579
7685
  /* The CSS style origin for a style change. */
7580
- export type StyleOrigin = 'AUTHOR' | 'USER';
7686
+ export type StyleOrigin = "AUTHOR" | "USER";
7581
7687
 
7582
7688
  /* The JavaScript world for a script to execute within. */
7583
- export type ExecutionWorld = 'ISOLATED' | 'MAIN';
7689
+ export type ExecutionWorld = "ISOLATED" | "MAIN";
7584
7690
 
7585
7691
  export interface InjectionResult<T> {
7586
7692
  /* The frame associated with the injection. */
@@ -7609,25 +7715,30 @@ declare namespace chrome.scripting {
7609
7715
  target: InjectionTarget;
7610
7716
  }
7611
7717
 
7612
- export type ScriptInjection<Args extends any[], Result> = {
7613
- /* Details specifying the target into which to inject the script. */
7614
- target: InjectionTarget;
7615
- /* The JavaScript world for a script to execute within. */
7616
- world?: ExecutionWorld;
7617
- /* Whether the injection should be triggered in the target as soon as possible. Note that this is not a guarantee that injection will occur prior to page load, as the page may have already loaded by the time the script reaches the target. */
7618
- injectImmediately?: boolean;
7619
- } & ({
7620
- /* The path of the JS files to inject, relative to the extension's root directory. NOTE: Currently a maximum of one file is supported. Exactly one of files and function must be specified. */
7621
- files: string[];
7622
- } | ({
7623
- /* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of files and function must be specified. */
7624
- func: () => Result;
7625
- } | {
7626
- /* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of files and function must be specified. */
7627
- func: (...args: Args) => Result;
7628
- /* The arguments to carry into a provided function. This is only valid if the func parameter is specified. These arguments must be JSON-serializable. */
7629
- args: Args;
7630
- }))
7718
+ export type ScriptInjection<Args extends any[], Result> =
7719
+ & {
7720
+ /* Details specifying the target into which to inject the script. */
7721
+ target: InjectionTarget;
7722
+ /* The JavaScript world for a script to execute within. */
7723
+ world?: ExecutionWorld;
7724
+ /* Whether the injection should be triggered in the target as soon as possible. Note that this is not a guarantee that injection will occur prior to page load, as the page may have already loaded by the time the script reaches the target. */
7725
+ injectImmediately?: boolean;
7726
+ }
7727
+ & (
7728
+ | {
7729
+ /* The path of the JS files to inject, relative to the extension's root directory. NOTE: Currently a maximum of one file is supported. Exactly one of files and function must be specified. */
7730
+ files: string[];
7731
+ }
7732
+ | ({
7733
+ /* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of files and function must be specified. */
7734
+ func: () => Result;
7735
+ } | {
7736
+ /* A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of files and function must be specified. */
7737
+ func: (...args: Args) => Result;
7738
+ /* The arguments to carry into a provided function. This is only valid if the func parameter is specified. These arguments must be JSON-serializable. */
7739
+ args: Args;
7740
+ })
7741
+ );
7631
7742
 
7632
7743
  type Awaited<T> = T extends PromiseLike<infer U> ? U : T;
7633
7744
 
@@ -7658,7 +7769,9 @@ declare namespace chrome.scripting {
7658
7769
  * The details of the script which to inject.
7659
7770
  * @return The `executeScript` method provides its result via callback or returned as a `Promise` (MV3 only). The resulting array contains the result of execution for each frame where the injection succeeded.
7660
7771
  */
7661
- export function executeScript<Args extends any[], Result>(injection: ScriptInjection<Args, Result>): Promise<InjectionResult<Awaited<Result>>[]>;
7772
+ export function executeScript<Args extends any[], Result>(
7773
+ injection: ScriptInjection<Args, Result>,
7774
+ ): Promise<InjectionResult<Awaited<Result>>[]>;
7662
7775
 
7663
7776
  /**
7664
7777
  * Injects a script into a target context. The script will be run at document_end.
@@ -7667,7 +7780,10 @@ declare namespace chrome.scripting {
7667
7780
  * @param callback
7668
7781
  * Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
7669
7782
  */
7670
- export function executeScript<Args extends any[], Result>(injection: ScriptInjection<Args, Result>, callback: (results: InjectionResult<Awaited<Result>>[]) => void): void;
7783
+ export function executeScript<Args extends any[], Result>(
7784
+ injection: ScriptInjection<Args, Result>,
7785
+ callback: (results: InjectionResult<Awaited<Result>>[]) => void,
7786
+ ): void;
7671
7787
 
7672
7788
  /**
7673
7789
  * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
@@ -7751,7 +7867,10 @@ declare namespace chrome.scripting {
7751
7867
  * @param callback
7752
7868
  */
7753
7869
  export function getRegisteredContentScripts(callback: (scripts: RegisteredContentScript[]) => void): void;
7754
- export function getRegisteredContentScripts(filter: ContentScriptFilter, callback: (scripts: RegisteredContentScript[]) => void): void;
7870
+ export function getRegisteredContentScripts(
7871
+ filter: ContentScriptFilter,
7872
+ callback: (scripts: RegisteredContentScript[]) => void,
7873
+ ): void;
7755
7874
 
7756
7875
  /**
7757
7876
  * Updates one or more content scripts.
@@ -7784,7 +7903,7 @@ declare namespace chrome.scriptBadge {
7784
7903
  popup: string;
7785
7904
  }
7786
7905
 
7787
- export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { }
7906
+ export interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
7788
7907
 
7789
7908
  export function getPopup(details: GetPopupDetails, callback: Function): void;
7790
7909
  export function getAttention(details: AttentionDetails): void;
@@ -7832,16 +7951,16 @@ declare namespace chrome.sessions {
7832
7951
  sessions: Session[];
7833
7952
  }
7834
7953
 
7835
- export interface SessionChangedEvent extends chrome.events.Event<() => void> { }
7954
+ export interface SessionChangedEvent extends chrome.events.Event<() => void> {}
7836
7955
 
7837
7956
  /** The maximum number of sessions.Session that will be included in a requested list. */
7838
7957
  export var MAX_SESSION_RESULTS: number;
7839
7958
 
7840
7959
  /**
7841
- * Gets the list of recently closed tabs and/or windows.
7842
- * @return The `getRecentlyClosed` method provides its result via callback or returned as a `Promise` (MV3 only).
7843
- */
7844
- export function getRecentlyClosed(filter?: Filter): Promise<Session[]>;
7960
+ * Gets the list of recently closed tabs and/or windows.
7961
+ * @return The `getRecentlyClosed` method provides its result via callback or returned as a `Promise` (MV3 only).
7962
+ */
7963
+ export function getRecentlyClosed(filter?: Filter): Promise<Session[]>;
7845
7964
  /**
7846
7965
  * Gets the list of recently closed tabs and/or windows.
7847
7966
  * @param callback
@@ -7991,7 +8110,10 @@ declare namespace chrome.storage {
7991
8110
  * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
7992
8111
  * Parameter items: Object with items in their key-value mappings.
7993
8112
  */
7994
- get(keys: string | string[] | { [key: string]: any } | null, callback: (items: { [key: string]: any }) => void): void;
8113
+ get(
8114
+ keys: string | string[] | { [key: string]: any } | null,
8115
+ callback: (items: { [key: string]: any }) => void,
8116
+ ): void;
7995
8117
  /**
7996
8118
  * Sets the desired access level for the storage area. The default will be only trusted contexts.
7997
8119
  * @param accessOptions An object containing an accessLevel key which contains the access level of the storage area.
@@ -8056,18 +8178,20 @@ declare namespace chrome.storage {
8056
8178
  }
8057
8179
 
8058
8180
  export interface StorageAreaChangedEvent
8059
- extends chrome.events.Event<(changes: { [key: string]: StorageChange }) => void> { }
8181
+ extends chrome.events.Event<(changes: { [key: string]: StorageChange }) => void>
8182
+ {}
8060
8183
 
8061
- type AreaName = keyof Pick<typeof chrome.storage, 'sync' | 'local' | 'managed' | 'session'>;
8184
+ type AreaName = keyof Pick<typeof chrome.storage, "sync" | "local" | "managed" | "session">;
8062
8185
  export interface StorageChangedEvent
8063
- extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: AreaName) => void> { }
8186
+ extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: AreaName) => void>
8187
+ {}
8064
8188
 
8065
8189
  type AccessLevel = keyof typeof AccessLevel;
8066
8190
 
8067
8191
  /** The storage area's access level. */
8068
8192
  export var AccessLevel: {
8069
- TRUSTED_AND_UNTRUSTED_CONTEXTS: 'TRUSTED_AND_UNTRUSTED_CONTEXTS',
8070
- TRUSTED_CONTEXTS: 'TRUSTED_CONTEXTS'
8193
+ TRUSTED_AND_UNTRUSTED_CONTEXTS: "TRUSTED_AND_UNTRUSTED_CONTEXTS";
8194
+ TRUSTED_CONTEXTS: "TRUSTED_CONTEXTS";
8071
8195
  };
8072
8196
 
8073
8197
  /** Items in the local storage area are local to each machine. */
@@ -8281,9 +8405,9 @@ declare namespace chrome.system.storage {
8281
8405
  availableCapacity: number;
8282
8406
  }
8283
8407
 
8284
- export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> { }
8408
+ export interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> {}
8285
8409
 
8286
- export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> { }
8410
+ export interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> {}
8287
8411
 
8288
8412
  /** Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. */
8289
8413
  export function getInfo(callback: (info: StorageUnitInfo[]) => void): void;
@@ -8333,15 +8457,15 @@ declare namespace chrome.system.storage {
8333
8457
  */
8334
8458
  declare namespace chrome.system.display {
8335
8459
  export const DisplayPosition: {
8336
- TOP: 'top';
8337
- RIGHT: 'right';
8338
- BOTTOM: 'bottom';
8339
- LEFT: 'left';
8460
+ TOP: "top";
8461
+ RIGHT: "right";
8462
+ BOTTOM: "bottom";
8463
+ LEFT: "left";
8340
8464
  };
8341
8465
  export const MirrorMode: {
8342
- OFF: 'off';
8343
- NORMAL: 'normal';
8344
- MIXED: 'mixed';
8466
+ OFF: "off";
8467
+ NORMAL: "normal";
8468
+ MIXED: "mixed";
8345
8469
  };
8346
8470
  export interface Bounds {
8347
8471
  /** The x-coordinate of the upper-left corner. */
@@ -8404,7 +8528,7 @@ declare namespace chrome.system.display {
8404
8528
  /**
8405
8529
  * @deprecated Deprecated since Chrome 70. Use `displayZoomFactor`
8406
8530
  * @description The display mode UI scale factor.
8407
- **/
8531
+ */
8408
8532
  uiScale: number;
8409
8533
 
8410
8534
  /** The display mode device scale factor. */
@@ -8640,10 +8764,10 @@ declare namespace chrome.system.display {
8640
8764
  * **mixed**
8641
8765
  * The specified source display will be mirrored to the provided destination displays. All other connected displays will be extended.
8642
8766
  */
8643
- mode?: 'off' | 'normal' | 'mixed' | undefined;
8767
+ mode?: "off" | "normal" | "mixed" | undefined;
8644
8768
  }
8645
8769
  export interface MirrorModeInfoMixed extends MirrorModeInfo {
8646
- mode: 'mixed';
8770
+ mode: "mixed";
8647
8771
  mirroringSourceId?: string | undefined;
8648
8772
  /** The ids of the mirroring destination displays. */
8649
8773
  mirroringDestinationIds?: string[] | undefined;
@@ -8906,7 +9030,7 @@ declare namespace chrome.tabCapture {
8906
9030
  targetTabId?: number | undefined;
8907
9031
  }
8908
9032
 
8909
- export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> { }
9033
+ export interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> {}
8910
9034
 
8911
9035
  /**
8912
9036
  * Captures the visible area of the currently active tab. Capture can only be started on the currently active tab after the extension has been invoked. Capture is maintained across page navigations within the tab, and stops when the tab is closed, or the media stream is closed by the extension.
@@ -9265,8 +9389,8 @@ declare namespace chrome.tabs {
9265
9389
  /** Optional. Configurations for creating a group. Cannot be used if groupId is already specified. */
9266
9390
  createProperties?: {
9267
9391
  /** Optional. The window of the new group. Defaults to the current window. */
9268
- windowId?: number | undefined
9269
- } | undefined,
9392
+ windowId?: number | undefined;
9393
+ } | undefined;
9270
9394
  /** Optional. The ID of the group to add the tabs to. If not specified, a new group will be created. */
9271
9395
  groupId?: number | undefined;
9272
9396
  /** TOptional. he tab ID or list of tab IDs to add to the specified group. */
@@ -9285,7 +9409,7 @@ declare namespace chrome.tabs {
9285
9409
  * Optional. Whether the tabs have completed loading.
9286
9410
  * One of: "loading", or "complete"
9287
9411
  */
9288
- status?: 'loading' | 'complete' | undefined;
9412
+ status?: "loading" | "complete" | undefined;
9289
9413
  /**
9290
9414
  * Optional. Whether the tabs are in the last focused window.
9291
9415
  * @since Chrome 19.
@@ -9297,7 +9421,7 @@ declare namespace chrome.tabs {
9297
9421
  * Optional. The type of window the tabs are in.
9298
9422
  * One of: "normal", "popup", "panel", "app", or "devtools"
9299
9423
  */
9300
- windowType?: 'normal' | 'popup' | 'panel' | 'app' | 'devtools' | undefined;
9424
+ windowType?: "normal" | "popup" | "panel" | "app" | "devtools" | undefined;
9301
9425
  /** Optional. Whether the tabs are active in their windows. */
9302
9426
  active?: boolean | undefined;
9303
9427
  /**
@@ -9444,28 +9568,29 @@ declare namespace chrome.tabs {
9444
9568
  zoomSettings: ZoomSettings;
9445
9569
  }
9446
9570
 
9447
- export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: TabHighlightInfo) => void> { }
9571
+ export interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: TabHighlightInfo) => void> {}
9448
9572
 
9449
- export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> { }
9573
+ export interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> {}
9450
9574
 
9451
9575
  export interface TabUpdatedEvent
9452
- extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void> { }
9576
+ extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void>
9577
+ {}
9453
9578
 
9454
- export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> { }
9579
+ export interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> {}
9455
9580
 
9456
- export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> { }
9581
+ export interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> {}
9457
9582
 
9458
- export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> { }
9583
+ export interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> {}
9459
9584
 
9460
- export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> { }
9585
+ export interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> {}
9461
9586
 
9462
- export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> { }
9587
+ export interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> {}
9463
9588
 
9464
- export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> { }
9589
+ export interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> {}
9465
9590
 
9466
- export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> { }
9591
+ export interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> {}
9467
9592
 
9468
- export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> { }
9593
+ export interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> {}
9469
9594
 
9470
9595
  /**
9471
9596
  * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
@@ -9753,7 +9878,11 @@ declare namespace chrome.tabs {
9753
9878
  * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
9754
9879
  * @since Chrome 20.
9755
9880
  */
9756
- export function sendMessage<M = any, R = any>(tabId: number, message: M, responseCallback: (response: R) => void): void;
9881
+ export function sendMessage<M = any, R = any>(
9882
+ tabId: number,
9883
+ message: M,
9884
+ responseCallback: (response: R) => void,
9885
+ ): void;
9757
9886
  /**
9758
9887
  * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
9759
9888
  * @since Chrome 41.
@@ -9778,7 +9907,7 @@ declare namespace chrome.tabs {
9778
9907
  export function sendMessage<M = any, R = any>(
9779
9908
  tabId: number,
9780
9909
  message: M,
9781
- options: MessageSendOptions
9910
+ options: MessageSendOptions,
9782
9911
  ): Promise<R>;
9783
9912
  /**
9784
9913
  * Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.
@@ -9786,7 +9915,11 @@ declare namespace chrome.tabs {
9786
9915
  * @param responseCallback Optional.
9787
9916
  * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message.
9788
9917
  */
9789
- export function sendRequest<Request = any, Response = any>(tabId: number, request: Request, responseCallback?: (response: Response) => void): void;
9918
+ export function sendRequest<Request = any, Response = any>(
9919
+ tabId: number,
9920
+ request: Request,
9921
+ responseCallback?: (response: Response) => void,
9922
+ ): void;
9790
9923
  /** Connects to the content script(s) in the specified tab. The runtime.onConnect event is fired in each content script running in the specified tab for the current extension. */
9791
9924
  export function connect(tabId: number, connectInfo?: ConnectInfo): runtime.Port;
9792
9925
  /**
@@ -10066,7 +10199,7 @@ declare namespace chrome.tabs {
10066
10199
  * @param options Configurations object
10067
10200
  * @param callback Optional.
10068
10201
  */
10069
- export function group(options: GroupOptions, callback: (groupId: number) => void): void
10202
+ export function group(options: GroupOptions, callback: (groupId: number) => void): void;
10070
10203
  /**
10071
10204
  * Removes one or more tabs from their respective groups. If any groups become empty, they are deleted
10072
10205
  * @since Chrome 88
@@ -10080,7 +10213,7 @@ declare namespace chrome.tabs {
10080
10213
  * @param tabIds The tabs to ungroup.
10081
10214
  * @param callback Optional. Called after the operation is completed.
10082
10215
  */
10083
- export function ungroup(tabIds: number | number[], callback: () => void): void
10216
+ export function ungroup(tabIds: number | number[], callback: () => void): void;
10084
10217
  /**
10085
10218
  * Fired when the highlighted or selected tabs in a window changes.
10086
10219
  * @since Chrome 18.
@@ -10147,11 +10280,10 @@ declare namespace chrome.tabs {
10147
10280
  * @since Chrome 89. Manifest V3 and above.
10148
10281
  */
10149
10282
  declare namespace chrome.tabGroups {
10150
-
10151
10283
  /** An ID that represents the absence of a group. */
10152
10284
  export var TAB_GROUP_ID_NONE: -1;
10153
10285
 
10154
- export type ColorEnum = 'grey' | 'blue' | 'red' | 'yellow' | 'green' | 'pink' | 'purple' | 'cyan' | 'orange';
10286
+ export type ColorEnum = "grey" | "blue" | "red" | "yellow" | "green" | "pink" | "purple" | "cyan" | "orange";
10155
10287
 
10156
10288
  export interface TabGroup {
10157
10289
  /** Whether the group is collapsed. A collapsed group is one whose tabs are hidden. */
@@ -10220,7 +10352,7 @@ declare namespace chrome.tabGroups {
10220
10352
  * @param groupId The ID of the group to move.
10221
10353
  * @param moveProperties Information on how to move the group.
10222
10354
  * @param callback Optional.
10223
- */
10355
+ */
10224
10356
  export function move(groupId: number, moveProperties: MoveProperties, callback: (group: TabGroup) => void): void;
10225
10357
 
10226
10358
  /**
@@ -10251,12 +10383,16 @@ declare namespace chrome.tabGroups {
10251
10383
  * @param updateProperties Information on how to update the group.
10252
10384
  * @param callback Optional.
10253
10385
  */
10254
- export function update(groupId: number, updateProperties: UpdateProperties, callback: (group: TabGroup) => void): void;
10386
+ export function update(
10387
+ groupId: number,
10388
+ updateProperties: UpdateProperties,
10389
+ callback: (group: TabGroup) => void,
10390
+ ): void;
10255
10391
 
10256
- export interface TabGroupCreatedEvent extends chrome.events.Event<(group: TabGroup) => void> { }
10257
- export interface TabGroupMovedEvent extends chrome.events.Event<(group: TabGroup) => void> { }
10258
- export interface TabGroupRemovedEvent extends chrome.events.Event<(group: TabGroup) => void> { }
10259
- export interface TabGroupUpdated extends chrome.events.Event<(group: TabGroup) => void> { }
10392
+ export interface TabGroupCreatedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
10393
+ export interface TabGroupMovedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
10394
+ export interface TabGroupRemovedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
10395
+ export interface TabGroupUpdated extends chrome.events.Event<(group: TabGroup) => void> {}
10260
10396
 
10261
10397
  /** Fired when a group is created. */
10262
10398
  export var onCreated: TabGroupCreatedEvent;
@@ -10320,7 +10456,17 @@ declare namespace chrome.tts {
10320
10456
  * The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances.
10321
10457
  * One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume"
10322
10458
  */
10323
- type: "start" | "end" | "word" | "sentence" | "marker" | "interrupted" | "cancelled" | "error" | "pause" | "resume";
10459
+ type:
10460
+ | "start"
10461
+ | "end"
10462
+ | "word"
10463
+ | "sentence"
10464
+ | "marker"
10465
+ | "interrupted"
10466
+ | "cancelled"
10467
+ | "error"
10468
+ | "pause"
10469
+ | "resume";
10324
10470
  }
10325
10471
 
10326
10472
  /** A description of a voice available for speech synthesis. */
@@ -10448,10 +10594,11 @@ declare namespace chrome.ttsEngine {
10448
10594
  pitch?: number | undefined;
10449
10595
  }
10450
10596
 
10451
- export interface TtsEngineSpeakEvent
10452
- extends chrome.events.Event<
10597
+ export interface TtsEngineSpeakEvent extends
10598
+ chrome.events.Event<
10453
10599
  (utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void
10454
- > { }
10600
+ >
10601
+ {}
10455
10602
 
10456
10603
  /** Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. */
10457
10604
  export var onSpeak: TtsEngineSpeakEvent;
@@ -10477,7 +10624,7 @@ declare namespace chrome.ttsEngine {
10477
10624
  * @since Chrome 13.
10478
10625
  */
10479
10626
  declare namespace chrome.types {
10480
- type settingsScope = 'regular' | 'regular_only' | 'incognito_persistent' | 'incognito_session_only' | undefined;
10627
+ type settingsScope = "regular" | "regular_only" | "incognito_persistent" | "incognito_session_only" | undefined;
10481
10628
 
10482
10629
  export interface ChromeSettingClearDetails {
10483
10630
  /**
@@ -10526,7 +10673,11 @@ declare namespace chrome.types {
10526
10673
  * • controllable_by_this_extension: can be controlled by this extension
10527
10674
  * • controlled_by_this_extension: controlled by this extension
10528
10675
  */
10529
- levelOfControl: 'not_controllable' | 'controlled_by_other_extensions' | 'controllable_by_this_extension' | 'controlled_by_this_extension';
10676
+ levelOfControl:
10677
+ | "not_controllable"
10678
+ | "controlled_by_other_extensions"
10679
+ | "controllable_by_this_extension"
10680
+ | "controlled_by_this_extension";
10530
10681
  /** The value of the setting. */
10531
10682
  value: any;
10532
10683
  /**
@@ -10537,7 +10688,7 @@ declare namespace chrome.types {
10537
10688
  incognitoSpecific?: boolean | undefined;
10538
10689
  }
10539
10690
 
10540
- export interface ChromeSettingChangedEvent extends chrome.events.Event<DetailsCallback> { }
10691
+ export interface ChromeSettingChangedEvent extends chrome.events.Event<DetailsCallback> {}
10541
10692
 
10542
10693
  /** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */
10543
10694
  export interface ChromeSetting {
@@ -10595,16 +10746,18 @@ declare namespace chrome.vpnProvider {
10595
10746
  }
10596
10747
 
10597
10748
  export interface VpnPlatformMessageEvent
10598
- extends chrome.events.Event<(id: string, message: string, error: string) => void> { }
10749
+ extends chrome.events.Event<(id: string, message: string, error: string) => void>
10750
+ {}
10599
10751
 
10600
- export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> { }
10752
+ export interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> {}
10601
10753
 
10602
- export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> { }
10754
+ export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {}
10603
10755
 
10604
10756
  export interface VpnConfigCreationEvent
10605
- extends chrome.events.Event<(id: string, name: string, data: Object) => void> { }
10757
+ extends chrome.events.Event<(id: string, name: string, data: Object) => void>
10758
+ {}
10606
10759
 
10607
- export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> { }
10760
+ export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {}
10608
10761
 
10609
10762
  /**
10610
10763
  * Creates a new VPN configuration that persists across multiple login sessions of the user.
@@ -10671,7 +10824,7 @@ declare namespace chrome.wallpaper {
10671
10824
  * The supported wallpaper layouts.
10672
10825
  * One of: "STRETCH", "CENTER", or "CENTER_CROPPED"
10673
10826
  */
10674
- layout: 'STRETCH' | 'CENTER' | 'CENTER_CROPPED';
10827
+ layout: "STRETCH" | "CENTER" | "CENTER_CROPPED";
10675
10828
  /** The file name of the saved wallpaper. */
10676
10829
  filename: string;
10677
10830
  /** Optional. True if a 128x60 thumbnail should be generated. */
@@ -10815,24 +10968,28 @@ declare namespace chrome.webNavigation {
10815
10968
  }
10816
10969
 
10817
10970
  export interface WebNavigationEvent<T extends WebNavigationCallbackDetails>
10818
- extends chrome.events.Event<(details: T) => void> {
10971
+ extends chrome.events.Event<(details: T) => void>
10972
+ {
10819
10973
  addListener(callback: (details: T) => void, filters?: WebNavigationEventFilter): void;
10820
10974
  }
10821
10975
 
10822
- export interface WebNavigationFramedEvent extends WebNavigationEvent<WebNavigationFramedCallbackDetails> { }
10976
+ export interface WebNavigationFramedEvent extends WebNavigationEvent<WebNavigationFramedCallbackDetails> {}
10823
10977
 
10824
10978
  export interface WebNavigationFramedErrorEvent
10825
- extends WebNavigationEvent<WebNavigationFramedErrorCallbackDetails> { }
10979
+ extends WebNavigationEvent<WebNavigationFramedErrorCallbackDetails>
10980
+ {}
10826
10981
 
10827
- export interface WebNavigationSourceEvent extends WebNavigationEvent<WebNavigationSourceCallbackDetails> { }
10982
+ export interface WebNavigationSourceEvent extends WebNavigationEvent<WebNavigationSourceCallbackDetails> {}
10828
10983
 
10829
- export interface WebNavigationParentedEvent extends WebNavigationEvent<WebNavigationParentedCallbackDetails> { }
10984
+ export interface WebNavigationParentedEvent extends WebNavigationEvent<WebNavigationParentedCallbackDetails> {}
10830
10985
 
10831
10986
  export interface WebNavigationTransitionalEvent
10832
- extends WebNavigationEvent<WebNavigationTransitionCallbackDetails> { }
10987
+ extends WebNavigationEvent<WebNavigationTransitionCallbackDetails>
10988
+ {}
10833
10989
 
10834
10990
  export interface WebNavigationReplacementEvent
10835
- extends WebNavigationEvent<WebNavigationReplacementCallbackDetails> { }
10991
+ extends WebNavigationEvent<WebNavigationReplacementCallbackDetails>
10992
+ {}
10836
10993
 
10837
10994
  /**
10838
10995
  * Retrieves information about the given frame. A frame refers to an <iframe> or a <frame> of a web page and is identified by a tab ID and a frame ID.
@@ -10903,19 +11060,19 @@ declare namespace chrome.webNavigation {
10903
11060
  declare namespace chrome.webRequest {
10904
11061
  /** How the requested resource will be used. */
10905
11062
  export type ResourceType =
10906
- | 'main_frame'
10907
- | 'sub_frame'
10908
- | 'stylesheet'
10909
- | 'script'
10910
- | 'image'
10911
- | 'font'
10912
- | 'object'
10913
- | 'xmlhttprequest'
10914
- | 'ping'
10915
- | 'csp_report'
10916
- | 'media'
10917
- | 'websocket'
10918
- | 'other';
11063
+ | "main_frame"
11064
+ | "sub_frame"
11065
+ | "stylesheet"
11066
+ | "script"
11067
+ | "image"
11068
+ | "font"
11069
+ | "object"
11070
+ | "xmlhttprequest"
11071
+ | "ping"
11072
+ | "csp_report"
11073
+ | "media"
11074
+ | "websocket"
11075
+ | "other";
10919
11076
 
10920
11077
  export interface AuthCredentials {
10921
11078
  username: string;
@@ -11050,7 +11207,7 @@ declare namespace chrome.webRequest {
11050
11207
  requestBody: WebRequestBody | null;
11051
11208
  }
11052
11209
 
11053
- export interface WebRequestFullDetails extends WebRequestHeadersDetails, WebRequestBodyDetails { }
11210
+ export interface WebRequestFullDetails extends WebRequestHeadersDetails, WebRequestBodyDetails {}
11054
11211
 
11055
11212
  export interface WebResponseDetails extends ResourceRequest {
11056
11213
  /** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line). */
@@ -11099,8 +11256,11 @@ declare namespace chrome.webRequest {
11099
11256
  error: string;
11100
11257
  }
11101
11258
 
11102
- export interface WebRequestBodyEvent
11103
- extends chrome.events.EventWithRequiredFilterInAddListener<(details: WebRequestBodyDetails) => BlockingResponse | void> {
11259
+ export interface WebRequestBodyEvent extends
11260
+ chrome.events.EventWithRequiredFilterInAddListener<
11261
+ (details: WebRequestBodyDetails) => BlockingResponse | void
11262
+ >
11263
+ {
11104
11264
  addListener(
11105
11265
  callback: (details: WebRequestBodyDetails) => BlockingResponse | void,
11106
11266
  filter: RequestFilter,
@@ -11108,8 +11268,11 @@ declare namespace chrome.webRequest {
11108
11268
  ): void;
11109
11269
  }
11110
11270
 
11111
- export interface WebRequestHeadersSynchronousEvent
11112
- extends chrome.events.EventWithRequiredFilterInAddListener<(details: WebRequestHeadersDetails) => BlockingResponse | void> {
11271
+ export interface WebRequestHeadersSynchronousEvent extends
11272
+ chrome.events.EventWithRequiredFilterInAddListener<
11273
+ (details: WebRequestHeadersDetails) => BlockingResponse | void
11274
+ >
11275
+ {
11113
11276
  addListener(
11114
11277
  callback: (details: WebRequestHeadersDetails) => BlockingResponse | void,
11115
11278
  filter: RequestFilter,
@@ -11118,7 +11281,8 @@ declare namespace chrome.webRequest {
11118
11281
  }
11119
11282
 
11120
11283
  export interface WebRequestHeadersEvent
11121
- extends chrome.events.EventWithRequiredFilterInAddListener<(details: WebRequestHeadersDetails) => void> {
11284
+ extends chrome.events.EventWithRequiredFilterInAddListener<(details: WebRequestHeadersDetails) => void>
11285
+ {
11122
11286
  addListener(
11123
11287
  callback: (details: WebRequestHeadersDetails) => void,
11124
11288
  filter: RequestFilter,
@@ -11127,12 +11291,16 @@ declare namespace chrome.webRequest {
11127
11291
  }
11128
11292
 
11129
11293
  export interface _WebResponseHeadersEvent<T extends WebResponseHeadersDetails>
11130
- extends chrome.events.EventWithRequiredFilterInAddListener<(details: T) => void> {
11294
+ extends chrome.events.EventWithRequiredFilterInAddListener<(details: T) => void>
11295
+ {
11131
11296
  addListener(callback: (details: T) => void, filter: RequestFilter, opt_extraInfoSpec?: string[]): void;
11132
11297
  }
11133
11298
 
11134
- export interface WebResponseHeadersEvent
11135
- extends chrome.events.EventWithRequiredFilterInAddListener<(details: WebResponseHeadersDetails) => BlockingResponse | void> {
11299
+ export interface WebResponseHeadersEvent extends
11300
+ chrome.events.EventWithRequiredFilterInAddListener<
11301
+ (details: WebResponseHeadersDetails) => BlockingResponse | void
11302
+ >
11303
+ {
11136
11304
  addListener(
11137
11305
  callback: (details: WebResponseHeadersDetails) => BlockingResponse | void,
11138
11306
  filter: RequestFilter,
@@ -11140,14 +11308,15 @@ declare namespace chrome.webRequest {
11140
11308
  ): void;
11141
11309
  }
11142
11310
 
11143
- export interface WebResponseCacheEvent extends _WebResponseHeadersEvent<WebResponseCacheDetails> { }
11311
+ export interface WebResponseCacheEvent extends _WebResponseHeadersEvent<WebResponseCacheDetails> {}
11144
11312
 
11145
- export interface WebRedirectionResponseEvent extends _WebResponseHeadersEvent<WebRedirectionResponseDetails> { }
11313
+ export interface WebRedirectionResponseEvent extends _WebResponseHeadersEvent<WebRedirectionResponseDetails> {}
11146
11314
 
11147
- export interface WebAuthenticationChallengeEvent
11148
- extends chrome.events.EventWithRequiredFilterInAddListener<
11315
+ export interface WebAuthenticationChallengeEvent extends
11316
+ chrome.events.EventWithRequiredFilterInAddListener<
11149
11317
  (details: WebAuthenticationChallengeDetails, callback?: (response: BlockingResponse) => void) => void
11150
- > {
11318
+ >
11319
+ {
11151
11320
  addListener(
11152
11321
  callback: (
11153
11322
  details: WebAuthenticationChallengeDetails,
@@ -11158,7 +11327,7 @@ declare namespace chrome.webRequest {
11158
11327
  ): void;
11159
11328
  }
11160
11329
 
11161
- export interface WebResponseErrorEvent extends _WebResponseHeadersEvent<WebResponseErrorDetails> { }
11330
+ export interface WebResponseErrorEvent extends _WebResponseHeadersEvent<WebResponseErrorDetails> {}
11162
11331
 
11163
11332
  /**
11164
11333
  * The maximum number of times that handlerBehaviorChanged can be called per 10 minute sustained interval. handlerBehaviorChanged is an expensive function call that shouldn't be called often.
@@ -11280,9 +11449,9 @@ declare namespace chrome.webstore {
11280
11449
  */
11281
11450
  export function install(failureCallback?: (error: string, errorCode?: string) => void): void;
11282
11451
 
11283
- export interface InstallationStageEvent extends chrome.events.Event<(stage: string) => void> { }
11452
+ export interface InstallationStageEvent extends chrome.events.Event<(stage: string) => void> {}
11284
11453
 
11285
- export interface DownloadProgressEvent extends chrome.events.Event<(percentDownloaded: number) => void> { }
11454
+ export interface DownloadProgressEvent extends chrome.events.Event<(percentDownloaded: number) => void> {}
11286
11455
 
11287
11456
  /**
11288
11457
  * Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
@@ -11441,16 +11610,14 @@ declare namespace chrome.windows {
11441
11610
  windowTypes: windowTypeEnum[];
11442
11611
  }
11443
11612
 
11444
- export interface WindowIdEvent
11445
- extends chrome.events.Event<(windowId: number) => void> {
11613
+ export interface WindowIdEvent extends chrome.events.Event<(windowId: number) => void> {
11446
11614
  addListener(
11447
11615
  callback: (windowId: number) => void,
11448
11616
  filters?: WindowEventFilter,
11449
11617
  ): void;
11450
11618
  }
11451
11619
 
11452
- export interface WindowReferenceEvent
11453
- extends chrome.events.Event<(window: Window) => void> {
11620
+ export interface WindowReferenceEvent extends chrome.events.Event<(window: Window) => void> {
11454
11621
  addListener(
11455
11622
  callback: (window: Window) => void,
11456
11623
  filters?: WindowEventFilter,
@@ -11462,21 +11629,21 @@ declare namespace chrome.windows {
11462
11629
  * 'panel' is deprecated and is available only to existing whitelisted extensions on Chrome OS.
11463
11630
  * @since Chrome 44.
11464
11631
  */
11465
- export type createTypeEnum = 'normal' | 'popup' | 'panel';
11632
+ export type createTypeEnum = "normal" | "popup" | "panel";
11466
11633
 
11467
11634
  /**
11468
11635
  * The state of this browser window.
11469
11636
  * In some circumstances a window may not be assigned a state property; for example, when querying closed windows from the sessions API.
11470
11637
  * @since Chrome 44.
11471
11638
  */
11472
- export type windowStateEnum = 'normal' | 'minimized' | 'maximized' | 'fullscreen' | 'locked-fullscreen';
11639
+ export type windowStateEnum = "normal" | "minimized" | "maximized" | "fullscreen" | "locked-fullscreen";
11473
11640
 
11474
11641
  /**
11475
11642
  * The type of browser window this is.
11476
11643
  * In some circumstances a window may not be assigned a type property; for example, when querying closed windows from the sessions API.
11477
11644
  * @since Chrome 44.
11478
11645
  */
11479
- export type windowTypeEnum = 'normal' | 'popup' | 'panel' | 'app' | 'devtools';
11646
+ export type windowTypeEnum = "normal" | "popup" | "panel" | "app" | "devtools";
11480
11647
 
11481
11648
  /**
11482
11649
  * The windowId value that represents the current window.
@@ -11500,7 +11667,11 @@ declare namespace chrome.windows {
11500
11667
  * Gets details about a window.
11501
11668
  * @since Chrome 18.
11502
11669
  */
11503
- export function get(windowId: number, queryOptions: QueryOptions, callback: (window: chrome.windows.Window) => void): void;
11670
+ export function get(
11671
+ windowId: number,
11672
+ queryOptions: QueryOptions,
11673
+ callback: (window: chrome.windows.Window) => void,
11674
+ ): void;
11504
11675
  /**
11505
11676
  * Gets details about a window.
11506
11677
  * @since Chrome 18.
@@ -11671,7 +11842,7 @@ declare namespace chrome.declarativeNetRequest {
11671
11842
  OPTIONS = "options",
11672
11843
  PATCH = "patch",
11673
11844
  POST = "post",
11674
- PUT = "put"
11845
+ PUT = "put",
11675
11846
  }
11676
11847
 
11677
11848
  /** This describes the resource type of the network request. */
@@ -11688,7 +11859,7 @@ declare namespace chrome.declarativeNetRequest {
11688
11859
  CSP_REPORT = "csp_report",
11689
11860
  MEDIA = "media",
11690
11861
  WEBSOCKET = "websocket",
11691
- OTHER = "other"
11862
+ OTHER = "other",
11692
11863
  }
11693
11864
 
11694
11865
  /** Describes the kind of action to take if a given RuleCondition matches. */
@@ -11698,13 +11869,13 @@ declare namespace chrome.declarativeNetRequest {
11698
11869
  ALLOW = "allow",
11699
11870
  UPGRADE_SCHEME = "upgradeScheme",
11700
11871
  MODIFY_HEADERS = "modifyHeaders",
11701
- ALLOW_ALL_REQUESTS = "allowAllRequests"
11872
+ ALLOW_ALL_REQUESTS = "allowAllRequests",
11702
11873
  }
11703
11874
 
11704
11875
  /** Describes the reason why a given regular expression isn't supported. */
11705
11876
  export enum UnsupportedRegexReason {
11706
11877
  SYNTAX_ERROR = "syntaxError",
11707
- MEMORY_LIMIT_EXCEEDED = "memoryLimitExceeded"
11878
+ MEMORY_LIMIT_EXCEEDED = "memoryLimitExceeded",
11708
11879
  }
11709
11880
 
11710
11881
  /** TThis describes whether the request is first or third party to the frame in which it originated.
@@ -11712,14 +11883,14 @@ declare namespace chrome.declarativeNetRequest {
11712
11883
  */
11713
11884
  export enum DomainType {
11714
11885
  FIRST_PARTY = "firstParty",
11715
- THIRD_PARTY = "thirdParty"
11886
+ THIRD_PARTY = "thirdParty",
11716
11887
  }
11717
11888
 
11718
11889
  /** This describes the possible operations for a "modifyHeaders" rule. */
11719
11890
  export enum HeaderOperation {
11720
11891
  APPEND = "append",
11721
11892
  SET = "set",
11722
- REMOVE = "remove"
11893
+ REMOVE = "remove",
11723
11894
  }
11724
11895
 
11725
11896
  export interface RequestDetails {
@@ -12180,7 +12351,7 @@ declare namespace chrome.declarativeNetRequest {
12180
12351
 
12181
12352
  export interface RulesMatchedDetails {
12182
12353
  /** Rules matching the given filter. */
12183
- rulesMatchedInfo: MatchedRuleInfo[]
12354
+ rulesMatchedInfo: MatchedRuleInfo[];
12184
12355
  }
12185
12356
 
12186
12357
  /** Returns the number of static rules an extension can enable before the global static rule limit is reached. */
@@ -12226,7 +12397,10 @@ declare namespace chrome.declarativeNetRequest {
12226
12397
  * In case of an error, runtime.lastError will be set and no rules will be returned.
12227
12398
  * This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
12228
12399
  */
12229
- export function getMatchedRules(filter: MatchedRulesFilter | undefined, callback: (details: RulesMatchedDetails) => void): void;
12400
+ export function getMatchedRules(
12401
+ filter: MatchedRulesFilter | undefined,
12402
+ callback: (details: RulesMatchedDetails) => void,
12403
+ ): void;
12230
12404
 
12231
12405
  /**
12232
12406
  * Returns all rules matched for the extension.
@@ -12262,7 +12436,10 @@ declare namespace chrome.declarativeNetRequest {
12262
12436
  * @param callback Called with details consisting of whether the regular expression is supported and the
12263
12437
  * reason if not.
12264
12438
  */
12265
- export function isRegexSupported(regexOptions: RegexOptions, callback: (result: IsRegexSupportedResult) => void): void;
12439
+ export function isRegexSupported(
12440
+ regexOptions: RegexOptions,
12441
+ callback: (result: IsRegexSupportedResult) => void,
12442
+ ): void;
12266
12443
 
12267
12444
  /** Checks if the given regular expression will be supported as a regexFilter rule condition.
12268
12445
  *
@@ -12332,7 +12509,6 @@ declare namespace chrome.declarativeNetRequest {
12332
12509
  */
12333
12510
  export function updateEnabledRulesets(options: UpdateRulesetOptions): Promise<void>;
12334
12511
 
12335
-
12336
12512
  /** Modifies the current set of session scoped rules for the extension.
12337
12513
  * The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
12338
12514
  *
@@ -12362,7 +12538,7 @@ declare namespace chrome.declarativeNetRequest {
12362
12538
  export function updateSessionRules(options: UpdateRuleOptions): Promise<void>;
12363
12539
 
12364
12540
  /** The rule that has been matched along with information about the associated request. */
12365
- export interface RuleMatchedDebugEvent extends chrome.events.Event<(info: MatchedRuleInfoDebug) => void> { }
12541
+ export interface RuleMatchedDebugEvent extends chrome.events.Event<(info: MatchedRuleInfoDebug) => void> {}
12366
12542
 
12367
12543
  /** Fired when a rule is matched with a request.
12368
12544
  * Only available for unpacked extensions with the declarativeNetRequestFeedback permission as this is intended to be used for debugging purposes only. */
@@ -12396,7 +12572,10 @@ declare namespace chrome.sidePanel {
12396
12572
  default_path: string;
12397
12573
  }
12398
12574
 
12399
- export function getOptions(options: GetPanelOptions, callback?: (options: PanelOptions) => void): Promise<PanelOptions>;
12575
+ export function getOptions(
12576
+ options: GetPanelOptions,
12577
+ callback?: (options: PanelOptions) => void,
12578
+ ): Promise<PanelOptions>;
12400
12579
 
12401
12580
  export function getPanelBehavior(callback?: (behavior: PanelBehavior) => void): Promise<PanelBehavior>;
12402
12581