@types/chrome 0.1.23 → 0.1.24
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 +63 -27
- 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: Sat, 11 Oct 2025
|
11
|
+
* Last updated: Sat, 11 Oct 2025 07:32:14 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
@@ -7899,13 +7899,25 @@ declare namespace chrome {
|
|
7899
7899
|
id: string;
|
7900
7900
|
/** Printer's human readable name. */
|
7901
7901
|
name: string;
|
7902
|
-
/**
|
7902
|
+
/** Printer's human readable description. */
|
7903
7903
|
description?: string | undefined;
|
7904
7904
|
}
|
7905
7905
|
|
7906
|
+
/** Error codes returned in response to {@link onPrintRequested} event. */
|
7907
|
+
export enum PrintError {
|
7908
|
+
/** Specifies that the operation was completed successfully. */
|
7909
|
+
OK = "OK",
|
7910
|
+
/** Specifies that a general failure occured. */
|
7911
|
+
FAILED = "FAILED",
|
7912
|
+
/** Specifies that the print ticket is invalid. For example, the ticket is inconsistent with some capabilities, or the extension is not able to handle all settings from the ticket. */
|
7913
|
+
INVALID_TICKET = "INVALID_TICKET",
|
7914
|
+
/** Specifies that the document is invalid. For example, data may be corrupted or the format is incompatible with the extension. */
|
7915
|
+
INVALID_DATA = "INVALID_DATA",
|
7916
|
+
}
|
7917
|
+
|
7906
7918
|
export interface PrinterCapabilities {
|
7907
7919
|
/** Device capabilities in CDD format. */
|
7908
|
-
capabilities:
|
7920
|
+
capabilities: { [key: string]: unknown };
|
7909
7921
|
}
|
7910
7922
|
|
7911
7923
|
export interface PrintJob {
|
@@ -7913,44 +7925,68 @@ declare namespace chrome {
|
|
7913
7925
|
printerId: string;
|
7914
7926
|
/** The print job title. */
|
7915
7927
|
title: string;
|
7916
|
-
/** Print ticket in
|
7928
|
+
/** Print ticket in CJT format. */
|
7917
7929
|
ticket: { [key: string]: unknown };
|
7918
|
-
/** The document content type. Supported formats are
|
7930
|
+
/** The document content type. Supported formats are `application/pdf` and `image/pwg-raster`. */
|
7919
7931
|
contentType: string;
|
7920
|
-
/** Blob containing the document data to print. Format must match
|
7932
|
+
/** Blob containing the document data to print. Format must match `contentType`. */
|
7921
7933
|
document: Blob;
|
7922
7934
|
}
|
7923
7935
|
|
7924
|
-
|
7925
|
-
|
7926
|
-
|
7927
|
-
|
7928
|
-
|
7929
|
-
|
7930
|
-
|
7931
|
-
|
7932
|
-
|
7933
|
-
|
7934
|
-
|
7935
|
-
|
7936
|
-
|
7937
|
-
|
7938
|
-
|
7939
|
-
|
7940
|
-
|
7936
|
+
/** from https://developer.chrome.com/docs/apps/reference/usb#type-Device */
|
7937
|
+
export interface Device {
|
7938
|
+
/** An opaque ID for the USB device. It remains unchanged until the device is unplugged. */
|
7939
|
+
device: number;
|
7940
|
+
/**
|
7941
|
+
* The iManufacturer string read from the device, if available.
|
7942
|
+
* @since Chrome 46
|
7943
|
+
*/
|
7944
|
+
manufacturerName: string;
|
7945
|
+
/** The product ID. */
|
7946
|
+
productId: number;
|
7947
|
+
/**
|
7948
|
+
* The iProduct string read from the device, if available.
|
7949
|
+
* @since Chrome 46
|
7950
|
+
*/
|
7951
|
+
productName: string;
|
7952
|
+
/**
|
7953
|
+
* The iSerialNumber string read from the device, if available.
|
7954
|
+
* @since Chrome 46
|
7955
|
+
*/
|
7956
|
+
serialNumber: string;
|
7957
|
+
/** The device vendor ID. */
|
7958
|
+
vendorId: number;
|
7959
|
+
/**
|
7960
|
+
* The device version (bcdDevice field).
|
7961
|
+
* @since Chrome 51
|
7962
|
+
*/
|
7963
|
+
version: number;
|
7964
|
+
}
|
7941
7965
|
|
7942
7966
|
/** Event fired when print manager requests printers provided by extensions. */
|
7943
|
-
export
|
7967
|
+
export const onGetPrintersRequested: events.Event<
|
7968
|
+
(resultCallback: (printerInfo: PrinterInfo[]) => void) => void
|
7969
|
+
>;
|
7970
|
+
|
7944
7971
|
/**
|
7945
7972
|
* Event fired when print manager requests information about a USB device that may be a printer.
|
7946
|
-
*
|
7973
|
+
*
|
7974
|
+
* Note: An application should not rely on this event being fired more than once per device. If a connected device is supported it should be returned in the {@link onGetPrintersRequested} event.
|
7947
7975
|
* @since Chrome 45
|
7948
7976
|
*/
|
7949
|
-
export
|
7977
|
+
export const onGetUsbPrinterInfoRequested: events.Event<
|
7978
|
+
(device: Device, resultCallback: (printerInfo?: PrinterInfo) => void) => void
|
7979
|
+
>;
|
7980
|
+
|
7950
7981
|
/** Event fired when print manager requests printer capabilities. */
|
7951
|
-
export
|
7982
|
+
export const onGetCapabilityRequested: events.Event<
|
7983
|
+
(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void
|
7984
|
+
>;
|
7985
|
+
|
7952
7986
|
/** Event fired when print manager requests printing. */
|
7953
|
-
export
|
7987
|
+
export const onPrintRequested: events.Event<
|
7988
|
+
(printJob: PrintJob, resultCallback: (result: `${PrintError}`) => void) => void
|
7989
|
+
>;
|
7954
7990
|
}
|
7955
7991
|
|
7956
7992
|
////////////////////
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.24",
|
4
4
|
"description": "TypeScript definitions for chrome",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -94,6 +94,6 @@
|
|
94
94
|
"@types/har-format": "*"
|
95
95
|
},
|
96
96
|
"peerDependencies": {},
|
97
|
-
"typesPublisherContentHash": "
|
97
|
+
"typesPublisherContentHash": "730d0c18220e1638428b77185a71f68f956e1e59195316ce218a90aef4255a1a",
|
98
98
|
"typeScriptVersion": "5.2"
|
99
99
|
}
|