@types/chrome 0.0.219 → 0.0.220
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 +11 -11
- 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, 06 Mar 2023 23:32:44 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
@@ -774,12 +774,12 @@ declare namespace chrome.browserAction {
|
|
774
774
|
/** The string the browser action should display when moused over. */
|
775
775
|
title: string;
|
776
776
|
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
777
|
-
tabId?: number |
|
777
|
+
tabId?: number | null;
|
778
778
|
}
|
779
779
|
|
780
780
|
export interface TabDetails {
|
781
781
|
/** Optional. Specify the tab to get the information. If no tab is specified, the non-tab-specific information is returned. */
|
782
|
-
tabId?: number |
|
782
|
+
tabId?: number | null;
|
783
783
|
}
|
784
784
|
|
785
785
|
export interface TabIconDetails {
|
@@ -793,7 +793,7 @@ declare namespace chrome.browserAction {
|
|
793
793
|
|
794
794
|
export interface PopupDetails {
|
795
795
|
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
796
|
-
tabId?: number |
|
796
|
+
tabId?: number | null;
|
797
797
|
/** The html file to show in a popup. If set to the empty string (''), no popup is shown. */
|
798
798
|
popup: string;
|
799
799
|
}
|
@@ -806,15 +806,15 @@ declare namespace chrome.browserAction {
|
|
806
806
|
* @param tabId The id of the tab for which you want to modify the browser action.
|
807
807
|
* @return The `enable` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
808
808
|
*/
|
809
|
-
export function enable(tabId?: number): Promise<void>;
|
809
|
+
export function enable(tabId?: number | null): Promise<void>;
|
810
810
|
/**
|
811
811
|
* Since Chrome 22.
|
812
812
|
* Enables the browser action for a tab. By default, browser actions are enabled.
|
813
813
|
* @param tabId The id of the tab for which you want to modify the browser action.
|
814
814
|
* @param callback Supported since Chrome 67
|
815
815
|
*/
|
816
|
-
export function enable(callback
|
817
|
-
export function enable(tabId: number, callback
|
816
|
+
export function enable(callback?: () => void): void;
|
817
|
+
export function enable(tabId: number | null | undefined, callback?: () => void): void;
|
818
818
|
/**
|
819
819
|
* Sets the background color for the badge.
|
820
820
|
* @return The `setBadgeBackgroundColor` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -824,7 +824,7 @@ declare namespace chrome.browserAction {
|
|
824
824
|
* Sets the background color for the badge.
|
825
825
|
* @param callback Supported since Chrome 67
|
826
826
|
*/
|
827
|
-
export function setBadgeBackgroundColor(details: BadgeBackgroundColorDetails, callback
|
827
|
+
export function setBadgeBackgroundColor(details: BadgeBackgroundColorDetails, callback?: () => void): void;
|
828
828
|
/**
|
829
829
|
* Sets the badge text for the browser action. The badge is displayed on top of the icon.
|
830
830
|
* @return The `setBadgeText` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
@@ -866,14 +866,14 @@ declare namespace chrome.browserAction {
|
|
866
866
|
* Sets the html document to be opened as a popup when the user clicks on the browser action's icon.
|
867
867
|
* @param callback Supported since Chrome 67
|
868
868
|
*/
|
869
|
-
export function setPopup(details: PopupDetails, callback
|
869
|
+
export function setPopup(details: PopupDetails, callback?: () => void): void;
|
870
870
|
/**
|
871
871
|
* Since Chrome 22.
|
872
872
|
* Disables the browser action for a tab.
|
873
873
|
* @param tabId The id of the tab for which you want to modify the browser action.
|
874
874
|
* @return The `disable` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
875
875
|
*/
|
876
|
-
export function disable(tabId?: number): Promise<void>;
|
876
|
+
export function disable(tabId?: number | null): Promise<void>;
|
877
877
|
/**
|
878
878
|
* Since Chrome 22.
|
879
879
|
* Disables the browser action for a tab.
|
@@ -881,7 +881,7 @@ declare namespace chrome.browserAction {
|
|
881
881
|
* @param callback Supported since Chrome 67
|
882
882
|
*/
|
883
883
|
export function disable(callback: () => void): void;
|
884
|
-
export function disable(tabId
|
884
|
+
export function disable(tabId?: number | null, callback?: () => void): void;
|
885
885
|
/**
|
886
886
|
* Since Chrome 19.
|
887
887
|
* Gets the title of the browser action.
|
@@ -918,7 +918,7 @@ declare namespace chrome.browserAction {
|
|
918
918
|
/**
|
919
919
|
* Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
|
920
920
|
*/
|
921
|
-
export function setIcon(details: TabIconDetails, callback
|
921
|
+
export function setIcon(details: TabIconDetails, callback?: Function): void;
|
922
922
|
|
923
923
|
/** Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. */
|
924
924
|
export var onClicked: BrowserClickedEvent;
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.220",
|
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": "
|
96
|
+
"typesPublisherContentHash": "2e46caad2c34ed12445ec7f1aced10dc244b91ed4fe8eefddd26ec31a4d4e87b",
|
97
97
|
"typeScriptVersion": "4.2"
|
98
98
|
}
|