@types/chrome 0.3.3 → 0.3.4
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 +72 -43
- chrome/package.json +2 -2
chrome/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
|
|
|
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: Tue, 29 Sep 2026 02:43:36 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
|
@@ -1972,37 +1972,48 @@ declare namespace chrome {
|
|
|
1972
1972
|
* Properties of the new context menu item.
|
|
1973
1973
|
* @since Chrome 123
|
|
1974
1974
|
*/
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
1975
|
+
type CreateProperties =
|
|
1976
|
+
& ({
|
|
1977
|
+
/** The initial state of a checkbox or radio button: `true` for selected, `false` for unselected. Only one radio button can be selected at a time in a given group. */
|
|
1978
|
+
checked?: boolean;
|
|
1979
|
+
/** List of contexts this menu item will appear in. Defaults to `['page']`. */
|
|
1980
|
+
contexts?: [`${ContextType}`, ...`${ContextType}`[]];
|
|
1981
|
+
/** Restricts the item to apply only to documents or frames whose URL matches one of the given patterns. For details on pattern formats, see Match Patterns. */
|
|
1982
|
+
documentUrlPatterns?: string[];
|
|
1983
|
+
/** Whether this context menu item is enabled or disabled. Defaults to `true`. */
|
|
1984
|
+
enabled?: boolean;
|
|
1985
|
+
/** The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. */
|
|
1986
|
+
id?: string;
|
|
1987
|
+
/** The ID of a parent menu item; this makes the item a child of a previously added item. */
|
|
1988
|
+
parentId?: number | string;
|
|
1989
|
+
/** Similar to `documentUrlPatterns`, filters based on the `src` attribute of `img`, `audio`, and `video` tags and the `href` attribute of `a` tags. */
|
|
1990
|
+
targetUrlPatterns?: string[];
|
|
1991
|
+
/** Whether the item is visible in the menu. */
|
|
1992
|
+
visible?: boolean;
|
|
1993
|
+
/**
|
|
1994
|
+
* A function that is called back when the menu item is clicked. This is not available inside of a service worker; instead, you should register a listener for {@link contextMenus.onClicked}.
|
|
1995
|
+
* @param info Information about the item clicked and the context where the click happened.
|
|
1996
|
+
* @param tab The details of the tab where the click took place. This parameter is not present for platform apps.
|
|
1997
|
+
*/
|
|
1998
|
+
onclick?: (
|
|
1999
|
+
info: OnClickData,
|
|
2000
|
+
tab: tabs.Tab,
|
|
2001
|
+
) => void;
|
|
2002
|
+
})
|
|
2003
|
+
& (
|
|
2004
|
+
| {
|
|
2005
|
+
/** The type of menu item. Defaults to `normal`. */
|
|
2006
|
+
type: `${ItemType.SEPARATOR}`;
|
|
2007
|
+
/** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */
|
|
2008
|
+
title?: string;
|
|
2009
|
+
}
|
|
2010
|
+
| {
|
|
2011
|
+
/** The type of menu item. Defaults to `normal`. */
|
|
2012
|
+
type?: `${Exclude<ItemType, ItemType.SEPARATOR>}`;
|
|
2013
|
+
/** The text to display in the item; this is _required_ unless `type` is `separator`. When the context is `selection`, use `%s` within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */
|
|
2014
|
+
title: string;
|
|
2015
|
+
}
|
|
2016
|
+
);
|
|
2006
2017
|
|
|
2007
2018
|
/**
|
|
2008
2019
|
* The type of menu item.
|
|
@@ -4060,9 +4071,25 @@ declare namespace chrome {
|
|
|
4060
4071
|
size?: 16 | 32 | undefined;
|
|
4061
4072
|
}
|
|
4062
4073
|
|
|
4074
|
+
type DownloadSortableKey = keyof Pick<
|
|
4075
|
+
DownloadItem,
|
|
4076
|
+
| "url"
|
|
4077
|
+
| "bytesReceived"
|
|
4078
|
+
| "danger"
|
|
4079
|
+
| "finalUrl"
|
|
4080
|
+
| "totalBytes"
|
|
4081
|
+
| "filename"
|
|
4082
|
+
| "paused"
|
|
4083
|
+
| "state"
|
|
4084
|
+
| "mime"
|
|
4085
|
+
| "startTime"
|
|
4086
|
+
| "endTime"
|
|
4087
|
+
| "exists"
|
|
4088
|
+
>;
|
|
4089
|
+
|
|
4063
4090
|
interface DownloadQuery {
|
|
4064
4091
|
/** Set elements of this array to {@link DownloadItem} properties in order to sort search results. For example, setting `orderBy=['startTime']` sorts the {@link DownloadItem} by their start time in ascending order. To specify descending order, prefix with a hyphen: '-startTime'. */
|
|
4065
|
-
orderBy?:
|
|
4092
|
+
orderBy?: Array<DownloadSortableKey | `-${DownloadSortableKey}`> | undefined;
|
|
4066
4093
|
/** Limits results to {@link DownloadItem} whose `url` matches the given regular expression. */
|
|
4067
4094
|
urlRegex?: string | undefined;
|
|
4068
4095
|
/** Limits results to {@link DownloadItem} that ended before the given ms in ISO 8601 format. */
|
|
@@ -4081,12 +4108,12 @@ declare namespace chrome {
|
|
|
4081
4108
|
* The absolute URL that this download is being made from, after all redirects.
|
|
4082
4109
|
* @since Chrome 54
|
|
4083
4110
|
*/
|
|
4084
|
-
finalUrl?: string;
|
|
4111
|
+
finalUrl?: string | undefined;
|
|
4085
4112
|
/**
|
|
4086
4113
|
* Limits results to {@link DownloadItem} whose `finalUrl` matches the given regular expression.
|
|
4087
4114
|
* @since Chrome 54
|
|
4088
4115
|
*/
|
|
4089
|
-
finalUrlRegex?: string;
|
|
4116
|
+
finalUrlRegex?: string | undefined;
|
|
4090
4117
|
/** This array of search terms limits results to {@link DownloadItem} whose `filename` or `url` or `finalUrl` contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash. */
|
|
4091
4118
|
query?: string[] | undefined;
|
|
4092
4119
|
/** Limits results to {@link DownloadItem} whose `totalBytes` is less than the given integer. */
|
|
@@ -4163,7 +4190,7 @@ declare namespace chrome {
|
|
|
4163
4190
|
function getFileIcon(downloadId: number, callback: (iconURL?: string) => void): void;
|
|
4164
4191
|
function getFileIcon(
|
|
4165
4192
|
downloadId: number,
|
|
4166
|
-
options: GetFileIconOptions,
|
|
4193
|
+
options: GetFileIconOptions | undefined,
|
|
4167
4194
|
callback: (iconURL?: string) => void,
|
|
4168
4195
|
): void;
|
|
4169
4196
|
|
|
@@ -8480,7 +8507,7 @@ declare namespace chrome {
|
|
|
8480
8507
|
/** Printer capabilities in [CDD format](https://developers.google.com/cloud-print/docs/cdd#cdd-example). The property may be missing. */
|
|
8481
8508
|
capabilities?: { [key: string]: unknown };
|
|
8482
8509
|
/** The status of the printer. */
|
|
8483
|
-
status: PrinterStatus
|
|
8510
|
+
status: `${PrinterStatus}`;
|
|
8484
8511
|
}
|
|
8485
8512
|
|
|
8486
8513
|
/** Status of the print job. */
|
|
@@ -8567,7 +8594,7 @@ declare namespace chrome {
|
|
|
8567
8594
|
/** The id of created print job. This is a unique identifier among all print jobs on the device. If status is not OK, jobId will be null. */
|
|
8568
8595
|
jobId: string | null;
|
|
8569
8596
|
/** The status of the request. */
|
|
8570
|
-
status: SubmitJobStatus
|
|
8597
|
+
status: `${SubmitJobStatus}`;
|
|
8571
8598
|
}
|
|
8572
8599
|
|
|
8573
8600
|
/** The status of submitJob request. */
|
|
@@ -8672,7 +8699,7 @@ declare namespace chrome {
|
|
|
8672
8699
|
/** Displayed name of the printer. */
|
|
8673
8700
|
name: string;
|
|
8674
8701
|
/** The source of the printer. */
|
|
8675
|
-
source: PrinterSource
|
|
8702
|
+
source: `${PrinterSource}`;
|
|
8676
8703
|
/** The full path for the printer. Contains protocol, hostname, port, and queue. */
|
|
8677
8704
|
uri: string;
|
|
8678
8705
|
}
|
|
@@ -8700,15 +8727,15 @@ declare namespace chrome {
|
|
|
8700
8727
|
* The status of the printer.
|
|
8701
8728
|
* @since Chrome 85
|
|
8702
8729
|
*/
|
|
8703
|
-
printer_status:
|
|
8730
|
+
printer_status: `${printing.PrinterStatus}`;
|
|
8704
8731
|
/** The settings of the print job. */
|
|
8705
8732
|
settings: PrintSettings;
|
|
8706
8733
|
/** Source showing who initiated the print job. */
|
|
8707
|
-
source: PrintJobSource
|
|
8734
|
+
source: `${PrintJobSource}`;
|
|
8708
8735
|
/** ID of source. Null if source is PRINT_PREVIEW or ANDROID_APP. */
|
|
8709
8736
|
sourceId: string | null;
|
|
8710
8737
|
/** The final status of the job. */
|
|
8711
|
-
status: PrintJobStatus
|
|
8738
|
+
status: `${PrintJobStatus}`;
|
|
8712
8739
|
/** The title of the document which was printed. */
|
|
8713
8740
|
title: string;
|
|
8714
8741
|
}
|
|
@@ -8737,11 +8764,11 @@ declare namespace chrome {
|
|
|
8737
8764
|
|
|
8738
8765
|
interface PrintSettings {
|
|
8739
8766
|
/** The requested color mode. */
|
|
8740
|
-
color: ColorMode
|
|
8767
|
+
color: `${ColorMode}`;
|
|
8741
8768
|
/** The requested number of copies. */
|
|
8742
8769
|
copies: number;
|
|
8743
8770
|
/** The requested duplex mode. */
|
|
8744
|
-
duplex: DuplexMode
|
|
8771
|
+
duplex: `${DuplexMode}`;
|
|
8745
8772
|
/** The requested media size. */
|
|
8746
8773
|
mediaSize: MediaSize;
|
|
8747
8774
|
}
|
|
@@ -8772,6 +8799,7 @@ declare namespace chrome {
|
|
|
8772
8799
|
* @since Chrome 151
|
|
8773
8800
|
*/
|
|
8774
8801
|
enum AutofillBlockedType {
|
|
8802
|
+
ALL = "all",
|
|
8775
8803
|
CONTACT_INFO = "contact_info",
|
|
8776
8804
|
PAYMENTS = "payments",
|
|
8777
8805
|
IDENTITY_DOCS = "identity_docs",
|
|
@@ -8920,6 +8948,7 @@ declare namespace chrome {
|
|
|
8920
8948
|
* The value of this preference is of type boolean, and the default value is `true`.
|
|
8921
8949
|
* Extensions may only disable this API by setting the value to `false`. If you try setting this API to `true`, it will throw an error.
|
|
8922
8950
|
* @since Chrome 121
|
|
8951
|
+
* @deprecated since Chrome 144. Will be removed around Chrome 153.
|
|
8923
8952
|
*/
|
|
8924
8953
|
relatedWebsiteSetsEnabled: chrome.types.ChromeSetting<boolean>;
|
|
8925
8954
|
|
chrome/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chrome",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "TypeScript definitions for chrome",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"@types/har-format": "*"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {},
|
|
57
|
-
"typesPublisherContentHash": "
|
|
57
|
+
"typesPublisherContentHash": "8333a5224a70471d616693cb5beb009d2e8ec64aa705732c9853b5d7a356789f",
|
|
58
58
|
"typeScriptVersion": "5.6"
|
|
59
59
|
}
|