@types/chrome 0.0.300 → 0.0.302
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 +135 -9
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Fri, 07 Feb 2025 19:02:24 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
@@ -7596,6 +7596,116 @@ declare namespace chrome {
|
|
7596
7596
|
export var onProxyError: ProxyErrorEvent;
|
7597
7597
|
}
|
7598
7598
|
|
7599
|
+
////////////////////
|
7600
|
+
// ReadingList
|
7601
|
+
////////////////////
|
7602
|
+
/**
|
7603
|
+
* Use the `chrome.readingList` API to read from and modify the items in the Reading List.
|
7604
|
+
*
|
7605
|
+
* Permissions: "readingList"
|
7606
|
+
* @since Chrome 120, MV3
|
7607
|
+
*/
|
7608
|
+
export namespace readingList {
|
7609
|
+
export interface AddEntryOptions {
|
7610
|
+
/** Will be `true` if the entry has been read. */
|
7611
|
+
hasBeenRead: boolean;
|
7612
|
+
/** The title of the entry. */
|
7613
|
+
title: string;
|
7614
|
+
/** The url of the entry. */
|
7615
|
+
url: string;
|
7616
|
+
}
|
7617
|
+
|
7618
|
+
export interface QueryInfo {
|
7619
|
+
/** Indicates whether to search for read (`true`) or unread (`false`) items. */
|
7620
|
+
hasBeenRead?: boolean | undefined;
|
7621
|
+
/** A title to search for. */
|
7622
|
+
title?: string | undefined;
|
7623
|
+
/** A url to search for. */
|
7624
|
+
url?: string | undefined;
|
7625
|
+
}
|
7626
|
+
|
7627
|
+
export interface ReadingListEntry {
|
7628
|
+
/** The time the entry was created. Recorded in milliseconds since Jan 1, 1970. */
|
7629
|
+
creationTime: number;
|
7630
|
+
/** Will be `true` if the entry has been read. */
|
7631
|
+
hasBeenRead: boolean;
|
7632
|
+
/** The last time the entry was updated. This value is in milliseconds since Jan 1, 1970. */
|
7633
|
+
lastUpdateTime: number;
|
7634
|
+
/** The title of the entry. */
|
7635
|
+
title: string;
|
7636
|
+
/** The url of the entry. */
|
7637
|
+
url: string;
|
7638
|
+
}
|
7639
|
+
|
7640
|
+
export interface RemoveOptions {
|
7641
|
+
/** The url to remove. */
|
7642
|
+
url: string;
|
7643
|
+
}
|
7644
|
+
|
7645
|
+
export interface UpdateEntryOptions {
|
7646
|
+
/** The updated read status. The existing status remains if a value isn't provided. */
|
7647
|
+
hasBeenRead?: boolean | undefined;
|
7648
|
+
/** The new title. The existing tile remains if a value isn't provided. */
|
7649
|
+
title?: string | undefined;
|
7650
|
+
/** The url that will be updated. */
|
7651
|
+
url: string;
|
7652
|
+
}
|
7653
|
+
|
7654
|
+
/**
|
7655
|
+
* Adds an entry to the reading list if it does not exist.
|
7656
|
+
* @since Chrome 120, MV3
|
7657
|
+
* @param entry The entry to add to the reading list.
|
7658
|
+
* @param callback
|
7659
|
+
*/
|
7660
|
+
export function addEntry(entry: AddEntryOptions): Promise<void>;
|
7661
|
+
export function addEntry(entry: AddEntryOptions, callback: () => void): void;
|
7662
|
+
|
7663
|
+
/**
|
7664
|
+
* Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
|
7665
|
+
* @since Chrome 120, MV3
|
7666
|
+
* @param info The properties to search for.
|
7667
|
+
* @param callback
|
7668
|
+
*/
|
7669
|
+
export function query(info: QueryInfo): Promise<ReadingListEntry[]>;
|
7670
|
+
export function query(info: QueryInfo, callback: (entries: ReadingListEntry[]) => void): void;
|
7671
|
+
|
7672
|
+
/**
|
7673
|
+
* Removes an entry from the reading list if it exists.
|
7674
|
+
* @since Chrome 120, MV3
|
7675
|
+
* @param info The entry to remove from the reading list.
|
7676
|
+
* @param callback
|
7677
|
+
*/
|
7678
|
+
export function removeEntry(info: RemoveOptions): Promise<void>;
|
7679
|
+
export function removeEntry(info: RemoveOptions, callback: () => void): void;
|
7680
|
+
|
7681
|
+
/**
|
7682
|
+
* Updates a reading list entry if it exists.
|
7683
|
+
* @since Chrome 120, MV3
|
7684
|
+
* @param info The entry to update.
|
7685
|
+
* @param callback
|
7686
|
+
*/
|
7687
|
+
export function updateEntry(info: UpdateEntryOptions): Promise<void>;
|
7688
|
+
export function updateEntry(info: UpdateEntryOptions, callback: () => void): void;
|
7689
|
+
|
7690
|
+
/**
|
7691
|
+
* Triggered when a ReadingListEntry is added to the reading list.
|
7692
|
+
* @since Chrome 120, MV3
|
7693
|
+
*/
|
7694
|
+
export const onEntryAdded: chrome.events.Event<(entry: ReadingListEntry) => void>;
|
7695
|
+
|
7696
|
+
/**
|
7697
|
+
* Triggered when a ReadingListEntry is removed from the reading list.
|
7698
|
+
* @since Chrome 120, MV3
|
7699
|
+
*/
|
7700
|
+
export const onEntryRemoved: chrome.events.Event<(entry: ReadingListEntry) => void>;
|
7701
|
+
|
7702
|
+
/**
|
7703
|
+
* Triggered when a ReadingListEntry is updated in the reading list.
|
7704
|
+
* @since Chrome 120, MV3
|
7705
|
+
*/
|
7706
|
+
export const onEntryUpdated: chrome.events.Event<(entry: ReadingListEntry) => void>;
|
7707
|
+
}
|
7708
|
+
|
7599
7709
|
////////////////////
|
7600
7710
|
// Search
|
7601
7711
|
////////////////////
|
@@ -14126,26 +14236,22 @@ declare namespace chrome {
|
|
14126
14236
|
*/
|
14127
14237
|
export type ExecutionWorld = "MAIN" | "USER_SCRIPT";
|
14128
14238
|
|
14129
|
-
/**
|
14130
|
-
* Properties for configuring the user script world.
|
14131
|
-
*/
|
14132
14239
|
export interface WorldProperties {
|
14133
14240
|
/** Specifies the world csp. The default is the `ISOLATED` world csp. */
|
14134
14241
|
csp?: string;
|
14135
14242
|
/** Specifies whether messaging APIs are exposed. The default is false.*/
|
14136
14243
|
messaging?: boolean;
|
14244
|
+
/**
|
14245
|
+
* Specifies the ID of the specific user script world to update. If not provided, updates the properties of the default user script world. Values with leading underscores (`_`) are reserved.
|
14246
|
+
* @since Chrome 133
|
14247
|
+
*/
|
14248
|
+
worldId?: string;
|
14137
14249
|
}
|
14138
14250
|
|
14139
|
-
/**
|
14140
|
-
* Properties for filtering user scripts.
|
14141
|
-
*/
|
14142
14251
|
export interface UserScriptFilter {
|
14143
14252
|
ids?: string[];
|
14144
14253
|
}
|
14145
14254
|
|
14146
|
-
/**
|
14147
|
-
* Properties for a registered user script.
|
14148
|
-
*/
|
14149
14255
|
export interface RegisteredUserScript {
|
14150
14256
|
/** If true, it will inject into all frames, even if the frame is not the top-most frame in the tab. Each frame is checked independently for URL requirements; it will not inject into child frames if the URL requirements are not met. Defaults to false, meaning that only the top frame is matched. */
|
14151
14257
|
allFrames?: boolean;
|
@@ -14165,6 +14271,11 @@ declare namespace chrome {
|
|
14165
14271
|
runAt?: RunAt;
|
14166
14272
|
/** The JavaScript execution environment to run the script in. The default is `USER_SCRIPT` */
|
14167
14273
|
world?: ExecutionWorld;
|
14274
|
+
/**
|
14275
|
+
* Specifies the user script world ID to execute in. If omitted, the script will execute in the default user script world. Only valid if `world` is omitted or is `USER_SCRIPT`. Values with leading underscores (`_`) are reserved.
|
14276
|
+
* @since Chrome 133
|
14277
|
+
*/
|
14278
|
+
worldId?: string;
|
14168
14279
|
}
|
14169
14280
|
|
14170
14281
|
/**
|
@@ -14212,6 +14323,13 @@ declare namespace chrome {
|
|
14212
14323
|
*/
|
14213
14324
|
export function getScripts(filter: UserScriptFilter, callback: (scripts: RegisteredUserScript[]) => void): void;
|
14214
14325
|
|
14326
|
+
/**
|
14327
|
+
* Retrieves all registered world configurations.
|
14328
|
+
* @since Chrome 133
|
14329
|
+
*/
|
14330
|
+
export function getWorldConfigurations(): Promise<WorldProperties[]>;
|
14331
|
+
export function getWorldConfigurations(callback: (worlds: WorldProperties[]) => void): void;
|
14332
|
+
|
14215
14333
|
/**
|
14216
14334
|
* Registers one or more user scripts for this extension.
|
14217
14335
|
*
|
@@ -14227,6 +14345,14 @@ declare namespace chrome {
|
|
14227
14345
|
*/
|
14228
14346
|
export function register(scripts: RegisteredUserScript[], callback: () => void): void;
|
14229
14347
|
|
14348
|
+
/**
|
14349
|
+
* Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration.
|
14350
|
+
* @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
|
14351
|
+
*/
|
14352
|
+
export function resetWorldConfiguration(worldId?: string): Promise<void>;
|
14353
|
+
export function resetWorldConfiguration(worldId: string, callback: () => void): void;
|
14354
|
+
export function resetWorldConfiguration(callback: () => void): void;
|
14355
|
+
|
14230
14356
|
/**
|
14231
14357
|
* Unregisters all dynamically-registered user scripts for this extension.
|
14232
14358
|
*
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.302",
|
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": "59f391614360d0b95023326c7a11bc865b13e26fd8b986fbf780a96c8cde90b5",
|
98
98
|
"typeScriptVersion": "5.0"
|
99
99
|
}
|