@types/chrome 0.0.172 → 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/chrome-cast/index.d.ts +148 -200
- chrome/index.d.ts +112 -38
- chrome/package.json +2 -2
chrome/index.d.ts
CHANGED
@@ -21,6 +21,7 @@
|
|
21
21
|
|
22
22
|
/// <reference types="filesystem" />
|
23
23
|
/// <reference path="./har-format/index.d.ts" />
|
24
|
+
/// <reference path="./chrome-cast/index.d.ts" />
|
24
25
|
|
25
26
|
////////////////////
|
26
27
|
// Global object
|
@@ -496,7 +497,7 @@ declare namespace chrome.bookmarks {
|
|
496
497
|
* Since Chrome 37.
|
497
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).
|
498
499
|
*/
|
499
|
-
unmodifiable?:
|
500
|
+
unmodifiable?: 'managed' | undefined;
|
500
501
|
}
|
501
502
|
|
502
503
|
export interface BookmarkRemoveInfo {
|
@@ -795,7 +796,7 @@ declare namespace chrome.browserAction {
|
|
795
796
|
|
796
797
|
export interface TabIconDetails {
|
797
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}' */
|
798
|
-
path?:
|
799
|
+
path?: string | { [index: string]: string } | undefined;
|
799
800
|
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
800
801
|
tabId?: number | undefined;
|
801
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}' */
|
@@ -1173,11 +1174,13 @@ declare namespace chrome.contentSettings {
|
|
1173
1174
|
scope?: ScopeEnum | undefined;
|
1174
1175
|
}
|
1175
1176
|
|
1177
|
+
type DefaultContentSettingDetails = 'allow' | 'ask' | 'block' | 'detect_important_content' | 'session_only';
|
1178
|
+
|
1176
1179
|
export interface SetDetails {
|
1177
1180
|
/** Optional. The resource identifier for the content type. */
|
1178
1181
|
resourceIdentifier?: ResourceIdentifier | undefined;
|
1179
1182
|
/** The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values. */
|
1180
|
-
setting:
|
1183
|
+
setting: DefaultContentSettingDetails;
|
1181
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. */
|
1182
1185
|
secondaryPattern?: string | undefined;
|
1183
1186
|
/** Optional. Where to set the setting (default: regular). */
|
@@ -1251,7 +1254,7 @@ declare namespace chrome.contentSettings {
|
|
1251
1254
|
|
1252
1255
|
export interface ReturnedDetails {
|
1253
1256
|
/** The content setting. See the description of the individual ContentSetting objects for the possible values. */
|
1254
|
-
setting:
|
1257
|
+
setting: DefaultContentSettingDetails;
|
1255
1258
|
}
|
1256
1259
|
|
1257
1260
|
export interface ContentSetting {
|
@@ -1283,54 +1286,67 @@ declare namespace chrome.contentSettings {
|
|
1283
1286
|
|
1284
1287
|
export interface CookieContentSetting extends ContentSetting {
|
1285
1288
|
set(details: CookieSetDetails, callback?: () => void): void;
|
1289
|
+
get(details: GetDetails, callback: (details: CookieSetDetails) => void): void;
|
1286
1290
|
}
|
1287
1291
|
|
1288
1292
|
export interface PopupsContentSetting extends ContentSetting {
|
1289
1293
|
set(details: PopupsSetDetails, callback?: () => void): void;
|
1294
|
+
get(details: GetDetails, callback: (details: PopupsSetDetails) => void): void;
|
1290
1295
|
}
|
1291
1296
|
|
1292
1297
|
export interface JavascriptContentSetting extends ContentSetting {
|
1293
1298
|
set(details: JavascriptSetDetails, callback?: () => void): void;
|
1299
|
+
get(details: GetDetails, callback: (details: JavascriptSetDetails) => void): void;
|
1294
1300
|
}
|
1295
1301
|
|
1296
1302
|
export interface NotificationsContentSetting extends ContentSetting {
|
1297
1303
|
set(details: NotificationsSetDetails, callback?: () => void): void;
|
1304
|
+
get(details: GetDetails, callback: (details: NotificationsSetDetails) => void): void;
|
1298
1305
|
}
|
1299
1306
|
|
1300
1307
|
export interface PluginsContentSetting extends ContentSetting {
|
1301
1308
|
set(details: PluginsSetDetails, callback?: () => void): void;
|
1309
|
+
get(details: GetDetails, callback: (details: PluginsSetDetails) => void): void;
|
1302
1310
|
}
|
1303
1311
|
|
1304
1312
|
export interface ImagesContentSetting extends ContentSetting {
|
1305
1313
|
set(details: ImagesSetDetails, callback?: () => void): void;
|
1314
|
+
get(details: GetDetails, callback: (details: ImagesSetDetails) => void): void;
|
1306
1315
|
}
|
1307
1316
|
|
1308
1317
|
export interface LocationContentSetting extends ContentSetting {
|
1309
1318
|
set(details: LocationSetDetails, callback?: () => void): void;
|
1319
|
+
get(details: GetDetails, callback: (details: LocationSetDetails) => void): void;
|
1310
1320
|
}
|
1311
1321
|
|
1312
1322
|
export interface FullscreenContentSetting extends ContentSetting {
|
1313
1323
|
set(details: FullscreenSetDetails, callback?: () => void): void;
|
1324
|
+
get(details: GetDetails, callback: (details: FullscreenSetDetails) => void): void;
|
1314
1325
|
}
|
1315
1326
|
|
1316
1327
|
export interface MouselockContentSetting extends ContentSetting {
|
1317
1328
|
set(details: MouselockSetDetails, callback?: () => void): void;
|
1329
|
+
get(details: GetDetails, callback: (details: MouselockSetDetails) => void): void;
|
1318
1330
|
}
|
1319
1331
|
|
1320
1332
|
export interface MicrophoneContentSetting extends ContentSetting {
|
1321
1333
|
set(details: MicrophoneSetDetails, callback?: () => void): void;
|
1334
|
+
get(details: GetDetails, callback: (details: MicrophoneSetDetails) => void): void;
|
1322
1335
|
}
|
1323
1336
|
|
1324
1337
|
export interface CameraContentSetting extends ContentSetting {
|
1325
1338
|
set(details: CameraSetDetails, callback?: () => void): void;
|
1339
|
+
get(details: GetDetails, callback: (details: CameraSetDetails) => void): void;
|
1326
1340
|
}
|
1327
1341
|
|
1328
1342
|
export interface PpapiBrokerContentSetting extends ContentSetting {
|
1329
1343
|
set(details: PpapiBrokerSetDetails, callback?: () => void): void;
|
1344
|
+
get(details: GetDetails, callback: (details: PpapiBrokerSetDetails) => void): void;
|
1330
1345
|
}
|
1331
1346
|
|
1332
1347
|
export interface MultipleAutomaticDownloadsContentSetting extends ContentSetting {
|
1333
1348
|
set(details: MultipleAutomaticDownloadsSetDetails, callback?: () => void): void;
|
1349
|
+
get(details: GetDetails, callback: (details: MultipleAutomaticDownloadsSetDetails) => void): void;
|
1334
1350
|
}
|
1335
1351
|
|
1336
1352
|
/** The only content type using resource identifiers is contentSettings.plugins. For more information, see Resource Identifiers. */
|
@@ -1576,7 +1592,7 @@ declare namespace chrome.contextMenus {
|
|
1576
1592
|
*/
|
1577
1593
|
onclick?: ((info: OnClickData, tab: chrome.tabs.Tab) => void) | undefined;
|
1578
1594
|
/** Optional. The ID of a parent menu item; this makes the item a child of a previously added item. */
|
1579
|
-
parentId?:
|
1595
|
+
parentId?: number | string | undefined;
|
1580
1596
|
/** Optional. The type of menu item. Defaults to 'normal' if not specified. */
|
1581
1597
|
type?: ContextItemType | undefined;
|
1582
1598
|
/**
|
@@ -2074,11 +2090,11 @@ declare namespace chrome.declarativeContent {
|
|
2074
2090
|
declare namespace chrome.declarativeWebRequest {
|
2075
2091
|
export interface HeaderFilter {
|
2076
2092
|
nameEquals?: string | undefined;
|
2077
|
-
valueContains?:
|
2093
|
+
valueContains?: string | string[] | undefined;
|
2078
2094
|
nameSuffix?: string | undefined;
|
2079
2095
|
valueSuffix?: string | undefined;
|
2080
2096
|
valuePrefix?: string | undefined;
|
2081
|
-
nameContains?:
|
2097
|
+
nameContains?: string | string[] | undefined;
|
2082
2098
|
valueEquals?: string | undefined;
|
2083
2099
|
namePrefix?: string | undefined;
|
2084
2100
|
}
|
@@ -3182,7 +3198,7 @@ declare namespace chrome.events {
|
|
3182
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. */
|
3183
3199
|
urlSuffix?: string | undefined;
|
3184
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. */
|
3185
|
-
ports?:
|
3201
|
+
ports?: (number | number[])[] | undefined;
|
3186
3202
|
/**
|
3187
3203
|
* Optional.
|
3188
3204
|
* Since Chrome 28.
|
@@ -4284,7 +4300,7 @@ declare namespace chrome.i18n {
|
|
4284
4300
|
* @param messageName The name of the message, as specified in the messages.json file.
|
4285
4301
|
* @param substitutions Optional. Up to 9 substitution strings, if the message requires any.
|
4286
4302
|
*/
|
4287
|
-
export function getMessage(messageName: string, substitutions?:
|
4303
|
+
export function getMessage(messageName: string, substitutions?: string | string[]): string;
|
4288
4304
|
/**
|
4289
4305
|
* Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
|
4290
4306
|
* @since Chrome 35.
|
@@ -5698,7 +5714,7 @@ declare namespace chrome.pageAction {
|
|
5698
5714
|
* Optional.
|
5699
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}'
|
5700
5716
|
*/
|
5701
|
-
path?:
|
5717
|
+
path?: string | { [index: string]: string } | undefined;
|
5702
5718
|
}
|
5703
5719
|
|
5704
5720
|
/**
|
@@ -5769,7 +5785,7 @@ declare namespace chrome.pageCapture {
|
|
5769
5785
|
* function(binary mhtmlData) {...};
|
5770
5786
|
* Parameter mhtmlData: The MHTML data as a Blob.
|
5771
5787
|
*/
|
5772
|
-
export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData
|
5788
|
+
export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData?: ArrayBuffer) => void): void;
|
5773
5789
|
}
|
5774
5790
|
|
5775
5791
|
////////////////////
|
@@ -6761,8 +6777,7 @@ declare namespace chrome.runtime {
|
|
6761
6777
|
icons?: ManifestIcons | undefined;
|
6762
6778
|
|
6763
6779
|
// Optional
|
6764
|
-
author?:
|
6765
|
-
automation?: any;
|
6780
|
+
author?: string | undefined;
|
6766
6781
|
background_page?: string | undefined;
|
6767
6782
|
chrome_settings_overrides?: {
|
6768
6783
|
homepage?: string | undefined;
|
@@ -6809,7 +6824,6 @@ declare namespace chrome.runtime {
|
|
6809
6824
|
exclude_globs?: string[] | undefined;
|
6810
6825
|
}[] | undefined;
|
6811
6826
|
converted_from_user_script?: boolean | undefined;
|
6812
|
-
copresence?: any;
|
6813
6827
|
current_locale?: string | undefined;
|
6814
6828
|
devtools_page?: string | undefined;
|
6815
6829
|
event_rules?: {
|
@@ -6850,7 +6864,7 @@ declare namespace chrome.runtime {
|
|
6850
6864
|
id?: string | undefined;
|
6851
6865
|
description?: string | undefined;
|
6852
6866
|
language?: string | undefined;
|
6853
|
-
layouts?:
|
6867
|
+
layouts?: string[] | undefined;
|
6854
6868
|
}[] | undefined;
|
6855
6869
|
key?: string | undefined;
|
6856
6870
|
minimum_chrome_version?: string | undefined;
|
@@ -6892,7 +6906,6 @@ declare namespace chrome.runtime {
|
|
6892
6906
|
content_security_policy?: string | undefined;
|
6893
6907
|
} | undefined;
|
6894
6908
|
short_name?: string | undefined;
|
6895
|
-
signature?: any;
|
6896
6909
|
spellcheck?: {
|
6897
6910
|
dictionary_language?: string | undefined;
|
6898
6911
|
dictionary_locale?: string | undefined;
|
@@ -6902,7 +6915,6 @@ declare namespace chrome.runtime {
|
|
6902
6915
|
storage?: {
|
6903
6916
|
managed_schema: string;
|
6904
6917
|
} | undefined;
|
6905
|
-
system_indicator?: any;
|
6906
6918
|
tts_engine?: {
|
6907
6919
|
voices: {
|
6908
6920
|
voice_name: string;
|
@@ -9834,6 +9846,8 @@ declare namespace chrome.ttsEngine {
|
|
9834
9846
|
* @since Chrome 13.
|
9835
9847
|
*/
|
9836
9848
|
declare namespace chrome.types {
|
9849
|
+
type settingsScope = 'regular' | 'regular_only' | 'incognito_persistent' | 'incognito_session_only' | undefined;
|
9850
|
+
|
9837
9851
|
export interface ChromeSettingClearDetails {
|
9838
9852
|
/**
|
9839
9853
|
* Optional.
|
@@ -9843,7 +9857,7 @@ declare namespace chrome.types {
|
|
9843
9857
|
* • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
|
9844
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).
|
9845
9859
|
*/
|
9846
|
-
scope?:
|
9860
|
+
scope?: settingsScope;
|
9847
9861
|
}
|
9848
9862
|
|
9849
9863
|
export interface ChromeSettingSetDetails extends ChromeSettingClearDetails {
|
@@ -9860,7 +9874,7 @@ declare namespace chrome.types {
|
|
9860
9874
|
* • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
|
9861
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).
|
9862
9876
|
*/
|
9863
|
-
scope?:
|
9877
|
+
scope?: settingsScope;
|
9864
9878
|
}
|
9865
9879
|
|
9866
9880
|
export interface ChromeSettingGetDetails {
|
@@ -9881,7 +9895,7 @@ declare namespace chrome.types {
|
|
9881
9895
|
* • controllable_by_this_extension: can be controlled by this extension
|
9882
9896
|
* • controlled_by_this_extension: controlled by this extension
|
9883
9897
|
*/
|
9884
|
-
levelOfControl:
|
9898
|
+
levelOfControl: 'not_controllable' | 'controlled_by_other_extensions' | 'controllable_by_this_extension' | 'controlled_by_this_extension';
|
9885
9899
|
/** The value of the setting. */
|
9886
9900
|
value: any;
|
9887
9901
|
/**
|
@@ -10019,14 +10033,14 @@ declare namespace chrome.vpnProvider {
|
|
10019
10033
|
declare namespace chrome.wallpaper {
|
10020
10034
|
export interface WallpaperDetails {
|
10021
10035
|
/** Optional. The jpeg or png encoded wallpaper image. */
|
10022
|
-
data?:
|
10036
|
+
data?: ArrayBuffer | undefined;
|
10023
10037
|
/** Optional. The URL of the wallpaper to be set. */
|
10024
10038
|
url?: string | undefined;
|
10025
10039
|
/**
|
10026
10040
|
* The supported wallpaper layouts.
|
10027
10041
|
* One of: "STRETCH", "CENTER", or "CENTER_CROPPED"
|
10028
10042
|
*/
|
10029
|
-
layout:
|
10043
|
+
layout: 'STRETCH' | 'CENTER' | 'CENTER_CROPPED';
|
10030
10044
|
/** The file name of the saved wallpaper. */
|
10031
10045
|
filename: string;
|
10032
10046
|
/** Optional. True if a 128x60 thumbnail should be generated. */
|
@@ -10038,7 +10052,7 @@ declare namespace chrome.wallpaper {
|
|
10038
10052
|
* @param callback
|
10039
10053
|
* Optional parameter thumbnail: The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60.
|
10040
10054
|
*/
|
10041
|
-
export function setWallpaper(details: WallpaperDetails, callback: (thumbnail
|
10055
|
+
export function setWallpaper(details: WallpaperDetails, callback: (thumbnail?: ArrayBuffer) => void): void;
|
10042
10056
|
}
|
10043
10057
|
|
10044
10058
|
////////////////////
|
@@ -10988,6 +11002,18 @@ declare namespace chrome.declarativeNetRequest {
|
|
10988
11002
|
/** Ruleset ID for the session-scoped rules added by the extension. */
|
10989
11003
|
export const SESSION_RULESET_ID: string;
|
10990
11004
|
|
11005
|
+
/** This describes the HTTP request method of a network request. */
|
11006
|
+
export enum RequestMethod {
|
11007
|
+
CONNECT = "connect",
|
11008
|
+
DELETE = "delete",
|
11009
|
+
GET = "get",
|
11010
|
+
HEAD = "head",
|
11011
|
+
OPTIONS = "options",
|
11012
|
+
PATCH = "patch",
|
11013
|
+
POST = "post",
|
11014
|
+
PUT = "put"
|
11015
|
+
}
|
11016
|
+
|
10991
11017
|
/** This describes the resource type of the network request. */
|
10992
11018
|
export enum ResourceType {
|
10993
11019
|
MAIN_FRAME = "main_frame",
|
@@ -11113,13 +11139,15 @@ declare namespace chrome.declarativeNetRequest {
|
|
11113
11139
|
type: RuleActionType;
|
11114
11140
|
}
|
11115
11141
|
|
11116
|
-
export
|
11117
|
-
/**
|
11142
|
+
export type RuleCondition = {
|
11143
|
+
/**
|
11144
|
+
* Specifies whether the network request is first-party or third-party to the domain from which it originated.
|
11118
11145
|
* If omitted, all requests are accepted.
|
11119
11146
|
*/
|
11120
11147
|
domainType?: DomainType | undefined;
|
11121
11148
|
|
11122
|
-
/**
|
11149
|
+
/**
|
11150
|
+
* The rule will only match network requests originating from the list of domains.
|
11123
11151
|
* If the list is omitted, the rule is applied to requests from all domains.
|
11124
11152
|
* An empty list is not allowed.
|
11125
11153
|
*
|
@@ -11131,7 +11159,8 @@ declare namespace chrome.declarativeNetRequest {
|
|
11131
11159
|
*/
|
11132
11160
|
domains?: string[] | undefined;
|
11133
11161
|
|
11134
|
-
/**
|
11162
|
+
/**
|
11163
|
+
* The rule will not match network requests originating from the list of excludedDomains.
|
11135
11164
|
* If the list is empty or omitted, no domains are excluded.
|
11136
11165
|
* This takes precedence over domains.
|
11137
11166
|
*
|
@@ -11143,19 +11172,36 @@ declare namespace chrome.declarativeNetRequest {
|
|
11143
11172
|
*/
|
11144
11173
|
excludedDomains?: string[] | undefined;
|
11145
11174
|
|
11146
|
-
/**
|
11147
|
-
*
|
11175
|
+
/**
|
11176
|
+
* List of request methods which the rule won't match.
|
11177
|
+
* Only one of requestMethods and excludedRequestMethods should be specified.
|
11178
|
+
* If neither of them is specified, all request methods are matched.
|
11179
|
+
*/
|
11180
|
+
excludedRequestMethods?: RequestMethod[] | undefined;
|
11181
|
+
|
11182
|
+
/**
|
11183
|
+
* List of resource types which the rule won't match.
|
11184
|
+
* Only one of {@link chrome.declarativeNetRequest.RuleCondition.resourceTypes}
|
11185
|
+
* and {@link chrome.declarativeNetRequest.RuleCondition.excludedResourceTypes} should be specified.
|
11148
11186
|
* If neither of them is specified, all resource types except "main_frame" are blocked.
|
11149
11187
|
*/
|
11150
11188
|
excludedResourceTypes?: ResourceType[] | undefined;
|
11151
11189
|
|
11190
|
+
/**
|
11191
|
+
* List of {@link chrome.tabs.Tab.id} which the rule should not match.
|
11192
|
+
* An ID of {@link chrome.tabs.TAB_ID_NONE} excludes requests which don't originate from a tab.
|
11193
|
+
* Only supported for session-scoped rules.
|
11194
|
+
*/
|
11195
|
+
excludedTabIds?: number[] | undefined;
|
11196
|
+
|
11152
11197
|
/**
|
11153
11198
|
* Whether the urlFilter or regexFilter (whichever is specified) is case sensitive.
|
11154
11199
|
* Default is true.
|
11155
11200
|
*/
|
11156
11201
|
isUrlFilterCaseSensitive?: boolean | undefined;
|
11157
11202
|
|
11158
|
-
/**
|
11203
|
+
/**
|
11204
|
+
* Regular expression to match against the network request url.
|
11159
11205
|
* This follows the RE2 syntax.
|
11160
11206
|
*
|
11161
11207
|
* Note: Only one of urlFilter or regexFilter can be specified.
|
@@ -11165,14 +11211,22 @@ declare namespace chrome.declarativeNetRequest {
|
|
11165
11211
|
*/
|
11166
11212
|
regexFilter?: string | undefined;
|
11167
11213
|
|
11168
|
-
/**
|
11169
|
-
* An empty list is not allowed.
|
11170
|
-
*
|
11171
|
-
*
|
11214
|
+
/**
|
11215
|
+
* List of HTTP request methods which the rule can match. An empty list is not allowed.
|
11216
|
+
* Note: Specifying a {@link chrome.declarativeNetRequest.RuleCondition.requestMethods} rule condition will also exclude non-HTTP(s) requests,
|
11217
|
+
* whereas specifying {@link chrome.declarativeNetRequest.RuleCondition.excludedRequestMethods} will not.
|
11218
|
+
*/
|
11219
|
+
requestMethods?: RequestMethod[];
|
11220
|
+
|
11221
|
+
/**
|
11222
|
+
* List of {@link chrome.tabs.Tab.id} which the rule should not match.
|
11223
|
+
* An ID of {@link chrome.tabs.TAB_ID_NONE} excludes requests which don't originate from a tab.
|
11224
|
+
* An empty list is not allowed. Only supported for session-scoped rules.
|
11172
11225
|
*/
|
11173
|
-
|
11226
|
+
tabIds?: number[] | undefined;
|
11174
11227
|
|
11175
|
-
/**
|
11228
|
+
/**
|
11229
|
+
* The pattern which is matched against the network request url.
|
11176
11230
|
* Supported constructs:
|
11177
11231
|
*
|
11178
11232
|
* '*' : Wildcard: Matches any number of characters.
|
@@ -11197,7 +11251,26 @@ declare namespace chrome.declarativeNetRequest {
|
|
11197
11251
|
* For example, when the request url is http://abc.рф?q=ф, the urlFilter will be matched against the url http://abc.xn--p1ai/?q=%D1%84.
|
11198
11252
|
*/
|
11199
11253
|
urlFilter?: string | undefined;
|
11200
|
-
}
|
11254
|
+
} & (
|
11255
|
+
| {
|
11256
|
+
/**
|
11257
|
+
* List of resource types which the rule won't match.
|
11258
|
+
* Only one of {@link chrome.declarativeNetRequest.RuleCondition.resourceTypes}
|
11259
|
+
* and {@link chrome.declarativeNetRequest.RuleCondition.excludedResourceTypes} should be specified.
|
11260
|
+
* If neither of them is specified, all resource types except "main_frame" are blocked.
|
11261
|
+
*/
|
11262
|
+
excludedResourceTypes?: ResourceType[] | undefined;
|
11263
|
+
}
|
11264
|
+
| {
|
11265
|
+
/**
|
11266
|
+
* List of resource types which the rule can match.
|
11267
|
+
* An empty list is not allowed.
|
11268
|
+
*
|
11269
|
+
* Note: this must be specified for allowAllRequests rules and may only include the sub_frame and main_frame resource types.
|
11270
|
+
*/
|
11271
|
+
resourceTypes?: ResourceType[] | undefined;
|
11272
|
+
}
|
11273
|
+
);
|
11201
11274
|
|
11202
11275
|
export interface MatchedRule {
|
11203
11276
|
/** A matching rule's ID. */
|
@@ -11367,7 +11440,8 @@ declare namespace chrome.declarativeNetRequest {
|
|
11367
11440
|
/** Rules to add. */
|
11368
11441
|
addRules?: Rule[] | undefined;
|
11369
11442
|
|
11370
|
-
/**
|
11443
|
+
/**
|
11444
|
+
* IDs of the rules to remove.
|
11371
11445
|
* Any invalid IDs will be ignored.
|
11372
11446
|
*/
|
11373
11447
|
removeRuleIds?: number[] | undefined;
|
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
|
}
|