@types/chrome 0.2.2 → 0.2.3

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 +25 -11
  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, 01 Jul 2026 21:01:32 GMT
11
+ * Last updated: Fri, 31 Jul 2026 18:57:11 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
@@ -179,14 +179,25 @@ declare namespace chrome {
179
179
  popup: string;
180
180
  }
181
181
 
182
- interface TabIconDetails {
183
- /** 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` \* n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}' */
184
- path?: string | { [index: number]: string } | undefined;
185
- /** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
186
- tabId?: number | undefined;
187
- /** Either an ImageData object or a dictionary {size -> ImageData} representing 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` \* n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}' */
188
- imageData?: ImageData | { [index: number]: ImageData } | undefined;
189
- }
182
+ type TabIconDetails =
183
+ & {
184
+ /** Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
185
+ tabId?: number | null | undefined;
186
+ }
187
+ & (
188
+ | {
189
+ /** Either an ImageData object or a dictionary {size -> ImageData} representing an icon to be set. If the icon is specified as a dictionary, the image used is chosen depending on the screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then an image with size `scale` \* n is selected, where _n_ is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}' */
190
+ imageData: ImageData | { [index: number]: ImageData };
191
+ /** Either a relative image path or a dictionary {size -> relative image path} pointing to an icon to be set. If the icon is specified as a dictionary, the image used is chosen depending on the screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then an image with size `scale` \* n is selected, where _n_ is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}' */
192
+ path?: string | { [index: string]: string } | undefined;
193
+ }
194
+ | {
195
+ /** Either an ImageData object or a dictionary {size -> ImageData} representing an icon to be set. If the icon is specified as a dictionary, the image used is chosen depending on the screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then an image with size `scale` \* n is selected, where _n_ is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}' */
196
+ imageData?: ImageData | { [index: number]: ImageData } | undefined;
197
+ /** Either a relative image path or a dictionary {size -> relative image path} pointing to an icon to be set. If the icon is specified as a dictionary, the image used is chosen depending on the screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then an image with size `scale` \* n is selected, where _n_ is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}' */
198
+ path: string | { [index: string]: string };
199
+ }
200
+ );
190
201
 
191
202
  /** @since Chrome 99 */
192
203
  interface OpenPopupOptions {
@@ -11145,7 +11156,7 @@ declare namespace chrome {
11145
11156
  * The last time the tab became active in its window as the number of milliseconds since epoch.
11146
11157
  * @since Chrome 121
11147
11158
  */
11148
- lastAccessed?: number | undefined;
11159
+ lastAccessed: number;
11149
11160
  }
11150
11161
 
11151
11162
  /** The tab's loading status. */
@@ -11715,8 +11726,11 @@ declare namespace chrome {
11715
11726
  function insertCSS(details: extensionTypes.InjectDetails): Promise<void>;
11716
11727
  function insertCSS(tabId: number | undefined, details: extensionTypes.InjectDetails): Promise<void>;
11717
11728
  function insertCSS(details: extensionTypes.InjectDetails, callback: () => void): void;
11718
- function insertCSS(tabId: number | undefined, details: extensionTypes.InjectDetails): Promise<void>;
11719
- function insertCSS(tabId: number, details: extensionTypes.InjectDetails, callback: () => void): void;
11729
+ function insertCSS(
11730
+ tabId: number | undefined,
11731
+ details: extensionTypes.InjectDetails,
11732
+ callback: () => void,
11733
+ ): void;
11720
11734
 
11721
11735
  /**
11722
11736
  * Highlights the given tabs and focuses on the first of group. Will appear to do nothing if the specified tab is currently active.
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
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": "0d223956ef9cea82c44d7fd4098f895ea9af206ae06ba356723fa7280327552c",
97
+ "typesPublisherContentHash": "ff9fd6a75d5a0fb1a820459a7cb327ab7a136081a6541208dd3710ddff3bbff2",
98
98
  "typeScriptVersion": "5.6"
99
99
  }