@types/chrome 0.0.317 → 0.0.318
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.
- chrome/README.md +1 -1
- chrome/index.d.ts +53 -73
- 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,
|
11
|
+
* Last updated: Thu, 01 May 2025 18:02:33 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
@@ -12226,131 +12226,111 @@ declare namespace chrome {
|
|
12226
12226
|
*/
|
12227
12227
|
export namespace tabGroups {
|
12228
12228
|
/** An ID that represents the absence of a group. */
|
12229
|
-
export
|
12229
|
+
export const TAB_GROUP_ID_NONE: -1;
|
12230
12230
|
|
12231
|
-
|
12231
|
+
/** The group's color. */
|
12232
|
+
export enum Color {
|
12233
|
+
BLUE = "blue",
|
12234
|
+
CYAN = "cyan",
|
12235
|
+
GREEN = "green",
|
12236
|
+
GREY = "grey",
|
12237
|
+
ORANGE = "orange",
|
12238
|
+
PINK = "pink",
|
12239
|
+
PURPLE = "purple",
|
12240
|
+
RED = "red",
|
12241
|
+
YELLOW = "yellow",
|
12242
|
+
}
|
12232
12243
|
|
12233
12244
|
export interface TabGroup {
|
12234
12245
|
/** Whether the group is collapsed. A collapsed group is one whose tabs are hidden. */
|
12235
12246
|
collapsed: boolean;
|
12236
12247
|
/** The group's color. */
|
12237
|
-
color:
|
12248
|
+
color: `${Color}`;
|
12238
12249
|
/** The ID of the group. Group IDs are unique within a browser session. */
|
12239
12250
|
id: number;
|
12240
|
-
/**
|
12241
|
-
title?: string
|
12251
|
+
/** The title of the group. */
|
12252
|
+
title?: string;
|
12242
12253
|
/** The ID of the window that contains the group. */
|
12243
12254
|
windowId: number;
|
12244
12255
|
}
|
12245
12256
|
|
12246
12257
|
export interface MoveProperties {
|
12247
|
-
/** The position to move the group to. Use
|
12258
|
+
/** The position to move the group to. Use `-1` to place the group at the end of the window. */
|
12248
12259
|
index: number;
|
12249
|
-
/**
|
12250
|
-
windowId?: number
|
12260
|
+
/** 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"`. */
|
12261
|
+
windowId?: number;
|
12251
12262
|
}
|
12252
12263
|
|
12253
12264
|
export interface QueryInfo {
|
12254
|
-
/**
|
12255
|
-
collapsed?: boolean
|
12256
|
-
/**
|
12257
|
-
color?:
|
12258
|
-
/**
|
12259
|
-
title?: string
|
12260
|
-
/**
|
12261
|
-
windowId?: number
|
12265
|
+
/** Whether the groups are collapsed. */
|
12266
|
+
collapsed?: boolean;
|
12267
|
+
/** The color of the groups. */
|
12268
|
+
color?: `${Color}`;
|
12269
|
+
/** Match group titles against a pattern. */
|
12270
|
+
title?: string;
|
12271
|
+
/** The ID of the parent window, or {@link windows.WINDOW_ID_CURRENT} for the current window. */
|
12272
|
+
windowId?: number;
|
12262
12273
|
}
|
12263
12274
|
|
12264
12275
|
export interface UpdateProperties {
|
12265
|
-
/**
|
12266
|
-
collapsed?: boolean
|
12267
|
-
/**
|
12268
|
-
color?:
|
12269
|
-
/**
|
12270
|
-
title?: string
|
12276
|
+
/** Whether the group should be collapsed. */
|
12277
|
+
collapsed?: boolean;
|
12278
|
+
/** The color of the group. */
|
12279
|
+
color?: `${Color}`;
|
12280
|
+
/** The title of the group. */
|
12281
|
+
title?: string;
|
12271
12282
|
}
|
12272
12283
|
|
12273
12284
|
/**
|
12274
12285
|
* Retrieves details about the specified group.
|
12275
|
-
*
|
12276
|
-
*
|
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).
|
12286
|
+
*
|
12287
|
+
* Can return its result via Promise since Chrome 90.
|
12284
12288
|
*/
|
12285
12289
|
export function get(groupId: number): Promise<TabGroup>;
|
12290
|
+
export function get(groupId: number, callback: (group: TabGroup) => void): void;
|
12286
12291
|
|
12287
12292
|
/**
|
12288
12293
|
* Moves the group and all its tabs within its window, or to a new window.
|
12289
12294
|
* @param groupId The ID of the group to move.
|
12290
|
-
*
|
12291
|
-
*
|
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.
|
12295
|
+
*
|
12296
|
+
* Can return its result via Promise since Chrome 90.
|
12300
12297
|
*/
|
12298
|
+
export function move(groupId: number, moveProperties: MoveProperties): Promise<TabGroup | undefined>;
|
12301
12299
|
export function move(
|
12302
12300
|
groupId: number,
|
12303
12301
|
moveProperties: MoveProperties,
|
12304
|
-
callback: (group
|
12302
|
+
callback: (group?: TabGroup) => void,
|
12305
12303
|
): void;
|
12306
12304
|
|
12307
12305
|
/**
|
12308
12306
|
* Gets all groups that have the specified properties, or all groups if no properties are specified.
|
12309
|
-
*
|
12310
|
-
*
|
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).
|
12307
|
+
*
|
12308
|
+
* Can return its result via Promise since Chrome 90.
|
12318
12309
|
*/
|
12319
12310
|
export function query(queryInfo: QueryInfo): Promise<TabGroup[]>;
|
12311
|
+
export function query(queryInfo: QueryInfo, callback: (result: TabGroup[]) => void): void;
|
12320
12312
|
|
12321
12313
|
/**
|
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.
|
12314
|
+
* Modifies the properties of a group. Properties that are not specified in `updateProperties` are not modified.
|
12331
12315
|
* @param groupId The ID of the group to modify.
|
12332
|
-
*
|
12333
|
-
*
|
12316
|
+
*
|
12317
|
+
* Can return its result via Promise since Chrome 90.
|
12334
12318
|
*/
|
12319
|
+
export function update(groupId: number, updateProperties: UpdateProperties): Promise<TabGroup | undefined>;
|
12335
12320
|
export function update(
|
12336
12321
|
groupId: number,
|
12337
12322
|
updateProperties: UpdateProperties,
|
12338
|
-
callback: (group
|
12323
|
+
callback: (group?: TabGroup) => void,
|
12339
12324
|
): void;
|
12340
12325
|
|
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
12326
|
/** Fired when a group is created. */
|
12347
|
-
export
|
12327
|
+
export const onCreated: events.Event<(group: TabGroup) => void>;
|
12348
12328
|
/** 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
|
12350
|
-
/** Fired when a group is closed, either directly by the user or automatically because it contained zero. */
|
12351
|
-
export
|
12329
|
+
export const onMoved: events.Event<(group: TabGroup) => void>;
|
12330
|
+
/** Fired when a group is closed, either directly by the user or automatically because it contained zero tabs. */
|
12331
|
+
export const onRemoved: events.Event<(group: TabGroup) => void>;
|
12352
12332
|
/** Fired when a group is updated. */
|
12353
|
-
export
|
12333
|
+
export const onUpdated: events.Event<(group: TabGroup) => void>;
|
12354
12334
|
}
|
12355
12335
|
|
12356
12336
|
////////////////////
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.318",
|
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": "
|
97
|
+
"typesPublisherContentHash": "39dd572dde0a000c6672487393ec0207178f22f69917ac341a5a2843835d7130",
|
98
98
|
"typeScriptVersion": "5.1"
|
99
99
|
}
|