@types/chrome 0.1.38 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +143 -90
  3. chrome/package.json +3 -3
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 16 Mar 2026 22:44:30 GMT
11
+ * Last updated: Wed, 08 Apr 2026 21:53:25 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
 
14
14
  # Credits
chrome/index.d.ts CHANGED
@@ -346,9 +346,10 @@ declare namespace chrome {
346
346
  export function setIcon(details: TabIconDetails, callback: () => void): void;
347
347
 
348
348
  /**
349
- * Sets the html document to be opened as a popup when the user clicks on the action's icon.
349
+ * Sets the HTML document to be opened as a popup when the user clicks on the action's icon.
350
350
  *
351
351
  * Can return its result via Promise.
352
+ * @since Chrome 96
352
353
  */
353
354
  export function setPopup(details: PopupDetails): Promise<void>;
354
355
  export function setPopup(details: PopupDetails, callback: () => void): void;
@@ -1165,6 +1166,7 @@ declare namespace chrome {
1165
1166
  * Clears websites' cache storage data.
1166
1167
  *
1167
1168
  * Can return its result via Promise in Manifest V3 or later since Chrome 96.
1169
+ * @since Chrome 72
1168
1170
  */
1169
1171
  export function removeCacheStorage(options: RemovalOptions): Promise<void>;
1170
1172
  export function removeCacheStorage(options: RemovalOptions, callback: () => void): void;
@@ -2433,7 +2435,17 @@ declare namespace chrome {
2433
2435
  * Exactly one of `imageData` or `path` must be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in `imageData` is an `ImageData` object; for example, from a `canvas` element, while the image representation in `path` is the path to an image file relative to the extension's manifest. If `scale` screen pixels fit into a device-independent pixel, the `scale * n` icon is used. If that scale is missing, another image is resized to the required size.
2434
2436
  */
2435
2437
  export class SetIcon {
2436
- constructor(options?: { imageData?: ImageData | { [size: string]: ImageData } | undefined });
2438
+ constructor(
2439
+ options:
2440
+ | {
2441
+ imageData: ImageData | { [index: number]: ImageData };
2442
+ path?: string | { [index: number]: string } | undefined;
2443
+ }
2444
+ | {
2445
+ imageData?: ImageData | { [index: number]: ImageData } | undefined;
2446
+ path: string | { [index: number]: string };
2447
+ },
2448
+ );
2437
2449
  }
2438
2450
 
2439
2451
  /** Provides the Declarative Event API consisting of {@link events.Event.addRules addRules}, {@link events.Event.removeRules removeRules}, and {@link events.Event.getRules getRules}. */
@@ -3330,7 +3342,7 @@ declare namespace chrome {
3330
3342
  /** Indicates the data type of the option. The requested data type must match the real data type of the underlying option. */
3331
3343
  type: `${OptionType}`;
3332
3344
  /** Indicates the value to set. Leave unset to request automatic setting for options that have `autoSettable` enabled. The data type supplied for `value` must match `type`. */
3333
- value?: string | number | boolean | number;
3345
+ value?: string | number | boolean | number[];
3334
3346
  }
3335
3347
 
3336
3348
  /**
@@ -3560,6 +3572,8 @@ declare namespace chrome {
3560
3572
  /**
3561
3573
  * Performs a document scan and returns a Promise that resolves with a {@link ScanResults} object. If a callback is passed to this function, the returned data is passed to it instead.
3562
3574
  * @param options An object containing scan parameters.
3575
+ *
3576
+ * Can return its result via Promise in Manifest V3 or later since Chrome 96.
3563
3577
  */
3564
3578
  export function scan(options: ScanOptions): Promise<ScanResults>;
3565
3579
  export function scan(options: ScanOptions, callback: (result: ScanResults) => void): void;
@@ -4364,9 +4378,12 @@ declare namespace chrome {
4364
4378
  }
4365
4379
 
4366
4380
  /**
4367
- * Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, runtime.lastError will be set with a failure reason.
4381
+ * Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, {@link runtime.lastError} will be set with a failure reason.
4368
4382
  * @param callback Called with the device's default network's NetworkDetails.
4383
+ *
4384
+ * Can return its result via Promise in Manifest V3 or later since Chrome 96.
4369
4385
  */
4386
+ export function getNetworkDetails(): Promise<NetworkDetails>;
4370
4387
  export function getNetworkDetails(callback: (networkDetails: NetworkDetails) => void): void;
4371
4388
  }
4372
4389
 
@@ -6308,7 +6325,7 @@ declare namespace chrome {
6308
6325
  * This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile.
6309
6326
  * @param details Profile options.
6310
6327
  *
6311
- * Can return its result via Promise since Chrome 105.
6328
+ * Can return its result via Promise since Chrome 106.
6312
6329
  */
6313
6330
  export function getProfileUserInfo(details?: ProfileDetails): Promise<ProfileUserInfo>;
6314
6331
  export function getProfileUserInfo(
@@ -6323,7 +6340,7 @@ declare namespace chrome {
6323
6340
  * If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with `getAuthToken`.
6324
6341
  * @param details Token information.
6325
6342
  *
6326
- * Can return its result via Promise since Chrome 105.
6343
+ * Can return its result via Promise since Chrome 106.
6327
6344
  */
6328
6345
  export function removeCachedAuthToken(details: InvalidTokenDetails): Promise<void>;
6329
6346
  export function removeCachedAuthToken(details: InvalidTokenDetails, callback: () => void): void;
@@ -7911,7 +7928,7 @@ declare namespace chrome {
7911
7928
 
7912
7929
  export enum ClientCertificateType {
7913
7930
  ECDSA_SIGN = "ecdsaSign",
7914
- RAS_SIGN = "rasSign",
7931
+ RSA_SIGN = "rsaSign",
7915
7932
  }
7916
7933
 
7917
7934
  export interface SelectDetails {
@@ -8806,7 +8823,7 @@ declare namespace chrome {
8806
8823
  export type QueryInfo =
8807
8824
  & {
8808
8825
  /** String to query with the default search provider. */
8809
- text?: string | undefined;
8826
+ text: string;
8810
8827
  }
8811
8828
  & (
8812
8829
  | {
@@ -9247,36 +9264,37 @@ declare namespace chrome {
9247
9264
 
9248
9265
  export interface ManifestBase {
9249
9266
  // Required
9267
+ /** An integer specifying the version of the manifest file format that your extension uses. */
9250
9268
  manifest_version: number;
9269
+ /** A string that identifies the extension in the Chrome Web Store, the install dialog, and the user's Chrome Extensions page (`chrome://extensions`). The maximum length is 75 characters. */
9251
9270
  name: string;
9271
+ /** A string that identifies the extension's version number. */
9252
9272
  version: string;
9253
9273
 
9254
9274
  // Recommended
9275
+ /** A string that defines the default language of an extension that supports multiple locales. Examples include "en" and "pt_BR". This key is required in localized extensions, and must not be used in extensions that aren't localized. */
9255
9276
  default_locale?: string | undefined;
9277
+ /** A string that describes the extension on both the Chrome Web Store and the user's extension management page. The maximum length is 132 characters. */
9256
9278
  description?: string | undefined;
9279
+ /** One or more icons that represent your extension. */
9257
9280
  icons?: ManifestIcons | undefined;
9258
9281
 
9259
9282
  // Optional
9260
- author?: {
9261
- email: string;
9262
- } | undefined;
9263
- background_page?: string | undefined;
9283
+ /** @deprecated As of February 2024, the `author` key is no longer supported by Chrome or the Chrome Web Store. If present, it's silently ignored. */
9284
+ author?: { email: string } | undefined;
9285
+ /** Defines overrides for selected Chrome settings. */
9264
9286
  chrome_settings_overrides?: {
9265
9287
  homepage?: string | undefined;
9266
9288
  search_provider?: SearchProvider | undefined;
9267
9289
  startup_pages?: string[] | undefined;
9268
9290
  } | undefined;
9269
- chrome_ui_overrides?: {
9270
- bookmarks_ui?: {
9271
- remove_bookmark_shortcut?: boolean | undefined;
9272
- remove_button?: boolean | undefined;
9273
- } | undefined;
9274
- } | undefined;
9291
+ /** Defines overrides for default Chrome pages. */
9275
9292
  chrome_url_overrides?: {
9276
9293
  bookmarks?: string | undefined;
9277
9294
  history?: string | undefined;
9278
9295
  newtab?: string | undefined;
9279
9296
  } | undefined;
9297
+ /** Defines keyboard shortcuts within the extension. */
9280
9298
  commands?: {
9281
9299
  [name: string]: {
9282
9300
  suggested_key?: {
@@ -9294,38 +9312,30 @@ declare namespace chrome {
9294
9312
  matches?: string[] | undefined;
9295
9313
  permissions?: string[] | undefined;
9296
9314
  } | undefined;
9297
- content_scripts?:
9298
- | Array<{
9299
- matches?: string[] | undefined;
9300
- exclude_matches?: string[] | undefined;
9301
- css?: string[] | undefined;
9302
- js?: string[] | undefined;
9303
- run_at?: string | undefined;
9304
- all_frames?: boolean | undefined;
9305
- match_about_blank?: boolean | undefined;
9306
- include_globs?: string[] | undefined;
9307
- exclude_globs?: string[] | undefined;
9308
- }>
9309
- | undefined;
9310
9315
  converted_from_user_script?: boolean | undefined;
9316
+ /** Specifies a value for the Cross-Origin-Embedder-Policy HTTP header, which configures embedding of cross-origin resources in an extension page. */
9317
+ cross_origin_embedder_policy?: { value: string } | undefined;
9318
+ /** Specifies a value for the Cross-Origin-Opener-Policy HTTP header, which lets you ensure that a top-level extension page doesn't share a browsing context group with cross-origin documents. */
9319
+ cross_origin_opener_policy?: { value: string } | undefined;
9311
9320
  current_locale?: string | undefined;
9321
+ /** Defines static rules for the declarativeNetRequest API, which allows blocking and modifying of network requests. */
9322
+ declarative_net_request?: { rule_resources?: declarativeNetRequest.Ruleset[] } | undefined;
9323
+ /** Defines pages that use the DevTools APIs. */
9312
9324
  devtools_page?: string | undefined;
9313
9325
  event_rules?:
9314
9326
  | Array<{
9315
9327
  event?: string | undefined;
9316
- actions?:
9317
- | Array<{
9318
- type: string;
9319
- }>
9320
- | undefined;
9328
+ actions?: Array<{ type: string }> | undefined;
9321
9329
  conditions?: chrome.declarativeContent.PageStateMatcherProperties[] | undefined;
9322
9330
  }>
9323
9331
  | undefined;
9332
+ /** Specifies what other pages and extensions can connect to your extensions. */
9324
9333
  externally_connectable?: {
9325
9334
  ids?: string[] | undefined;
9326
9335
  matches?: string[] | undefined;
9327
9336
  accepts_tls_channel_id?: boolean | undefined;
9328
9337
  } | undefined;
9338
+ /** Provides access to the fileBrowserHandler API, which lets extensions access the ChromeOS file browser. */
9329
9339
  file_browser_handlers?:
9330
9340
  | Array<{
9331
9341
  id?: string | undefined;
@@ -9333,35 +9343,44 @@ declare namespace chrome {
9333
9343
  file_filters?: string[] | undefined;
9334
9344
  }>
9335
9345
  | undefined;
9346
+ /** Allows access to the fileSystemProvider API, which lets extensions create file systems that ChromeOS can use. */
9336
9347
  file_system_provider_capabilities?: {
9348
+ /** Whether configuring via onConfigureRequested is supported. By default: false. */
9337
9349
  configurable?: boolean | undefined;
9350
+ /** Whether setting watchers and notifying about changes is supported. By default: false. */
9338
9351
  watchable?: boolean | undefined;
9352
+ /** Whether multiple (more than one) mounted file systems are supported. By default: false. */
9339
9353
  multiple_mounts?: boolean | undefined;
9340
- source?: string | undefined;
9354
+ /** Files app uses above information in order to render related UI elements appropriately. For example, if `configurable` is set to true, then a menu item for configuring volumes will be rendered. Similarly, if `multiple_mounts` is set to true, then Files app will allow to add more than one mount points from the UI. If `watchable` is false, then a refresh button will be rendered. Note, that if possible you should add support for watchers, so changes on the file system can be reflected immediately and automatically. */
9355
+ source: "file" | "device" | "network";
9341
9356
  } | undefined;
9357
+ /** string specifying a URL for the extension's homepage. If this is undefined, the homepage defaults to the extension's Chrome Web Store page. This field is particularly useful if you host the extension on your own site. */
9342
9358
  homepage_url?: string | undefined;
9359
+ /** Allows resources to be imported into the extension. */
9343
9360
  import?:
9344
9361
  | Array<{
9345
9362
  id: string;
9346
9363
  minimum_version?: string | undefined;
9347
9364
  }>
9348
9365
  | undefined;
9349
- export?: {
9350
- whitelist?: string[] | undefined;
9351
- } | undefined;
9352
- incognito?: string | undefined;
9366
+ /** Allows resources to be exported from the extension. */
9367
+ export?: { allowlist?: string[] | undefined } | undefined;
9368
+ /** Defines how the extension behaves in incognito mode. */
9369
+ incognito?: "spanning" | "split" | "not_allowed" | undefined;
9370
+ /** Allows the use of the Input Method Editor API. */
9353
9371
  input_components?:
9354
9372
  | Array<{
9355
- name?: string | undefined;
9356
- type?: string | undefined;
9373
+ name: string;
9357
9374
  id?: string | undefined;
9358
- description?: string | undefined;
9359
9375
  language?: string[] | string | undefined;
9360
- layouts?: string[] | undefined;
9361
- indicator?: string | undefined;
9376
+ layouts?: string[] | string | undefined;
9377
+ input_view?: string | undefined;
9378
+ options_page?: string | undefined;
9362
9379
  }>
9363
9380
  | undefined;
9381
+ /** Specifies your extension's ID for various development use cases. */
9364
9382
  key?: string | undefined;
9383
+ /** Defines the oldest Chrome version that can install your extension. The value must be a substring of an existing Chrome browser version string, such as "107" or "107.0.5304.87". Users with versions of Chrome older than the minimum version see a "Not compatible" warning in the Chrome Web Store, and are unable to install your extension. If you add this to an existing extension, users whose Chrome version is older won't receive automatic updates to your extension. This includes business users in ephemeral mode. */
9365
9384
  minimum_chrome_version?: string | undefined;
9366
9385
  nacl_modules?:
9367
9386
  | Array<{
@@ -9369,53 +9388,39 @@ declare namespace chrome {
9369
9388
  mime_type: string;
9370
9389
  }>
9371
9390
  | undefined;
9391
+ /** Allows the use of an OAuth 2.0 security ID. The value of this key must be an object with "client_id" and "scopes" properties. */
9372
9392
  oauth2?: {
9373
9393
  client_id: string;
9374
9394
  scopes?: string[] | undefined;
9375
9395
  } | undefined;
9376
9396
  offline_enabled?: boolean | undefined;
9377
- omnibox?: {
9378
- keyword: string;
9379
- } | undefined;
9397
+ /** Allows the extension to register a keyword in Chrome's address bar. */
9398
+ omnibox?: { keyword: string } | undefined;
9399
+ /** Specifies a path to an options.html file for the extension to use as an options page. */
9380
9400
  options_page?: string | undefined;
9401
+ /** Specifies a path to an HTML file that lets a user change extension options from the Chrome Extensions page. */
9381
9402
  options_ui?: {
9382
- page?: string | undefined;
9383
- chrome_style?: boolean | undefined;
9384
- open_in_tab?: boolean | undefined;
9403
+ /** Path to the options page, relative to the extension's root. */
9404
+ page: string;
9405
+ /** Specify as `false` to declare an embedded options page. If `true`, the extension's options page will be opened in a new tab rather than embedded in `chrome://extensions`. */
9406
+ open_in_tab: boolean;
9385
9407
  } | undefined;
9386
- platforms?:
9387
- | Array<{
9388
- nacl_arch?: string | undefined;
9389
- sub_package_path: string;
9390
- }>
9391
- | undefined;
9392
- plugins?:
9393
- | Array<{
9394
- path: string;
9395
- }>
9396
- | undefined;
9408
+ /** Lists technologies required to use the extension. */
9397
9409
  requirements?: {
9398
- "3D"?: {
9399
- features?: string[] | undefined;
9400
- } | undefined;
9401
- plugins?: {
9402
- npapi?: boolean | undefined;
9403
- } | undefined;
9410
+ "3D"?: { features?: string[] | undefined } | undefined;
9411
+ /** @deprecated NPAPI Plugin support for extensions has been discontinued as of Chrome version 45 */
9412
+ plugins?: { npapi?: boolean | undefined } | undefined;
9404
9413
  } | undefined;
9414
+ /** Defines a set of extension pages that don't have access to extension APIs or direct access to non-sandboxed pages. */
9405
9415
  sandbox?: {
9406
9416
  pages: string[];
9407
9417
  content_security_policy?: string | undefined;
9408
9418
  } | undefined;
9419
+ /** A string containing a shortened version of the extension's name to be used when character space is limited. The maximum length is 12 characters. If this is undefined, a truncated version of the "name" key displays instead. */
9409
9420
  short_name?: string | undefined;
9410
- spellcheck?: {
9411
- dictionary_language?: string | undefined;
9412
- dictionary_locale?: string | undefined;
9413
- dictionary_format?: string | undefined;
9414
- dictionary_path?: string | undefined;
9415
- } | undefined;
9416
- storage?: {
9417
- managed_schema: string;
9418
- } | undefined;
9421
+ /** Declares a JSON schema for the managed storage area. */
9422
+ storage?: { managed_schema: string } | undefined;
9423
+ /** Registers the extension as a text to speech engine. */
9419
9424
  tts_engine?: {
9420
9425
  voices: Array<{
9421
9426
  voice_name: string;
@@ -9424,13 +9429,14 @@ declare namespace chrome {
9424
9429
  event_types?: string[] | undefined;
9425
9430
  }>;
9426
9431
  } | undefined;
9432
+ /** A string containing the URL of the extension's updates page. Use this key if you're hosting your extension outside the Chrome Web Store. */
9427
9433
  update_url?: string | undefined;
9434
+ /** A string describing the extension's version. Examples include "1.0 beta" and "build rc2". If this is unspecified, the "version" value displays on the extension management page instead. */
9428
9435
  version_name?: string | undefined;
9429
9436
  [key: string]: any;
9430
9437
  }
9431
9438
 
9432
9439
  export interface ManifestV2 extends ManifestBase {
9433
- // Required
9434
9440
  manifest_version: 2;
9435
9441
 
9436
9442
  // Pick one (or none)
@@ -9445,24 +9451,50 @@ declare namespace chrome {
9445
9451
  persistent?: boolean | undefined;
9446
9452
  }
9447
9453
  | undefined;
9454
+ /** Specifies JavaScript or CSS files to be used when the user opens certain web pages. */
9455
+ content_scripts?:
9456
+ | Array<{
9457
+ matches?: string[] | undefined;
9458
+ exclude_matches?: string[] | undefined;
9459
+ css?: string[] | undefined;
9460
+ js?: string[] | undefined;
9461
+ run_at?: string | undefined;
9462
+ all_frames?: boolean | undefined;
9463
+ match_about_blank?: boolean | undefined;
9464
+ include_globs?: string[] | undefined;
9465
+ exclude_globs?: string[] | undefined;
9466
+ }>
9467
+ | undefined;
9468
+ /** Defines restrictions on the scripts, styles, and other resources an extension can use. */
9448
9469
  content_security_policy?: string | undefined;
9470
+ /** Declares optional permissions for your extension. */
9449
9471
  optional_permissions?: (ManifestOptionalPermission | string)[] | undefined;
9472
+ /** Enables use of particular extension APIs. */
9450
9473
  permissions?: (ManifestPermission | string)[] | undefined;
9474
+ platforms?:
9475
+ | Array<{
9476
+ nacl_arch?: string | undefined;
9477
+ sub_package_path: string;
9478
+ }>
9479
+ | undefined;
9480
+ /** Defines files within the extension that can be accessed by web pages or other extensions. */
9451
9481
  web_accessible_resources?: string[] | undefined;
9452
9482
  }
9453
9483
 
9454
9484
  export interface ManifestV3 extends ManifestBase {
9455
- // Required
9456
9485
  manifest_version: 3;
9457
9486
 
9458
9487
  // Optional
9488
+ /** Defines the appearance and behavior of the extension's icon in the Google Toolbar. */
9459
9489
  action?: ManifestAction | undefined;
9490
+ /** Specifies the JavaScript file containing the extension's service worker, which acts as an event handler. */
9460
9491
  background?:
9461
9492
  | {
9462
9493
  service_worker: string;
9463
- type?: "module"; // If the service worker uses ES modules
9494
+ type?: "module";
9464
9495
  }
9465
9496
  | undefined;
9497
+ /** Specifies JavaScript or CSS files to be used when the user opens certain web pages. */
9466
9498
  content_scripts?:
9467
9499
  | Array<{
9468
9500
  matches?: string[] | undefined;
@@ -9477,14 +9509,35 @@ declare namespace chrome {
9477
9509
  world?: "ISOLATED" | "MAIN" | undefined;
9478
9510
  }>
9479
9511
  | undefined;
9512
+ /** Defines restrictions on the scripts, styles, and other resources an extension can use. */
9480
9513
  content_security_policy?: {
9481
9514
  extension_pages?: string;
9482
9515
  sandbox?: string;
9483
- };
9516
+ } | undefined;
9517
+ /** Specifies file types for ChromeOS extensions to handle. */
9518
+ file_handlers?:
9519
+ | Array<{
9520
+ /** Specifies an HTML file to show when a file is opened. The file must be within your extension. Processing the file, whether it's displayed or used in some other way, is done with JavaScript using appropriate web platform APIs. This code must be in a separate JavaScript file included via a `<script>` tag. */
9521
+ action: string;
9522
+ /** A user friendly description of the action. */
9523
+ name: string;
9524
+ /** The file types that can be processed by the page specified in "action". The items in the dictionary are a key/value pair where the key is a MIME type and the value is an array of file extensions. Only known MIME types are allowed for the key. Custom file types are allowed but the key for a custom type must be a known MIME type, and the mapping between the MIME type and the custom file type must be supported by the underlying operating system. */
9525
+ accept: { [mime_type: string]: string[] };
9526
+ /** Specifies whether multiple files should be opened in a single client or multiple clients. The default value is "single-client". */
9527
+ launch_type?: "multiple-clients" | "single-client" | undefined;
9528
+ }>
9529
+ | undefined;
9530
+ /** Lists the web pages your extension is allowed to interact with, defined using URL match patterns. User permission for these sites is requested at install time. */
9484
9531
  host_permissions?: string[] | undefined;
9532
+ /** Declares optional permissions for your extension. */
9485
9533
  optional_permissions?: ManifestOptionalPermission[] | undefined;
9534
+ /** Declares optional host permissions for your extension. */
9486
9535
  optional_host_permissions?: string[] | undefined;
9536
+ /** Enables use of particular extension APIs. */
9487
9537
  permissions?: ManifestPermission[] | undefined;
9538
+ /** Identifies an HTML file to display in a sidePanel. */
9539
+ side_panel?: { default_path: string } | undefined;
9540
+ /** Defines files within the extension that can be accessed by web pages or other extensions. */
9488
9541
  web_accessible_resources?:
9489
9542
  | Array<
9490
9543
  & {
@@ -12142,7 +12195,7 @@ declare namespace chrome {
12142
12195
  * Called when the list of {@link TtsVoice} that would be returned by getVoices has changed.
12143
12196
  * @since Chrome 124
12144
12197
  */
12145
- const onVoicesChanged: chrome.events.Event<() => void>;
12198
+ export const onVoicesChanged: chrome.events.Event<() => void>;
12146
12199
  }
12147
12200
 
12148
12201
  ////////////////////
@@ -13094,7 +13147,7 @@ declare namespace chrome {
13094
13147
  EXTRA_HEADERS = "extraHeaders",
13095
13148
  }
13096
13149
 
13097
- /** @since Chrome 44 */
13150
+ /** @since Chrome 79 */
13098
13151
  export enum OnErrorOccurredOptions {
13099
13152
  /** Specifies that headers can violate Cross-Origin Resource Sharing (CORS). */
13100
13153
  EXTRA_HEADERS = "extraHeaders",
@@ -13286,14 +13339,14 @@ declare namespace chrome {
13286
13339
  extends SetPartial<WebRequestDetails, "documentId" | "documentLifecycle" | "frameType">
13287
13340
  {
13288
13341
  /** Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'. */
13289
- requestBody: {
13342
+ requestBody?: {
13290
13343
  /** Errors when obtaining request body data. */
13291
13344
  error?: string;
13292
13345
  /** If the request method is POST and the body is a sequence of key-value pairs encoded in UTF8, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of another media type, or if it is malformed, the dictionary is not present. An example value of this dictionary is {'key': \['value1', 'value2'\]}. */
13293
13346
  formData?: { [key: string]: FormDataItem[] };
13294
13347
  /** If the request method is PUT or POST, and the body is not already parsed in formData, then the unparsed request body elements are contained in this array. */
13295
13348
  raw?: UploadData[];
13296
- } | undefined;
13349
+ };
13297
13350
  }
13298
13351
 
13299
13352
  export interface OnBeforeSendHeadersDetails extends WebRequestDetails {
@@ -14345,7 +14398,7 @@ declare namespace chrome {
14345
14398
  * The headers provided by a hypothetical response if the request does not get blocked or redirected before it is sent. Represented as an object which maps a header name to a list of string values. If not specified, the hypothetical response would return empty response headers, which can match rules which match on the non-existence of headers. E.g. `{"content-type": ["text/html; charset=utf-8", "multipart/form-data"]}`
14346
14399
  * @since Chrome 129
14347
14400
  */
14348
- responseHeaders?: { [name: string]: unknown };
14401
+ responseHeaders?: { [name: string]: string[] };
14349
14402
  /** The ID of the tab in which the hypothetical request takes place. Does not need to correspond to a real tab ID. Default is -1, meaning that the request isn't related to a tab. */
14350
14403
  tabId?: number;
14351
14404
  /**
@@ -14683,13 +14736,13 @@ declare namespace chrome {
14683
14736
  * Fired when the extension's side panel is closed.
14684
14737
  * @since Chrome 142
14685
14738
  */
14686
- const onClosed: events.Event<(info: PanelClosedInfo) => void>;
14739
+ export const onClosed: events.Event<(info: PanelClosedInfo) => void>;
14687
14740
 
14688
14741
  /**
14689
14742
  * Fired when the extension's side panel is opened.
14690
14743
  * @since Chrome 141
14691
14744
  */
14692
- const onOpened: events.Event<(info: PanelOpenedInfo) => void>;
14745
+ export const onOpened: events.Event<(info: PanelOpenedInfo) => void>;
14693
14746
  }
14694
14747
 
14695
14748
  ////////////////////
@@ -14795,7 +14848,7 @@ declare namespace chrome {
14795
14848
  /** Specifies wildcard patterns for pages this user script will be injected into. */
14796
14849
  includeGlobs?: string[] | undefined;
14797
14850
  /** The list of ScriptSource objects defining sources of scripts to be injected into matching pages. This property must be specified for {@link register}, and when specified it must be a non-empty array.*/
14798
- js: ScriptSource[];
14851
+ js?: ScriptSource[] | undefined;
14799
14852
  /** Specifies which pages this user script will be injected into. See Match Patterns for more details on the syntax of these strings. This property must be specified for {@link register}. */
14800
14853
  matches?: string[] | undefined;
14801
14854
  /** Specifies when JavaScript files are injected into the web page. The preferred and default value is `document_idle` */
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -94,6 +94,6 @@
94
94
  "@types/har-format": "*"
95
95
  },
96
96
  "peerDependencies": {},
97
- "typesPublisherContentHash": "c61640331b717ffedc21826f78c5f1415848bc89734b65b169e28ca4faff7337",
98
- "typeScriptVersion": "5.2"
97
+ "typesPublisherContentHash": "fd2522b1671848bcfa6826327996e9fd1bcb18b09b4986e50a662f0b75b92f91",
98
+ "typeScriptVersion": "5.3"
99
99
  }