@types/chrome 0.0.296 → 0.0.298
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 +260 -53
- 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: Mon, 20 Jan 2025 21:32: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
@@ -2192,6 +2192,19 @@ declare namespace chrome {
|
|
2192
2192
|
cause: string;
|
2193
2193
|
}
|
2194
2194
|
|
2195
|
+
/**
|
2196
|
+
* Details to identify the frame.
|
2197
|
+
* @since Chrome 132
|
2198
|
+
*/
|
2199
|
+
export interface FrameDetails {
|
2200
|
+
/** The unique identifier for the document. If the frameId and/or tabId are provided they will be validated to match the document found by provided document ID. */
|
2201
|
+
documentId?: string;
|
2202
|
+
/** The unique identifier for the frame within the tab. */
|
2203
|
+
frameId?: number;
|
2204
|
+
/* The unique identifier for the tab containing the frame. */
|
2205
|
+
tabId?: number;
|
2206
|
+
}
|
2207
|
+
|
2195
2208
|
export interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> {}
|
2196
2209
|
|
2197
2210
|
/**
|
@@ -2199,52 +2212,72 @@ declare namespace chrome {
|
|
2199
2212
|
* Parameter cookieStores: All the existing cookie stores.
|
2200
2213
|
*/
|
2201
2214
|
export function getAllCookieStores(callback: (cookieStores: CookieStore[]) => void): void;
|
2215
|
+
|
2202
2216
|
/**
|
2203
2217
|
* Lists all existing cookie stores.
|
2204
2218
|
* @return The `getAllCookieStores` method provides its result via callback or returned as a `Promise` (MV3 only).
|
2205
2219
|
*/
|
2206
2220
|
export function getAllCookieStores(): Promise<CookieStore[]>;
|
2221
|
+
|
2222
|
+
/**
|
2223
|
+
* The partition key for the frame indicated.
|
2224
|
+
* Can return its result via Promise in Manifest V3
|
2225
|
+
* @since Chrome 132
|
2226
|
+
*/
|
2227
|
+
export function getPartitionKey(details: FrameDetails): Promise<{ partitionKey: CookiePartitionKey }>;
|
2228
|
+
export function getPartitionKey(
|
2229
|
+
details: FrameDetails,
|
2230
|
+
callback: (details: { partitionKey: CookiePartitionKey }) => void,
|
2231
|
+
): void;
|
2232
|
+
|
2207
2233
|
/**
|
2208
2234
|
* Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
|
2209
2235
|
* @param details Information to filter the cookies being retrieved.
|
2210
2236
|
* Parameter cookies: All the existing, unexpired cookies that match the given cookie info.
|
2211
2237
|
*/
|
2212
2238
|
export function getAll(details: GetAllDetails, callback: (cookies: Cookie[]) => void): void;
|
2239
|
+
|
2213
2240
|
/**
|
2214
2241
|
* Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
|
2215
2242
|
* @param details Information to filter the cookies being retrieved.
|
2216
2243
|
* @return The `getAll` method provides its result via callback or returned as a `Promise` (MV3 only).
|
2217
2244
|
*/
|
2218
2245
|
export function getAll(details: GetAllDetails): Promise<Cookie[]>;
|
2246
|
+
|
2219
2247
|
/**
|
2220
2248
|
* Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
|
2221
2249
|
* @param details Details about the cookie being set.
|
2222
2250
|
* @return The `set` method provides its result via callback or returned as a `Promise` (MV3 only).
|
2223
2251
|
*/
|
2224
2252
|
export function set(details: SetDetails): Promise<Cookie | null>;
|
2253
|
+
|
2225
2254
|
/**
|
2226
2255
|
* Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
|
2227
2256
|
* @param details Details about the cookie being set.
|
2228
2257
|
* Optional parameter cookie: Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "chrome.runtime.lastError" will be set.
|
2229
2258
|
*/
|
2230
2259
|
export function set(details: SetDetails, callback: (cookie: Cookie | null) => void): void;
|
2260
|
+
|
2231
2261
|
/**
|
2232
2262
|
* Deletes a cookie by name.
|
2233
2263
|
* @param details Information to identify the cookie to remove.
|
2234
2264
|
* @return The `remove` method provides its result via callback or returned as a `Promise` (MV3 only).
|
2235
2265
|
*/
|
2236
2266
|
export function remove(details: CookieDetails): Promise<CookieDetails>;
|
2267
|
+
|
2237
2268
|
/**
|
2238
2269
|
* Deletes a cookie by name.
|
2239
2270
|
* @param details Information to identify the cookie to remove.
|
2240
2271
|
*/
|
2241
2272
|
export function remove(details: CookieDetails, callback?: (details: CookieDetails) => void): void;
|
2273
|
+
|
2242
2274
|
/**
|
2243
2275
|
* Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
|
2244
2276
|
* @param details Details to identify the cookie being retrieved.
|
2245
2277
|
* Parameter cookie: Contains details about the cookie. This parameter is null if no such cookie was found.
|
2246
2278
|
*/
|
2247
2279
|
export function get(details: CookieDetails, callback: (cookie: Cookie | null) => void): void;
|
2280
|
+
|
2248
2281
|
/**
|
2249
2282
|
* Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
|
2250
2283
|
* @param details Details to identify the cookie being retrieved.
|
@@ -7887,6 +7920,7 @@ declare namespace chrome {
|
|
7887
7920
|
BACKGROUND = "BACKGROUND",
|
7888
7921
|
OFFSCREEN_DOCUMENT = "OFFSCREEN_DOCUMENT",
|
7889
7922
|
SIDE_PANEL = "SIDE_PANEL",
|
7923
|
+
DEVELOPER_TOOLS = "DEVELOPER_TOOLS",
|
7890
7924
|
}
|
7891
7925
|
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-OnInstalledReason */
|
7892
7926
|
export enum OnInstalledReason {
|
@@ -10173,18 +10207,12 @@ declare namespace chrome {
|
|
10173
10207
|
* @since Chrome 18
|
10174
10208
|
*/
|
10175
10209
|
openerTabId?: number | undefined;
|
10176
|
-
/**
|
10177
|
-
* Optional.
|
10178
|
-
* The title of the tab. This property is only present if the extension's manifest includes the "tabs" permission.
|
10179
|
-
*/
|
10210
|
+
/** The title of the tab. This property is only present if the extension has the `tabs` permission or has host permissions for the page. */
|
10180
10211
|
title?: string | undefined;
|
10181
|
-
/**
|
10182
|
-
* Optional.
|
10183
|
-
* The URL the tab is displaying. This property is only present if the extension's manifest includes the "tabs" permission.
|
10184
|
-
*/
|
10212
|
+
/** The last committed URL of the main frame of the tab. This property is only present if the extension has the `tabs` permission or has host permissions for the page. May be an empty string if the tab has not yet committed. See also {@link Tab.pendingUrl}. */
|
10185
10213
|
url?: string | undefined;
|
10186
10214
|
/**
|
10187
|
-
* The URL the tab is navigating to, before it has committed.
|
10215
|
+
* The URL the tab is navigating to, before it has committed. This property is only present if the extension has the `tabs` permission or has host permissions for the page and there is a pending navigation.The URL the tab is navigating to, before it has committed.
|
10188
10216
|
* This property is only present if the extension's manifest includes the "tabs" permission and there is a pending navigation.
|
10189
10217
|
* @since Chrome 79
|
10190
10218
|
*/
|
@@ -10206,11 +10234,13 @@ declare namespace chrome {
|
|
10206
10234
|
* @since Chrome 16
|
10207
10235
|
*/
|
10208
10236
|
active: boolean;
|
10237
|
+
/** The URL of the tab's favicon. This property is only present if the extension has the `tabs` permission or has host permissions for the page. It may also be an empty string if the tab is loading. */
|
10238
|
+
favIconUrl?: string | undefined;
|
10209
10239
|
/**
|
10210
|
-
*
|
10211
|
-
*
|
10240
|
+
* Whether the tab is frozen. A frozen tab cannot execute tasks, including event handlers or timers. It is visible in the tab strip and its content is loaded in memory. It is unfrozen on activation.
|
10241
|
+
* @since Chrome 132
|
10212
10242
|
*/
|
10213
|
-
|
10243
|
+
frozen: boolean;
|
10214
10244
|
/**
|
10215
10245
|
* Optional.
|
10216
10246
|
* The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the sessions API, in which case a session ID may be present. Tab ID can also be set to chrome.tabs.TAB_ID_NONE for apps and devtools windows.
|
@@ -10507,9 +10537,9 @@ declare namespace chrome {
|
|
10507
10537
|
* @since Chrome 18
|
10508
10538
|
*/
|
10509
10539
|
index?: number | undefined;
|
10510
|
-
/**
|
10540
|
+
/** Match page titles against a pattern. This property is ignored if the extension does not have the `tabs` permission or host permissions for the page. */
|
10511
10541
|
title?: string | undefined;
|
10512
|
-
/**
|
10542
|
+
/** Match tabs against one or more URL patterns. Fragment identifiers are not matched. This property is ignored if the extension does not have the `tabs` permission or host permissions for the page. */
|
10513
10543
|
url?: string | string[] | undefined;
|
10514
10544
|
/**
|
10515
10545
|
* Optional. Whether the tabs are in the current window.
|
@@ -10524,6 +10554,11 @@ declare namespace chrome {
|
|
10524
10554
|
* @since Chrome 54
|
10525
10555
|
*/
|
10526
10556
|
discarded?: boolean | undefined;
|
10557
|
+
/**
|
10558
|
+
* Whether the tabs are frozen. A frozen tab cannot execute tasks, including event handlers or timers. It is visible in the tab strip and its content is loaded in memory. It is unfrozen on activation.
|
10559
|
+
* @since Chrome 132
|
10560
|
+
*/
|
10561
|
+
frozen?: boolean;
|
10527
10562
|
/**
|
10528
10563
|
* Optional.
|
10529
10564
|
* Whether the tabs can be discarded automatically by the browser when resources are low.
|
@@ -10609,6 +10644,11 @@ declare namespace chrome {
|
|
10609
10644
|
* @since Chrome 27
|
10610
10645
|
*/
|
10611
10646
|
favIconUrl?: string | undefined;
|
10647
|
+
/**
|
10648
|
+
* The tab's new frozen state.
|
10649
|
+
* @since Chrome 132
|
10650
|
+
*/
|
10651
|
+
frozen?: boolean;
|
10612
10652
|
/**
|
10613
10653
|
* The tab's new title.
|
10614
10654
|
* @since Chrome 48
|
@@ -10809,26 +10849,26 @@ declare namespace chrome {
|
|
10809
10849
|
export function move(tabIds: number[], moveProperties: MoveProperties, callback: (tabs: Tab[]) => void): void;
|
10810
10850
|
/**
|
10811
10851
|
* Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
|
10812
|
-
* @return The `update` method provides its result via callback or returned as a `Promise` (MV3 only). Details about the updated tab. The
|
10852
|
+
* @return The `update` method provides its result via callback or returned as a `Promise` (MV3 only). Details about the updated tab. The `url`, `pendingUrl`, `title` and `favIconUrl` properties are only included on the {@link tabs.Tab} object if the extension has the `tabs` permission or has host permissions for the page..
|
10813
10853
|
*/
|
10814
|
-
export function update(updateProperties: UpdateProperties): Promise<Tab>;
|
10854
|
+
export function update(updateProperties: UpdateProperties): Promise<Tab | undefined>;
|
10815
10855
|
/**
|
10816
10856
|
* Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
|
10817
10857
|
* @param callback Optional.
|
10818
|
-
* Optional parameter tab: Details about the updated tab. The
|
10858
|
+
* Optional parameter tab: Details about the updated tab. The `url`, `pendingUrl`, `title` and `favIconUrl` properties are only included on the {@link tabs.Tab} object if the extension has the `tabs` permission or has host permissions for the page..
|
10819
10859
|
*/
|
10820
10860
|
export function update(updateProperties: UpdateProperties, callback: (tab?: Tab) => void): void;
|
10821
10861
|
/**
|
10822
10862
|
* Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
|
10823
10863
|
* @param tabId Defaults to the selected tab of the current window.
|
10824
|
-
* @return The `update` method provides its result via callback or returned as a `Promise` (MV3 only). Details about the updated tab. The
|
10864
|
+
* @return The `update` method provides its result via callback or returned as a `Promise` (MV3 only). Details about the updated tab. The `url`, `pendingUrl`, `title` and `favIconUrl` properties are only included on the {@link tabs.Tab} object if the extension has the `tabs` permission or has host permissions for the page..
|
10825
10865
|
*/
|
10826
|
-
export function update(tabId: number, updateProperties: UpdateProperties): Promise<Tab>;
|
10866
|
+
export function update(tabId: number, updateProperties: UpdateProperties): Promise<Tab | undefined>;
|
10827
10867
|
/**
|
10828
10868
|
* Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
|
10829
10869
|
* @param tabId Defaults to the selected tab of the current window.
|
10830
10870
|
* @param callback Optional.
|
10831
|
-
* Optional parameter tab: Details about the updated tab. The
|
10871
|
+
* Optional parameter tab: Details about the updated tab. The `url`, `pendingUrl`, `title` and `favIconUrl` properties are only included on the {@link tabs.Tab} object if the extension has the `tabs` permission or has host permissions for the page..
|
10832
10872
|
*/
|
10833
10873
|
export function update(tabId: number, updateProperties: UpdateProperties, callback: (tab?: Tab) => void): void;
|
10834
10874
|
/**
|
@@ -10918,13 +10958,13 @@ declare namespace chrome {
|
|
10918
10958
|
* @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
|
10919
10959
|
* @return The `reload` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10920
10960
|
*/
|
10921
|
-
export function reload(tabId: number
|
10961
|
+
export function reload(tabId: number): Promise<void>;
|
10922
10962
|
/**
|
10923
10963
|
* Reload a tab.
|
10924
10964
|
* @since Chrome 16
|
10925
10965
|
* @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
|
10926
10966
|
*/
|
10927
|
-
export function reload(tabId: number,
|
10967
|
+
export function reload(tabId: number, callback?: () => void): void;
|
10928
10968
|
/**
|
10929
10969
|
* Reload the selected tab of the current window.
|
10930
10970
|
* @since Chrome 16
|
@@ -10936,6 +10976,17 @@ declare namespace chrome {
|
|
10936
10976
|
* @since Chrome 16
|
10937
10977
|
*/
|
10938
10978
|
export function reload(reloadProperties: ReloadProperties, callback: () => void): void;
|
10979
|
+
/**
|
10980
|
+
* Reload the selected tab of the current window.
|
10981
|
+
* @since Chrome 16
|
10982
|
+
* @return The `reload` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
10983
|
+
*/
|
10984
|
+
export function reload(tabId: number, reloadProperties: ReloadProperties): Promise<void>;
|
10985
|
+
/**
|
10986
|
+
* Reload the selected tab of the current window.
|
10987
|
+
* @since Chrome 16
|
10988
|
+
*/
|
10989
|
+
export function reload(tabId: number, reloadProperties: ReloadProperties, callback: () => void): void;
|
10939
10990
|
/**
|
10940
10991
|
* Reload the selected tab of the current window.
|
10941
10992
|
* @since Chrome 16
|
@@ -10959,7 +11010,7 @@ declare namespace chrome {
|
|
10959
11010
|
* @since Chrome 23
|
10960
11011
|
* @param tabId The ID of the tab which is to be duplicated.
|
10961
11012
|
* @param callback Optional.
|
10962
|
-
* Optional parameter tab: Details about the duplicated tab. The
|
11013
|
+
* Optional parameter tab: Details about the duplicated tab. The `url`, `pendingUrl`, `title` and `favIconUrl` properties are only included on the {@link tabs.Tab} object if the extension has the `tabs` permission or has host permissions for the page.
|
10963
11014
|
*/
|
10964
11015
|
export function duplicate(tabId: number, callback: (tab?: Tab) => void): void;
|
10965
11016
|
/**
|
@@ -11669,47 +11720,173 @@ declare namespace chrome {
|
|
11669
11720
|
* Permissions: "ttsEngine"
|
11670
11721
|
*/
|
11671
11722
|
export namespace ttsEngine {
|
11723
|
+
/**
|
11724
|
+
* Parameters containing an audio buffer and associated data.
|
11725
|
+
* @since Chrome 92
|
11726
|
+
*/
|
11727
|
+
export interface AudioBuffer {
|
11728
|
+
/** The audio buffer from the text-to-speech engine. It should have length exactly audioStreamOptions.bufferSize and encoded as mono, at audioStreamOptions.sampleRate, and as linear pcm, 32-bit signed float i.e. the Float32Array type in javascript. */
|
11729
|
+
audioBuffer: ArrayBuffer;
|
11730
|
+
/** The character index associated with this audio buffer. */
|
11731
|
+
charIndex?: number;
|
11732
|
+
/** True if this audio buffer is the last for the text being spoken. */
|
11733
|
+
isLastBuffer?: boolean;
|
11734
|
+
}
|
11735
|
+
/**
|
11736
|
+
* Contains the audio stream format expected to be produced by an engine.
|
11737
|
+
* @since Chrome 92
|
11738
|
+
*/
|
11739
|
+
export interface AudioStreamOptions {
|
11740
|
+
/** The number of samples within an audio buffer. */
|
11741
|
+
bufferSize: number;
|
11742
|
+
/** The sample rate expected in an audio buffer. */
|
11743
|
+
sampleRate: number;
|
11744
|
+
}
|
11745
|
+
|
11746
|
+
/**
|
11747
|
+
* The install status of a voice.
|
11748
|
+
* @since Chrome 132
|
11749
|
+
*/
|
11750
|
+
export enum LanguageInstallStatus {
|
11751
|
+
FAILED = "failed",
|
11752
|
+
INSTALLED = "installed",
|
11753
|
+
INSTALLING = "installing",
|
11754
|
+
NOT_INSTALLED = "notInstalled",
|
11755
|
+
}
|
11756
|
+
|
11757
|
+
/**
|
11758
|
+
* Install status of a language.
|
11759
|
+
* @since Chrome 132
|
11760
|
+
*/
|
11761
|
+
export interface LanguageStatus {
|
11762
|
+
/** Detail about installation failures. Optionally populated if the language failed to install. */
|
11763
|
+
error?: string;
|
11764
|
+
/** Installation status. */
|
11765
|
+
installStatus: `${LanguageInstallStatus}`;
|
11766
|
+
/** Language string in the form of language code-region code, where the region may be omitted. Examples are en, en-AU, zh-CH. */
|
11767
|
+
lang: string;
|
11768
|
+
}
|
11769
|
+
|
11770
|
+
/**
|
11771
|
+
* Options for uninstalling a given language.
|
11772
|
+
* @since Chrome 132
|
11773
|
+
*/
|
11774
|
+
export interface LanguageUninstallOptions {
|
11775
|
+
/** True if the TTS client wants the language to be immediately uninstalled. The engine may choose whether or when to uninstall the language, based on this parameter and the requestor information. If false, it may use other criteria, such as recent usage, to determine when to uninstall. */
|
11776
|
+
uninstallImmediately: boolean;
|
11777
|
+
}
|
11778
|
+
|
11779
|
+
/**
|
11780
|
+
* Options specified to the tts.speak() method.
|
11781
|
+
* @since Chrome 92
|
11782
|
+
*/
|
11672
11783
|
export interface SpeakOptions {
|
11673
|
-
/**
|
11674
|
-
lang?: string
|
11675
|
-
/**
|
11676
|
-
voiceName?: string
|
11784
|
+
/** The language to be used for synthesis, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
|
11785
|
+
lang?: string;
|
11786
|
+
/** The name of the voice to use for synthesis. */
|
11787
|
+
voiceName?: string;
|
11677
11788
|
/**
|
11678
|
-
*
|
11679
|
-
*
|
11789
|
+
* Gender of voice for synthesized speech.
|
11790
|
+
* @deprecated Gender is deprecated since Chrome 92 and will be ignored.
|
11680
11791
|
*/
|
11681
|
-
gender?:
|
11682
|
-
/**
|
11683
|
-
volume?: number
|
11684
|
-
/**
|
11685
|
-
|
11686
|
-
|
11687
|
-
|
11688
|
-
rate?: number | undefined;
|
11689
|
-
/** Optional. Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to this voice's default pitch. */
|
11690
|
-
pitch?: number | undefined;
|
11792
|
+
gender?: `${VoiceGender}`;
|
11793
|
+
/** Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0. */
|
11794
|
+
volume?: number;
|
11795
|
+
/** 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. This value is guaranteed to be between 0.1 and 10.0, inclusive. When a voice does not support this full range of rates, don't return an error. Instead, clip the rate to the range the voice supports. */
|
11796
|
+
rate?: number;
|
11797
|
+
/** Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to this voice's default pitch. */
|
11798
|
+
pitch?: number;
|
11691
11799
|
}
|
11692
11800
|
|
11693
|
-
|
11694
|
-
|
11695
|
-
|
11696
|
-
|
11697
|
-
{
|
11801
|
+
/**
|
11802
|
+
* Identifier for the client requesting status.
|
11803
|
+
* @since Chrome 131
|
11804
|
+
*/
|
11805
|
+
export interface TtsClient {
|
11806
|
+
/** Client making a language management request. For an extension, this is the unique extension ID. For Chrome features, this is the human-readable name of the feature. */
|
11807
|
+
id: string;
|
11808
|
+
/** Type of requestor. */
|
11809
|
+
source: `${TtsClientSource}`;
|
11810
|
+
}
|
11811
|
+
|
11812
|
+
/**
|
11813
|
+
* Type of requestor.
|
11814
|
+
* @since Chrome 131
|
11815
|
+
*/
|
11816
|
+
export enum TtsClientSource {
|
11817
|
+
CHROMEFEATURE = "chromefeature",
|
11818
|
+
EXTENSION = "extension",
|
11819
|
+
}
|
11820
|
+
|
11821
|
+
/**
|
11822
|
+
* @since Chrome 54
|
11823
|
+
* @deprecated Gender is deprecated and will be ignored.
|
11824
|
+
*/
|
11825
|
+
export enum VoiceGender {
|
11826
|
+
MALE = "male",
|
11827
|
+
FEMALE = "female",
|
11828
|
+
}
|
11829
|
+
|
11830
|
+
/**
|
11831
|
+
* Called by an engine when a language install is attempted, and when a language is uninstalled. Also called in response to a status request from a client. When a voice is installed or uninstalled, the engine should also call ttsEngine.updateVoices to register the voice.
|
11832
|
+
* @since Chrome 132
|
11833
|
+
*/
|
11834
|
+
export function updateLanguage(status: LanguageStatus): void;
|
11835
|
+
|
11836
|
+
/**
|
11837
|
+
* Called by an engine to update its list of voices. This list overrides any voices declared in this extension's manifest.
|
11838
|
+
* @since Chrome 66
|
11839
|
+
*/
|
11840
|
+
export function updateVoices(voices: tts.TtsVoice[]);
|
11841
|
+
|
11842
|
+
/**
|
11843
|
+
* Fired when a TTS client requests to install a new language. The engine should attempt to download and install the language, and call ttsEngine.updateLanguage with the result. On success, the engine should also call ttsEngine.updateVoices to register the newly available voices.
|
11844
|
+
* @since Chrome 131
|
11845
|
+
*/
|
11846
|
+
export const onInstallLanguageRequest: chrome.events.Event<(requestor: TtsClient, lang: string) => void>;
|
11847
|
+
|
11848
|
+
/**
|
11849
|
+
* Fired when a TTS client requests the install status of a language.
|
11850
|
+
* @since Chrome 132
|
11851
|
+
*/
|
11852
|
+
export const onLanguageStatusRequest: chrome.events.Event<(requestor: TtsClient, lang: string) => void>;
|
11853
|
+
|
11854
|
+
/** Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state. */
|
11855
|
+
export const onPause: chrome.events.Event<() => void>;
|
11856
|
+
|
11857
|
+
/** Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state. */
|
11858
|
+
export const onResume: chrome.events.Event<() => void>;
|
11698
11859
|
|
11699
11860
|
/** Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. */
|
11700
|
-
export
|
11701
|
-
|
11702
|
-
|
11861
|
+
export const onSpeak: chrome.events.Event<
|
11862
|
+
(utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void
|
11863
|
+
>;
|
11864
|
+
|
11703
11865
|
/**
|
11704
|
-
*
|
11705
|
-
* @since Chrome
|
11866
|
+
* Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. Differs from ttsEngine.onSpeak in that Chrome provides audio playback services and handles dispatching tts events.
|
11867
|
+
* @since Chrome 92
|
11706
11868
|
*/
|
11707
|
-
|
11869
|
+
|
11870
|
+
export const onSpeakWithAudioStream: chrome.events.Event<
|
11871
|
+
(
|
11872
|
+
utterance: string,
|
11873
|
+
options: SpeakOptions,
|
11874
|
+
audioStreamOptions: AudioStreamOptions,
|
11875
|
+
sendTtsAudio: (audioBufferParams: AudioBuffer) => void,
|
11876
|
+
sendError: (errorMessage?: string) => void,
|
11877
|
+
) => void
|
11878
|
+
>;
|
11879
|
+
|
11880
|
+
/** Fired when a call is made to tts.stop and this extension may be in the middle of speaking. If an extension receives a call to onStop and speech is already stopped, it should do nothing (not raise an error). If speech is in the paused state, this should cancel the paused state. */
|
11881
|
+
export const onStop: chrome.events.Event<() => void>;
|
11882
|
+
|
11708
11883
|
/**
|
11709
|
-
*
|
11710
|
-
* @since Chrome
|
11884
|
+
* Fired when a TTS client indicates a language is no longer needed.
|
11885
|
+
* @since Chrome 132
|
11711
11886
|
*/
|
11712
|
-
export
|
11887
|
+
export const onUninstallLanguageRequest: chrome.events.Event<
|
11888
|
+
(requestor: TtsClient, lang: string, uninstallOptions: LanguageUninstallOptions) => void
|
11889
|
+
>;
|
11713
11890
|
}
|
11714
11891
|
|
11715
11892
|
////////////////////
|
@@ -13328,6 +13505,18 @@ declare namespace chrome {
|
|
13328
13505
|
* Note: this must be specified for allowAllRequests rules and may only include the sub_frame and main_frame resource types.
|
13329
13506
|
*/
|
13330
13507
|
resourceTypes?: ResourceType[] | undefined;
|
13508
|
+
|
13509
|
+
/**
|
13510
|
+
* Rule does not match if the request matches any response header condition in this list (if specified). If both `excludedResponseHeaders` and `responseHeaders` are specified, then the `excludedResponseHeaders` property takes precedence.
|
13511
|
+
* @since Chrome 128
|
13512
|
+
*/
|
13513
|
+
excludedResponseHeaders?: HeaderInfo[];
|
13514
|
+
|
13515
|
+
/**
|
13516
|
+
* Rule matches if the request matches any response header condition in this list (if specified).
|
13517
|
+
* @since Chrome 128
|
13518
|
+
*/
|
13519
|
+
responseHeaders?: HeaderInfo[];
|
13331
13520
|
}
|
13332
13521
|
|
13333
13522
|
export interface MatchedRule {
|
@@ -13362,6 +13551,24 @@ declare namespace chrome {
|
|
13362
13551
|
tabId?: number | undefined;
|
13363
13552
|
}
|
13364
13553
|
|
13554
|
+
/** @since Chrome 128 */
|
13555
|
+
export interface HeaderInfo {
|
13556
|
+
/** If specified, this condition is not matched if the header exists but its value contains at least one element in this list. This uses the same match pattern syntax as `values`. */
|
13557
|
+
excludedValues?: string[];
|
13558
|
+
/** The name of the header. This condition matches on the name only if both `values` and `excludedValues` are not specified. */
|
13559
|
+
header: string;
|
13560
|
+
/**
|
13561
|
+
* If specified, this condition matches if the header's value matches at least one pattern in this list. This supports case-insensitive header value matching plus the following constructs:
|
13562
|
+
*
|
13563
|
+
* **'\*'** : Matches any number of characters.
|
13564
|
+
*
|
13565
|
+
* **'?'** : Matches zero or one character(s).
|
13566
|
+
*
|
13567
|
+
* **'\*'** and **'?'** can be escaped with a backslash, e.g. **'\\\*'** and **'\\?'**
|
13568
|
+
*/
|
13569
|
+
values?: string[];
|
13570
|
+
}
|
13571
|
+
|
13365
13572
|
export interface ModifyHeaderInfo {
|
13366
13573
|
/** The name of the header to be modified. */
|
13367
13574
|
header: string;
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.298",
|
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": "762763300a1fd080ce9d4c7f485bcda3635560245e2d8b5195e3bccdafb0d994",
|
98
98
|
"typeScriptVersion": "5.0"
|
99
99
|
}
|