@types/chrome 0.0.175 → 0.0.176
Sign up to get free protection for your applications and to get access to all the features.
- chrome/README.md +1 -1
- chrome/index.d.ts +36 -23
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Chrome extension development (http://
|
|
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, 10 Jan 2022 21:01: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
|
* Global values: `chrome`
|
14
14
|
|
chrome/index.d.ts
CHANGED
@@ -497,7 +497,7 @@ declare namespace chrome.bookmarks {
|
|
497
497
|
* Since Chrome 37.
|
498
498
|
* Indicates the reason why this node is unmodifiable. The managed value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
|
499
499
|
*/
|
500
|
-
unmodifiable?:
|
500
|
+
unmodifiable?: 'managed' | undefined;
|
501
501
|
}
|
502
502
|
|
503
503
|
export interface BookmarkRemoveInfo {
|
@@ -796,7 +796,7 @@ declare namespace chrome.browserAction {
|
|
796
796
|
|
797
797
|
export interface TabIconDetails {
|
798
798
|
/** Optional. 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 * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' */
|
799
|
-
path?:
|
799
|
+
path?: string | { [index: string]: string } | undefined;
|
800
800
|
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
801
801
|
tabId?: number | undefined;
|
802
802
|
/** Optional. 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 * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' */
|
@@ -1174,11 +1174,13 @@ declare namespace chrome.contentSettings {
|
|
1174
1174
|
scope?: ScopeEnum | undefined;
|
1175
1175
|
}
|
1176
1176
|
|
1177
|
+
type DefaultContentSettingDetails = 'allow' | 'ask' | 'block' | 'detect_important_content' | 'session_only';
|
1178
|
+
|
1177
1179
|
export interface SetDetails {
|
1178
1180
|
/** Optional. The resource identifier for the content type. */
|
1179
1181
|
resourceIdentifier?: ResourceIdentifier | undefined;
|
1180
1182
|
/** The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values. */
|
1181
|
-
setting:
|
1183
|
+
setting: DefaultContentSettingDetails;
|
1182
1184
|
/** Optional. The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see Content Setting Patterns. */
|
1183
1185
|
secondaryPattern?: string | undefined;
|
1184
1186
|
/** Optional. Where to set the setting (default: regular). */
|
@@ -1252,7 +1254,7 @@ declare namespace chrome.contentSettings {
|
|
1252
1254
|
|
1253
1255
|
export interface ReturnedDetails {
|
1254
1256
|
/** The content setting. See the description of the individual ContentSetting objects for the possible values. */
|
1255
|
-
setting:
|
1257
|
+
setting: DefaultContentSettingDetails;
|
1256
1258
|
}
|
1257
1259
|
|
1258
1260
|
export interface ContentSetting {
|
@@ -1284,54 +1286,67 @@ declare namespace chrome.contentSettings {
|
|
1284
1286
|
|
1285
1287
|
export interface CookieContentSetting extends ContentSetting {
|
1286
1288
|
set(details: CookieSetDetails, callback?: () => void): void;
|
1289
|
+
get(details: GetDetails, callback: (details: CookieSetDetails) => void): void;
|
1287
1290
|
}
|
1288
1291
|
|
1289
1292
|
export interface PopupsContentSetting extends ContentSetting {
|
1290
1293
|
set(details: PopupsSetDetails, callback?: () => void): void;
|
1294
|
+
get(details: GetDetails, callback: (details: PopupsSetDetails) => void): void;
|
1291
1295
|
}
|
1292
1296
|
|
1293
1297
|
export interface JavascriptContentSetting extends ContentSetting {
|
1294
1298
|
set(details: JavascriptSetDetails, callback?: () => void): void;
|
1299
|
+
get(details: GetDetails, callback: (details: JavascriptSetDetails) => void): void;
|
1295
1300
|
}
|
1296
1301
|
|
1297
1302
|
export interface NotificationsContentSetting extends ContentSetting {
|
1298
1303
|
set(details: NotificationsSetDetails, callback?: () => void): void;
|
1304
|
+
get(details: GetDetails, callback: (details: NotificationsSetDetails) => void): void;
|
1299
1305
|
}
|
1300
1306
|
|
1301
1307
|
export interface PluginsContentSetting extends ContentSetting {
|
1302
1308
|
set(details: PluginsSetDetails, callback?: () => void): void;
|
1309
|
+
get(details: GetDetails, callback: (details: PluginsSetDetails) => void): void;
|
1303
1310
|
}
|
1304
1311
|
|
1305
1312
|
export interface ImagesContentSetting extends ContentSetting {
|
1306
1313
|
set(details: ImagesSetDetails, callback?: () => void): void;
|
1314
|
+
get(details: GetDetails, callback: (details: ImagesSetDetails) => void): void;
|
1307
1315
|
}
|
1308
1316
|
|
1309
1317
|
export interface LocationContentSetting extends ContentSetting {
|
1310
1318
|
set(details: LocationSetDetails, callback?: () => void): void;
|
1319
|
+
get(details: GetDetails, callback: (details: LocationSetDetails) => void): void;
|
1311
1320
|
}
|
1312
1321
|
|
1313
1322
|
export interface FullscreenContentSetting extends ContentSetting {
|
1314
1323
|
set(details: FullscreenSetDetails, callback?: () => void): void;
|
1324
|
+
get(details: GetDetails, callback: (details: FullscreenSetDetails) => void): void;
|
1315
1325
|
}
|
1316
1326
|
|
1317
1327
|
export interface MouselockContentSetting extends ContentSetting {
|
1318
1328
|
set(details: MouselockSetDetails, callback?: () => void): void;
|
1329
|
+
get(details: GetDetails, callback: (details: MouselockSetDetails) => void): void;
|
1319
1330
|
}
|
1320
1331
|
|
1321
1332
|
export interface MicrophoneContentSetting extends ContentSetting {
|
1322
1333
|
set(details: MicrophoneSetDetails, callback?: () => void): void;
|
1334
|
+
get(details: GetDetails, callback: (details: MicrophoneSetDetails) => void): void;
|
1323
1335
|
}
|
1324
1336
|
|
1325
1337
|
export interface CameraContentSetting extends ContentSetting {
|
1326
1338
|
set(details: CameraSetDetails, callback?: () => void): void;
|
1339
|
+
get(details: GetDetails, callback: (details: CameraSetDetails) => void): void;
|
1327
1340
|
}
|
1328
1341
|
|
1329
1342
|
export interface PpapiBrokerContentSetting extends ContentSetting {
|
1330
1343
|
set(details: PpapiBrokerSetDetails, callback?: () => void): void;
|
1344
|
+
get(details: GetDetails, callback: (details: PpapiBrokerSetDetails) => void): void;
|
1331
1345
|
}
|
1332
1346
|
|
1333
1347
|
export interface MultipleAutomaticDownloadsContentSetting extends ContentSetting {
|
1334
1348
|
set(details: MultipleAutomaticDownloadsSetDetails, callback?: () => void): void;
|
1349
|
+
get(details: GetDetails, callback: (details: MultipleAutomaticDownloadsSetDetails) => void): void;
|
1335
1350
|
}
|
1336
1351
|
|
1337
1352
|
/** The only content type using resource identifiers is contentSettings.plugins. For more information, see Resource Identifiers. */
|
@@ -1577,7 +1592,7 @@ declare namespace chrome.contextMenus {
|
|
1577
1592
|
*/
|
1578
1593
|
onclick?: ((info: OnClickData, tab: chrome.tabs.Tab) => void) | undefined;
|
1579
1594
|
/** Optional. The ID of a parent menu item; this makes the item a child of a previously added item. */
|
1580
|
-
parentId?:
|
1595
|
+
parentId?: number | string | undefined;
|
1581
1596
|
/** Optional. The type of menu item. Defaults to 'normal' if not specified. */
|
1582
1597
|
type?: ContextItemType | undefined;
|
1583
1598
|
/**
|
@@ -2075,11 +2090,11 @@ declare namespace chrome.declarativeContent {
|
|
2075
2090
|
declare namespace chrome.declarativeWebRequest {
|
2076
2091
|
export interface HeaderFilter {
|
2077
2092
|
nameEquals?: string | undefined;
|
2078
|
-
valueContains?:
|
2093
|
+
valueContains?: string | string[] | undefined;
|
2079
2094
|
nameSuffix?: string | undefined;
|
2080
2095
|
valueSuffix?: string | undefined;
|
2081
2096
|
valuePrefix?: string | undefined;
|
2082
|
-
nameContains?:
|
2097
|
+
nameContains?: string | string[] | undefined;
|
2083
2098
|
valueEquals?: string | undefined;
|
2084
2099
|
namePrefix?: string | undefined;
|
2085
2100
|
}
|
@@ -3183,7 +3198,7 @@ declare namespace chrome.events {
|
|
3183
3198
|
/** Optional. Matches if the URL (without fragment identifier) ends with a specified string. Port numbers are stripped from the URL if they match the default port number. */
|
3184
3199
|
urlSuffix?: string | undefined;
|
3185
3200
|
/** Optional. Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. */
|
3186
|
-
ports?:
|
3201
|
+
ports?: (number | number[])[] | undefined;
|
3187
3202
|
/**
|
3188
3203
|
* Optional.
|
3189
3204
|
* Since Chrome 28.
|
@@ -4285,7 +4300,7 @@ declare namespace chrome.i18n {
|
|
4285
4300
|
* @param messageName The name of the message, as specified in the messages.json file.
|
4286
4301
|
* @param substitutions Optional. Up to 9 substitution strings, if the message requires any.
|
4287
4302
|
*/
|
4288
|
-
export function getMessage(messageName: string, substitutions?:
|
4303
|
+
export function getMessage(messageName: string, substitutions?: string | string[]): string;
|
4289
4304
|
/**
|
4290
4305
|
* Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
|
4291
4306
|
* @since Chrome 35.
|
@@ -5699,7 +5714,7 @@ declare namespace chrome.pageAction {
|
|
5699
5714
|
* Optional.
|
5700
5715
|
* 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 * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
|
5701
5716
|
*/
|
5702
|
-
path?:
|
5717
|
+
path?: string | { [index: string]: string } | undefined;
|
5703
5718
|
}
|
5704
5719
|
|
5705
5720
|
/**
|
@@ -5770,7 +5785,7 @@ declare namespace chrome.pageCapture {
|
|
5770
5785
|
* function(binary mhtmlData) {...};
|
5771
5786
|
* Parameter mhtmlData: The MHTML data as a Blob.
|
5772
5787
|
*/
|
5773
|
-
export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData
|
5788
|
+
export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData?: ArrayBuffer) => void): void;
|
5774
5789
|
}
|
5775
5790
|
|
5776
5791
|
////////////////////
|
@@ -6762,8 +6777,7 @@ declare namespace chrome.runtime {
|
|
6762
6777
|
icons?: ManifestIcons | undefined;
|
6763
6778
|
|
6764
6779
|
// Optional
|
6765
|
-
author?:
|
6766
|
-
automation?: any;
|
6780
|
+
author?: string | undefined;
|
6767
6781
|
background_page?: string | undefined;
|
6768
6782
|
chrome_settings_overrides?: {
|
6769
6783
|
homepage?: string | undefined;
|
@@ -6810,7 +6824,6 @@ declare namespace chrome.runtime {
|
|
6810
6824
|
exclude_globs?: string[] | undefined;
|
6811
6825
|
}[] | undefined;
|
6812
6826
|
converted_from_user_script?: boolean | undefined;
|
6813
|
-
copresence?: any;
|
6814
6827
|
current_locale?: string | undefined;
|
6815
6828
|
devtools_page?: string | undefined;
|
6816
6829
|
event_rules?: {
|
@@ -6851,7 +6864,7 @@ declare namespace chrome.runtime {
|
|
6851
6864
|
id?: string | undefined;
|
6852
6865
|
description?: string | undefined;
|
6853
6866
|
language?: string | undefined;
|
6854
|
-
layouts?:
|
6867
|
+
layouts?: string[] | undefined;
|
6855
6868
|
}[] | undefined;
|
6856
6869
|
key?: string | undefined;
|
6857
6870
|
minimum_chrome_version?: string | undefined;
|
@@ -6893,7 +6906,6 @@ declare namespace chrome.runtime {
|
|
6893
6906
|
content_security_policy?: string | undefined;
|
6894
6907
|
} | undefined;
|
6895
6908
|
short_name?: string | undefined;
|
6896
|
-
signature?: any;
|
6897
6909
|
spellcheck?: {
|
6898
6910
|
dictionary_language?: string | undefined;
|
6899
6911
|
dictionary_locale?: string | undefined;
|
@@ -6903,7 +6915,6 @@ declare namespace chrome.runtime {
|
|
6903
6915
|
storage?: {
|
6904
6916
|
managed_schema: string;
|
6905
6917
|
} | undefined;
|
6906
|
-
system_indicator?: any;
|
6907
6918
|
tts_engine?: {
|
6908
6919
|
voices: {
|
6909
6920
|
voice_name: string;
|
@@ -9835,6 +9846,8 @@ declare namespace chrome.ttsEngine {
|
|
9835
9846
|
* @since Chrome 13.
|
9836
9847
|
*/
|
9837
9848
|
declare namespace chrome.types {
|
9849
|
+
type settingsScope = 'regular' | 'regular_only' | 'incognito_persistent' | 'incognito_session_only' | undefined;
|
9850
|
+
|
9838
9851
|
export interface ChromeSettingClearDetails {
|
9839
9852
|
/**
|
9840
9853
|
* Optional.
|
@@ -9844,7 +9857,7 @@ declare namespace chrome.types {
|
|
9844
9857
|
* • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
|
9845
9858
|
* • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
|
9846
9859
|
*/
|
9847
|
-
scope?:
|
9860
|
+
scope?: settingsScope;
|
9848
9861
|
}
|
9849
9862
|
|
9850
9863
|
export interface ChromeSettingSetDetails extends ChromeSettingClearDetails {
|
@@ -9861,7 +9874,7 @@ declare namespace chrome.types {
|
|
9861
9874
|
* • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
|
9862
9875
|
* • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
|
9863
9876
|
*/
|
9864
|
-
scope?:
|
9877
|
+
scope?: settingsScope;
|
9865
9878
|
}
|
9866
9879
|
|
9867
9880
|
export interface ChromeSettingGetDetails {
|
@@ -9882,7 +9895,7 @@ declare namespace chrome.types {
|
|
9882
9895
|
* • controllable_by_this_extension: can be controlled by this extension
|
9883
9896
|
* • controlled_by_this_extension: controlled by this extension
|
9884
9897
|
*/
|
9885
|
-
levelOfControl:
|
9898
|
+
levelOfControl: 'not_controllable' | 'controlled_by_other_extensions' | 'controllable_by_this_extension' | 'controlled_by_this_extension';
|
9886
9899
|
/** The value of the setting. */
|
9887
9900
|
value: any;
|
9888
9901
|
/**
|
@@ -10020,14 +10033,14 @@ declare namespace chrome.vpnProvider {
|
|
10020
10033
|
declare namespace chrome.wallpaper {
|
10021
10034
|
export interface WallpaperDetails {
|
10022
10035
|
/** Optional. The jpeg or png encoded wallpaper image. */
|
10023
|
-
data?:
|
10036
|
+
data?: ArrayBuffer | undefined;
|
10024
10037
|
/** Optional. The URL of the wallpaper to be set. */
|
10025
10038
|
url?: string | undefined;
|
10026
10039
|
/**
|
10027
10040
|
* The supported wallpaper layouts.
|
10028
10041
|
* One of: "STRETCH", "CENTER", or "CENTER_CROPPED"
|
10029
10042
|
*/
|
10030
|
-
layout:
|
10043
|
+
layout: 'STRETCH' | 'CENTER' | 'CENTER_CROPPED';
|
10031
10044
|
/** The file name of the saved wallpaper. */
|
10032
10045
|
filename: string;
|
10033
10046
|
/** Optional. True if a 128x60 thumbnail should be generated. */
|
@@ -10039,7 +10052,7 @@ declare namespace chrome.wallpaper {
|
|
10039
10052
|
* @param callback
|
10040
10053
|
* Optional parameter thumbnail: The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60.
|
10041
10054
|
*/
|
10042
|
-
export function setWallpaper(details: WallpaperDetails, callback: (thumbnail
|
10055
|
+
export function setWallpaper(details: WallpaperDetails, callback: (thumbnail?: ArrayBuffer) => void): void;
|
10043
10056
|
}
|
10044
10057
|
|
10045
10058
|
////////////////////
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.176",
|
4
4
|
"description": "TypeScript definitions for Chrome extension development",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -98,6 +98,6 @@
|
|
98
98
|
"@types/filesystem": "*",
|
99
99
|
"@types/har-format": "*"
|
100
100
|
},
|
101
|
-
"typesPublisherContentHash": "
|
101
|
+
"typesPublisherContentHash": "e98dddab5c5e55b3fd116b4c0c4654ee2201d702124976b44c9030274210ba40",
|
102
102
|
"typeScriptVersion": "3.8"
|
103
103
|
}
|