@types/chrome 0.0.217 → 0.0.219

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +12 -36
  3. 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: Sun, 19 Feb 2023 20:32:44 GMT
11
+ * Last updated: Thu, 02 Mar 2023 23:02:41 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
@@ -1729,26 +1729,13 @@ declare namespace chrome.contextMenus {
1729
1729
  * @param updateProperties The properties to update. Accepts the same values as the create function.
1730
1730
  * @param callback Called when the context menu has been updated.
1731
1731
  */
1732
- export function update(id: string, updateProperties: UpdateProperties, callback?: () => void): void;
1733
- /**
1734
- * Updates a previously created context menu item.
1735
- * @param id The ID of the item to update.
1736
- * @param updateProperties The properties to update. Accepts the same values as the create function.
1737
- * @param callback Called when the context menu has been updated.
1738
- */
1739
- export function update(id: number, updateProperties: UpdateProperties, callback?: () => void): void;
1740
- /**
1741
- * Removes a context menu item.
1742
- * @param menuItemId The ID of the context menu item to remove.
1743
- * @param callback Called when the context menu has been removed.
1744
- */
1745
- export function remove(menuItemId: string, callback?: () => void): void;
1732
+ export function update(id: string | number, updateProperties: UpdateProperties, callback?: () => void): void;
1746
1733
  /**
1747
1734
  * Removes a context menu item.
1748
1735
  * @param menuItemId The ID of the context menu item to remove.
1749
1736
  * @param callback Called when the context menu has been removed.
1750
1737
  */
1751
- export function remove(menuItemId: number, callback?: () => void): void;
1738
+ export function remove(menuItemId: string | number, callback?: () => void): void;
1752
1739
 
1753
1740
  /**
1754
1741
  * Since Chrome 21.
@@ -11526,7 +11513,7 @@ declare namespace chrome.declarativeNetRequest {
11526
11513
  type: RuleActionType;
11527
11514
  }
11528
11515
 
11529
- export type RuleCondition = {
11516
+ export interface RuleCondition {
11530
11517
  /**
11531
11518
  * Specifies whether the network request is first-party or third-party to the domain from which it originated.
11532
11519
  * If omitted, all requests are accepted.
@@ -11692,26 +11679,15 @@ declare namespace chrome.declarativeNetRequest {
11692
11679
  * 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.
11693
11680
  */
11694
11681
  urlFilter?: string | undefined;
11695
- } & (
11696
- | {
11697
- /**
11698
- * List of resource types which the rule won't match.
11699
- * Only one of {@link chrome.declarativeNetRequest.RuleCondition.resourceTypes}
11700
- * and {@link chrome.declarativeNetRequest.RuleCondition.excludedResourceTypes} should be specified.
11701
- * If neither of them is specified, all resource types except "main_frame" are blocked.
11702
- */
11703
- excludedResourceTypes?: ResourceType[] | undefined;
11704
- }
11705
- | {
11706
- /**
11707
- * List of resource types which the rule can match.
11708
- * An empty list is not allowed.
11709
- *
11710
- * Note: this must be specified for allowAllRequests rules and may only include the sub_frame and main_frame resource types.
11711
- */
11712
- resourceTypes?: ResourceType[] | undefined;
11713
- }
11714
- );
11682
+
11683
+ /**
11684
+ * List of resource types which the rule can match.
11685
+ * An empty list is not allowed.
11686
+ *
11687
+ * Note: this must be specified for allowAllRequests rules and may only include the sub_frame and main_frame resource types.
11688
+ */
11689
+ resourceTypes?: ResourceType[] | undefined;
11690
+ }
11715
11691
 
11716
11692
  export interface MatchedRule {
11717
11693
  /** A matching rule's ID. */
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.217",
3
+ "version": "0.0.219",
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",
@@ -93,6 +93,6 @@
93
93
  "@types/filesystem": "*",
94
94
  "@types/har-format": "*"
95
95
  },
96
- "typesPublisherContentHash": "38d57c64da31ca3ba901327553f7e6054711549e3652c5717e62e59987c4d9e9",
96
+ "typesPublisherContentHash": "a1321da46e66464a3e59cf8b3dcfc46964a2e33742550c2a39eb940757545dd2",
97
97
  "typeScriptVersion": "4.2"
98
98
  }