@types/chrome 0.0.317 → 0.0.319

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 +61 -74
  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: Thu, 24 Apr 2025 16:02:45 GMT
11
+ * Last updated: Sun, 04 May 2025 20:34:17 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
@@ -7881,6 +7881,13 @@ declare namespace chrome {
7881
7881
  export function cancelJob(jobId: string): Promise<void>;
7882
7882
  export function cancelJob(jobId: string, callback: () => void): void;
7883
7883
 
7884
+ /**
7885
+ * Returns the status of the print job. This call will fail with a runtime error if the print job with the given `jobId` doesn't exist. `jobId`: The id of the print job to return the status of. This should be the same id received in a {@link SubmitJobResponse}.
7886
+ * @since Chrome 135
7887
+ */
7888
+ export function getJobStatus(jobId: string): Promise<`${JobStatus}`>;
7889
+ export function getJobStatus(jobId: string, callback: (status: `${JobStatus}`) => void): void;
7890
+
7884
7891
  /**
7885
7892
  * Returns the status and capabilities of the printer in CDD format. This call will fail with a runtime error if no printers with given id are installed.
7886
7893
  * Can return its result via Promise in Manifest V3 or later since Chrome 100.
@@ -7905,7 +7912,7 @@ declare namespace chrome {
7905
7912
  /**
7906
7913
  * Event fired when the status of the job is changed. This is only fired for the jobs created by this extension.
7907
7914
  */
7908
- export const onJobStatusChanged: chrome.events.Event<(jobId: string, status: JobStatus) => void>;
7915
+ export const onJobStatusChanged: chrome.events.Event<(jobId: string, status: `${JobStatus}`) => void>;
7909
7916
  }
7910
7917
 
7911
7918
  ////////////////////
@@ -12226,131 +12233,111 @@ declare namespace chrome {
12226
12233
  */
12227
12234
  export namespace tabGroups {
12228
12235
  /** An ID that represents the absence of a group. */
12229
- export var TAB_GROUP_ID_NONE: -1;
12236
+ export const TAB_GROUP_ID_NONE: -1;
12230
12237
 
12231
- export type ColorEnum = "grey" | "blue" | "red" | "yellow" | "green" | "pink" | "purple" | "cyan" | "orange";
12238
+ /** The group's color. */
12239
+ export enum Color {
12240
+ BLUE = "blue",
12241
+ CYAN = "cyan",
12242
+ GREEN = "green",
12243
+ GREY = "grey",
12244
+ ORANGE = "orange",
12245
+ PINK = "pink",
12246
+ PURPLE = "purple",
12247
+ RED = "red",
12248
+ YELLOW = "yellow",
12249
+ }
12232
12250
 
12233
12251
  export interface TabGroup {
12234
12252
  /** Whether the group is collapsed. A collapsed group is one whose tabs are hidden. */
12235
12253
  collapsed: boolean;
12236
12254
  /** The group's color. */
12237
- color: ColorEnum;
12255
+ color: `${Color}`;
12238
12256
  /** The ID of the group. Group IDs are unique within a browser session. */
12239
12257
  id: number;
12240
- /** Optional. The title of the group. */
12241
- title?: string | undefined;
12258
+ /** The title of the group. */
12259
+ title?: string;
12242
12260
  /** The ID of the window that contains the group. */
12243
12261
  windowId: number;
12244
12262
  }
12245
12263
 
12246
12264
  export interface MoveProperties {
12247
- /** The position to move the group to. Use -1 to place the group at the end of the window. */
12265
+ /** The position to move the group to. Use `-1` to place the group at the end of the window. */
12248
12266
  index: number;
12249
- /** Optional. The window to move the group to. Defaults to the window the group is currently in. Note that groups can only be moved to and from windows with chrome.windows.WindowType type "normal". */
12250
- windowId?: number | undefined;
12267
+ /** The window to move the group to. Defaults to the window the group is currently in. Note that groups can only be moved to and from windows with {@link windows.windowTypeEnum windows.windowType} type `"normal"`. */
12268
+ windowId?: number;
12251
12269
  }
12252
12270
 
12253
12271
  export interface QueryInfo {
12254
- /** Optional. Whether the groups are collapsed. */
12255
- collapsed?: boolean | undefined;
12256
- /** Optional. The color of the groups. */
12257
- color?: ColorEnum | undefined;
12258
- /** Optional. Match group titles against a pattern. */
12259
- title?: string | undefined;
12260
- /** Optional. The ID of the window that contains the group. */
12261
- windowId?: number | undefined;
12272
+ /** Whether the groups are collapsed. */
12273
+ collapsed?: boolean;
12274
+ /** The color of the groups. */
12275
+ color?: `${Color}`;
12276
+ /** Match group titles against a pattern. */
12277
+ title?: string;
12278
+ /** The ID of the parent window, or {@link windows.WINDOW_ID_CURRENT} for the current window. */
12279
+ windowId?: number;
12262
12280
  }
12263
12281
 
12264
12282
  export interface UpdateProperties {
12265
- /** Optional. Whether the group should be collapsed. */
12266
- collapsed?: boolean | undefined;
12267
- /** Optional. The color of the group. */
12268
- color?: ColorEnum | undefined;
12269
- /** Optional. The title of the group. */
12270
- title?: string | undefined;
12283
+ /** Whether the group should be collapsed. */
12284
+ collapsed?: boolean;
12285
+ /** The color of the group. */
12286
+ color?: `${Color}`;
12287
+ /** The title of the group. */
12288
+ title?: string;
12271
12289
  }
12272
12290
 
12273
12291
  /**
12274
12292
  * Retrieves details about the specified group.
12275
- * @param groupId The ID of the tab group.
12276
- * @param callback Called with the retrieved tab group.
12277
- */
12278
- export function get(groupId: number, callback: (group: TabGroup) => void): void;
12279
-
12280
- /**
12281
- * Retrieves details about the specified group.
12282
- * @param groupId The ID of the tab group.
12283
- * @return The `get` method provides its result via callback or returned as a `Promise` (MV3 only).
12293
+ *
12294
+ * Can return its result via Promise since Chrome 90.
12284
12295
  */
12285
12296
  export function get(groupId: number): Promise<TabGroup>;
12297
+ export function get(groupId: number, callback: (group: TabGroup) => void): void;
12286
12298
 
12287
12299
  /**
12288
12300
  * Moves the group and all its tabs within its window, or to a new window.
12289
12301
  * @param groupId The ID of the group to move.
12290
- * @param moveProperties Information on how to move the group.
12291
- * @return The `move` method provides its result via callback or returned as a `Promise` (MV3 only).
12292
- */
12293
- export function move(groupId: number, moveProperties: MoveProperties): Promise<TabGroup>;
12294
-
12295
- /**
12296
- * Moves the group and all its tabs within its window, or to a new window.
12297
- * @param groupId The ID of the group to move.
12298
- * @param moveProperties Information on how to move the group.
12299
- * @param callback Optional.
12302
+ *
12303
+ * Can return its result via Promise since Chrome 90.
12300
12304
  */
12305
+ export function move(groupId: number, moveProperties: MoveProperties): Promise<TabGroup | undefined>;
12301
12306
  export function move(
12302
12307
  groupId: number,
12303
12308
  moveProperties: MoveProperties,
12304
- callback: (group: TabGroup) => void,
12309
+ callback: (group?: TabGroup) => void,
12305
12310
  ): void;
12306
12311
 
12307
12312
  /**
12308
12313
  * Gets all groups that have the specified properties, or all groups if no properties are specified.
12309
- * @param queryInfo Object with search parameters.
12310
- * @param callback Called with retrieved tab groups.
12311
- */
12312
- export function query(queryInfo: QueryInfo, callback: (result: TabGroup[]) => void): void;
12313
-
12314
- /**
12315
- * Gets all groups that have the specified properties, or all groups if no properties are specified.
12316
- * @param queryInfo Object with search parameters.
12317
- * @return The `query` method provides its result via callback or returned as a `Promise` (MV3 only).
12314
+ *
12315
+ * Can return its result via Promise since Chrome 90.
12318
12316
  */
12319
12317
  export function query(queryInfo: QueryInfo): Promise<TabGroup[]>;
12318
+ export function query(queryInfo: QueryInfo, callback: (result: TabGroup[]) => void): void;
12320
12319
 
12321
12320
  /**
12322
- * Modifies the properties of a group. Properties that are not specified in updateProperties are not modified.
12323
- * @param groupId The ID of the group to modify.
12324
- * @param updateProperties Information on how to update the group.
12325
- * @return The `update` method provides its result via callback or returned as a `Promise` (MV3 only).
12326
- */
12327
- export function update(groupId: number, updateProperties: UpdateProperties): Promise<TabGroup>;
12328
-
12329
- /**
12330
- * Modifies the properties of a group. Properties that are not specified in updateProperties are not modified.
12321
+ * Modifies the properties of a group. Properties that are not specified in `updateProperties` are not modified.
12331
12322
  * @param groupId The ID of the group to modify.
12332
- * @param updateProperties Information on how to update the group.
12333
- * @param callback Optional.
12323
+ *
12324
+ * Can return its result via Promise since Chrome 90.
12334
12325
  */
12326
+ export function update(groupId: number, updateProperties: UpdateProperties): Promise<TabGroup | undefined>;
12335
12327
  export function update(
12336
12328
  groupId: number,
12337
12329
  updateProperties: UpdateProperties,
12338
- callback: (group: TabGroup) => void,
12330
+ callback: (group?: TabGroup) => void,
12339
12331
  ): void;
12340
12332
 
12341
- export interface TabGroupCreatedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
12342
- export interface TabGroupMovedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
12343
- export interface TabGroupRemovedEvent extends chrome.events.Event<(group: TabGroup) => void> {}
12344
- export interface TabGroupUpdated extends chrome.events.Event<(group: TabGroup) => void> {}
12345
-
12346
12333
  /** Fired when a group is created. */
12347
- export var onCreated: TabGroupCreatedEvent;
12334
+ export const onCreated: events.Event<(group: TabGroup) => void>;
12348
12335
  /** Fired when a group is moved within a window. Move events are still fired for the individual tabs within the group, as well as for the group itself. This event is not fired when a group is moved between windows; instead, it will be removed from one window and created in another. */
12349
- export var onMoved: TabGroupMovedEvent;
12350
- /** Fired when a group is closed, either directly by the user or automatically because it contained zero. */
12351
- export var onRemoved: TabGroupRemovedEvent;
12336
+ export const onMoved: events.Event<(group: TabGroup) => void>;
12337
+ /** Fired when a group is closed, either directly by the user or automatically because it contained zero tabs. */
12338
+ export const onRemoved: events.Event<(group: TabGroup) => void>;
12352
12339
  /** Fired when a group is updated. */
12353
- export var onUpdated: TabGroupUpdated;
12340
+ export const onUpdated: events.Event<(group: TabGroup) => void>;
12354
12341
  }
12355
12342
 
12356
12343
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.317",
3
+ "version": "0.0.319",
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": "51383207b6d9937576adc2f632282ec8fd885e1ba1012d8b479079f2640cc452",
97
+ "typesPublisherContentHash": "5b84f59dbd2c9c131afffbd07c9297dd648ea3d02b07634fa0b450b0e0715363",
98
98
  "typeScriptVersion": "5.1"
99
99
  }