@types/chrome 0.3.6 → 0.3.7

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 +23 -26
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 21 Oct 2026 06:51:40 GMT
11
+ * Last updated: Tue, 27 Oct 2026 21:32:13 GMT
12
12
  * Dependencies: [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
 
14
14
  # Credits
chrome/index.d.ts CHANGED
@@ -11256,10 +11256,9 @@ declare namespace chrome {
11256
11256
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11257
11257
  * @param flags Options affecting how the information is returned.
11258
11258
  */
11259
+ function getInfo(flags?: GetInfoFlags): Promise<DisplayUnitInfo[]>;
11259
11260
  function getInfo(callback: (displayInfo: DisplayUnitInfo[]) => void): void;
11260
- function getInfo(flags: GetInfoFlags, callback: (displayInfo: DisplayUnitInfo[]) => void): void;
11261
- function getInfo(): Promise<DisplayUnitInfo[]>;
11262
- function getInfo(flags: GetInfoFlags): Promise<DisplayUnitInfo[]>;
11261
+ function getInfo(flags: GetInfoFlags | undefined, callback: (displayInfo: DisplayUnitInfo[]) => void): void;
11263
11262
 
11264
11263
  /**
11265
11264
  * Requests the layout info for all displays
@@ -11268,8 +11267,8 @@ declare namespace chrome {
11268
11267
  * @platform ChromeOS only
11269
11268
  * @since Chrome 53
11270
11269
  */
11271
- function getDisplayLayout(callback: (layouts: DisplayLayout[]) => void): void;
11272
11270
  function getDisplayLayout(): Promise<DisplayLayout[]>;
11271
+ function getDisplayLayout(callback: (layouts: DisplayLayout[]) => void): void;
11273
11272
 
11274
11273
  /**
11275
11274
  * Updates the properties for the display specified by `id`, according to the information provided in `info`. On failure, {@link runtime.lastError} will be set.
@@ -11279,8 +11278,8 @@ declare namespace chrome {
11279
11278
  * @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in `info`.
11280
11279
  * @platform ChromeOS only
11281
11280
  */
11282
- function setDisplayProperties(id: string, info: DisplayProperties, callback: () => void): void;
11283
11281
  function setDisplayProperties(id: string, info: DisplayProperties): Promise<void>;
11282
+ function setDisplayProperties(id: string, info: DisplayProperties, callback: () => void): void;
11284
11283
 
11285
11284
  /**
11286
11285
  * Set the layout for all displays. display not included will use the default layout. If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout. After layout is resolved, an onDisplayChanged event will be triggered.
@@ -11290,8 +11289,8 @@ declare namespace chrome {
11290
11289
  * @platform ChromeOS only
11291
11290
  * @since Chrome 53
11292
11291
  */
11293
- function setDisplayLayout(layouts: DisplayLayout[], callback: () => void): void;
11294
11292
  function setDisplayLayout(layouts: DisplayLayout[]): Promise<void>;
11293
+ function setDisplayLayout(layouts: DisplayLayout[], callback: () => void): void;
11295
11294
 
11296
11295
  /**
11297
11296
  * Enables/disables the unified desktop feature. If enabled while mirroring is active, the desktop mode will not change until mirroring is turned off. Otherwise, the desktop mode will switch to unified immediately.
@@ -11342,8 +11341,8 @@ declare namespace chrome {
11342
11341
  * @platform ChromeOS only
11343
11342
  * @since Chrome 57
11344
11343
  */
11345
- function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void;
11346
11344
  function showNativeTouchCalibration(id: string): Promise<boolean>;
11345
+ function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void;
11347
11346
 
11348
11347
  /**
11349
11348
  * Starts custom touch calibration for a display. This should be called when using a custom UX for collecting calibration data. If another touch calibration is already in progress this will throw an error.
@@ -11378,11 +11377,11 @@ declare namespace chrome {
11378
11377
  * @platform ChromeOS only
11379
11378
  * @since Chrome 65
11380
11379
  */
11381
- function setMirrorMode(info: MirrorModeInfo, callback: () => void): void;
11382
11380
  function setMirrorMode(info: MirrorModeInfo): Promise<void>;
11381
+ function setMirrorMode(info: MirrorModeInfo, callback: () => void): void;
11383
11382
 
11384
11383
  /** Fired when anything changes to the display configuration. */
11385
- const onDisplayChanged: chrome.events.Event<() => void>;
11384
+ const onDisplayChanged: events.Event<() => void>;
11386
11385
  }
11387
11386
 
11388
11387
  ////////////////////
@@ -11673,7 +11672,7 @@ declare namespace chrome {
11673
11672
  * An ID that represents the absence of a split tab.
11674
11673
  * @since Chrome 140
11675
11674
  */
11676
- const SPLIT_VIEW_ID_NONE: -1;
11675
+ const SPLIT_VIEW_ID_NONE = -1;
11677
11676
 
11678
11677
  /**
11679
11678
  * An ID that represents the absence of a browser tab.
@@ -11765,7 +11764,7 @@ declare namespace chrome {
11765
11764
  * Open a port to a specific document identified by `documentId` instead of all frames in the tab.
11766
11765
  * @since Chrome 106
11767
11766
  */
11768
- documentId?: string;
11767
+ documentId?: string | undefined;
11769
11768
  }
11770
11769
 
11771
11770
  interface MessageSendOptions {
@@ -11775,7 +11774,7 @@ declare namespace chrome {
11775
11774
  * Send a message to a specific document identified by `documentId` instead of all frames in the tab.
11776
11775
  * @since Chrome 106
11777
11776
  */
11778
- documentId?: string;
11777
+ documentId?: string | undefined;
11779
11778
  }
11780
11779
 
11781
11780
  interface GroupOptions {
@@ -11787,7 +11786,7 @@ declare namespace chrome {
11787
11786
  /** The ID of the group to add the tabs to. If not specified, a new group will be created. */
11788
11787
  groupId?: number | undefined;
11789
11788
  /** The tab ID or list of tab IDs to add to the specified group. */
11790
- tabIds?: number | [number, ...number[]] | undefined;
11789
+ tabIds: number | [number, ...number[]];
11791
11790
  }
11792
11791
 
11793
11792
  interface HighlightInfo {
@@ -12101,18 +12100,17 @@ declare namespace chrome {
12101
12100
  * Can return its result via Promise in Manifest V3 or later since Chrome 88.
12102
12101
  * @param windowId The target window. Defaults to the current window.
12103
12102
  */
12104
- function captureVisibleTab(): Promise<string>;
12105
- function captureVisibleTab(windowId: number): Promise<string>;
12103
+ function captureVisibleTab(windowId?: number): Promise<string>;
12106
12104
  function captureVisibleTab(options: extensionTypes.ImageDetails): Promise<string>;
12107
- function captureVisibleTab(windowId: number, options: extensionTypes.ImageDetails): Promise<string>;
12105
+ function captureVisibleTab(windowId: number | undefined, options: extensionTypes.ImageDetails): Promise<string>;
12108
12106
  function captureVisibleTab(callback: (dataUrl: string) => void): void;
12109
- function captureVisibleTab(windowId: number, callback: (dataUrl: string) => void): void;
12107
+ function captureVisibleTab(windowId: number | undefined, callback: (dataUrl: string) => void): void;
12110
12108
  function captureVisibleTab(
12111
12109
  options: extensionTypes.ImageDetails,
12112
12110
  callback: (dataUrl: string) => void,
12113
12111
  ): void;
12114
12112
  function captureVisibleTab(
12115
- windowId: number,
12113
+ windowId: number | undefined,
12116
12114
  options: extensionTypes.ImageDetails,
12117
12115
  callback: (dataUrl: string) => void,
12118
12116
  ): void;
@@ -12123,10 +12121,9 @@ declare namespace chrome {
12123
12121
  * Can return its result via Promise in Manifest V3 or later since Chrome 88.
12124
12122
  * @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
12125
12123
  */
12126
- function reload(): Promise<void>;
12127
- function reload(tabId: number): Promise<void>;
12124
+ function reload(tabId?: number): Promise<void>;
12128
12125
  function reload(reloadProperties: ReloadProperties): Promise<void>;
12129
- function reload(tabId: number, reloadProperties: ReloadProperties): Promise<void>;
12126
+ function reload(tabId: number | undefined, reloadProperties: ReloadProperties): Promise<void>;
12130
12127
  function reload(callback: () => void): void;
12131
12128
  function reload(tabId: number | undefined, callback: () => void): void;
12132
12129
  function reload(reloadProperties: ReloadProperties | undefined, callback: () => void): void;
@@ -12633,7 +12630,7 @@ declare namespace chrome {
12633
12630
  */
12634
12631
  interface TtsOptions {
12635
12632
  /** The TTS event types that you are interested in listening to. If missing, all event types may be sent. */
12636
- desiredEventTypes?: string[];
12633
+ desiredEventTypes?: `${EventType}`[];
12637
12634
  /** If true, enqueues this utterance if TTS is already in progress. If false (the default), interrupts any current speech and flushes the speech queue before speaking this new utterance. */
12638
12635
  enqueue?: boolean;
12639
12636
  /** The extension ID of the speech engine to use, if known. */
@@ -12650,7 +12647,7 @@ declare namespace chrome {
12650
12647
  /** Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. Values below 0.1 or above 10.0 are strictly disallowed, but many voices will constrain the minimum and maximum rates further—for example a particular voice may not actually speak faster than 3 times normal even if you specify a value larger than 3.0. */
12651
12648
  rate?: number;
12652
12649
  /** The TTS event types the voice must support. */
12653
- requiredEventTypes?: string[];
12650
+ requiredEventTypes?: `${EventType}`[];
12654
12651
  /** The name of the voice to use for synthesis. If empty, uses any available voice. */
12655
12652
  voiceName?: string;
12656
12653
  /** Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0. */
@@ -12723,7 +12720,7 @@ declare namespace chrome {
12723
12720
  */
12724
12721
  function speak(utterance: string, options?: TtsOptions): Promise<void>;
12725
12722
  function speak(utterance: string, callback: () => void): void;
12726
- function speak(utterance: string, options: TtsOptions, callback: () => void): void;
12723
+ function speak(utterance: string, options: TtsOptions | undefined, callback: () => void): void;
12727
12724
 
12728
12725
  /** Stops any current speech and flushes the queue of any pending utterances. In addition, if speech was paused, it will now be un-paused for the next call to speak. */
12729
12726
  function stop(): void;
@@ -12732,7 +12729,7 @@ declare namespace chrome {
12732
12729
  * Called when the list of {@link TtsVoice} that would be returned by getVoices has changed.
12733
12730
  * @since Chrome 124
12734
12731
  */
12735
- const onVoicesChanged: chrome.events.Event<() => void>;
12732
+ const onVoicesChanged: events.Event<() => void>;
12736
12733
  }
12737
12734
 
12738
12735
  ////////////////////
@@ -13603,7 +13600,7 @@ declare namespace chrome {
13603
13600
  /** Value of the HTTP header if it can be represented by UTF-8. */
13604
13601
  value?: string | undefined;
13605
13602
  /** Value of the HTTP header if it cannot be represented by UTF-8, stored as individual byte values (0..255). */
13606
- binaryValue?: ArrayBuffer | undefined;
13603
+ binaryValue?: number[] | undefined;
13607
13604
  }
13608
13605
 
13609
13606
  /** Returns value for event handlers that have the 'blocking' extraInfoSpec applied. Allows the event handler to modify network requests. */
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -53,6 +53,6 @@
53
53
  "@types/har-format": "*"
54
54
  },
55
55
  "peerDependencies": {},
56
- "typesPublisherContentHash": "5c46d3916b5b2099f0c716d0e5c18fc8b756c5319798989f5e6469e3e4fcc9b6",
56
+ "typesPublisherContentHash": "04be780c18c40fd1e1d83c370748e7715dfb9c993e5a0df0ba3bac21fde676ca",
57
57
  "typeScriptVersion": "5.6"
58
58
  }