@types/chrome 0.0.156 → 0.0.160
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 +30 -18
- 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: Sat, 23 Oct 2021 18:31:19 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
@@ -128,7 +128,7 @@ declare namespace chrome.action {
|
|
128
128
|
popup: string;
|
129
129
|
}
|
130
130
|
|
131
|
-
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
|
131
|
+
export interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> { }
|
132
132
|
|
133
133
|
export interface TabIconDetails {
|
134
134
|
/** 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}' */
|
@@ -2615,6 +2615,8 @@ declare namespace chrome.downloads {
|
|
2615
2615
|
value: string;
|
2616
2616
|
}
|
2617
2617
|
|
2618
|
+
export type FilenameConflictAction = "uniquify" | "overwrite" | "prompt";
|
2619
|
+
|
2618
2620
|
export interface DownloadOptions {
|
2619
2621
|
/** Optional. Post body. */
|
2620
2622
|
body?: string | undefined;
|
@@ -2627,9 +2629,9 @@ declare namespace chrome.downloads {
|
|
2627
2629
|
/** Optional. Extra HTTP headers to send with the request if the URL uses the HTTP[s] protocol. Each header is represented as a dictionary containing the keys name and either value or binaryValue, restricted to those allowed by XMLHttpRequest. */
|
2628
2630
|
headers?: HeaderNameValuePair[] | undefined;
|
2629
2631
|
/** Optional. The HTTP method to use if the URL uses the HTTP[S] protocol. */
|
2630
|
-
method?:
|
2632
|
+
method?: "GET" | "POST" | undefined;
|
2631
2633
|
/** Optional. The action to take if filename already exists. */
|
2632
|
-
conflictAction?:
|
2634
|
+
conflictAction?: FilenameConflictAction | undefined;
|
2633
2635
|
}
|
2634
2636
|
|
2635
2637
|
export interface DownloadDelta {
|
@@ -2643,7 +2645,7 @@ declare namespace chrome.downloads {
|
|
2643
2645
|
* Optional. The change in finalUrl, if any.
|
2644
2646
|
* @since Since Chrome 54.
|
2645
2647
|
*/
|
2646
|
-
finalUrl
|
2648
|
+
finalUrl?: StringDelta | undefined;
|
2647
2649
|
/** Optional. The change in totalBytes, if any. */
|
2648
2650
|
totalBytes?: DoubleDelta | undefined;
|
2649
2651
|
/** Optional. The change in filename, if any. */
|
@@ -2684,11 +2686,17 @@ declare namespace chrome.downloads {
|
|
2684
2686
|
previous?: string | undefined;
|
2685
2687
|
}
|
2686
2688
|
|
2689
|
+
export type DownloadInterruptReason = "FILE_FAILED" | "FILE_ACCESS_DENIED" | "FILE_NO_SPACE" | "FILE_NAME_TOO_LONG" | "FILE_TOO_LARGE" | "FILE_VIRUS_INFECTED" | "FILE_TRANSIENT_ERROR" | "FILE_BLOCKED" | "FILE_SECURITY_CHECK_FAILED" | "FILE_TOO_SHORT" | "FILE_HASH_MISMATCH" | "FILE_SAME_AS_SOURCE" | "NETWORK_FAILED" | "NETWORK_TIMEOUT" | "NETWORK_DISCONNECTED" | "NETWORK_SERVER_DOWN" | "NETWORK_INVALID_REQUEST" | "SERVER_FAILED" | "SERVER_NO_RANGE" | "SERVER_BAD_CONTENT" | "SERVER_UNAUTHORIZED" | "SERVER_CERT_PROBLEM" | "SERVER_FORBIDDEN" | "SERVER_UNREACHABLE" | "SERVER_CONTENT_LENGTH_MISMATCH" | "SERVER_CROSS_ORIGIN_REDIRECT" | "USER_CANCELED" | "USER_SHUTDOWN" | "CRASH";
|
2690
|
+
|
2691
|
+
export type DownloadState = "in_progress" | "interrupted" | "complete";
|
2692
|
+
|
2693
|
+
export type DangerType = "file" | "url" | "content" | "uncommon" | "host" | "unwanted" | "safe" | "accepted";
|
2694
|
+
|
2687
2695
|
export interface DownloadItem {
|
2688
2696
|
/** Number of bytes received so far from the host, without considering file compression. */
|
2689
2697
|
bytesReceived: number;
|
2690
2698
|
/** Indication of whether this download is thought to be safe or known to be suspicious. */
|
2691
|
-
danger:
|
2699
|
+
danger: DangerType;
|
2692
2700
|
/** The absolute URL that this download initiated from, before any redirects. */
|
2693
2701
|
url: string;
|
2694
2702
|
/**
|
@@ -2703,7 +2711,7 @@ declare namespace chrome.downloads {
|
|
2703
2711
|
/** True if the download has stopped reading data from the host, but kept the connection open. */
|
2704
2712
|
paused: boolean;
|
2705
2713
|
/** Indicates whether the download is progressing, interrupted, or complete. */
|
2706
|
-
state:
|
2714
|
+
state: DownloadState;
|
2707
2715
|
/** The file's MIME type. */
|
2708
2716
|
mime: string;
|
2709
2717
|
/** Number of bytes in the whole file post-decompression, or -1 if unknown. */
|
@@ -2711,7 +2719,7 @@ declare namespace chrome.downloads {
|
|
2711
2719
|
/** The time when the download began in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){console.log(new Date(item.startTime))})}) */
|
2712
2720
|
startTime: string;
|
2713
2721
|
/** Optional. Why the download was interrupted. Several kinds of HTTP errors may be grouped under one of the errors beginning with SERVER_. Errors relating to the network begin with NETWORK_, errors relating to the process of writing the file to the file system begin with FILE_, and interruptions initiated by the user begin with USER_. */
|
2714
|
-
error?:
|
2722
|
+
error?: DownloadInterruptReason | undefined;
|
2715
2723
|
/** Optional. The time when the download ended in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){if (item.endTime) console.log(new Date(item.endTime))})}) */
|
2716
2724
|
endTime?: string | undefined;
|
2717
2725
|
/** An identifier that is persistent across browser sessions. */
|
@@ -2735,7 +2743,7 @@ declare namespace chrome.downloads {
|
|
2735
2743
|
export interface GetFileIconOptions {
|
2736
2744
|
/** Optional. * The size of the returned icon. The icon will be square with dimensions size * size pixels. The default and largest size for the icon is 32x32 pixels. The only supported sizes are 16 and 32. It is an error to specify any other size.
|
2737
2745
|
*/
|
2738
|
-
size?:
|
2746
|
+
size?: 16 | 32 | undefined;
|
2739
2747
|
}
|
2740
2748
|
|
2741
2749
|
export interface DownloadQuery {
|
@@ -6187,7 +6195,7 @@ declare namespace chrome.serial {
|
|
6187
6195
|
/** Flag indicating whether the connection is blocked from firing onReceive events. */
|
6188
6196
|
paused: boolean;
|
6189
6197
|
/** See ConnectionOptions.persistent */
|
6190
|
-
|
6198
|
+
persistent: boolean;
|
6191
6199
|
/** See ConnectionOptions.name */
|
6192
6200
|
name: string;
|
6193
6201
|
/** See ConnectionOptions.bufferSize */
|
@@ -6212,7 +6220,7 @@ declare namespace chrome.serial {
|
|
6212
6220
|
export interface ConnectionOptions {
|
6213
6221
|
/** Optional. Flag indicating whether or not the connection should be left open when the application is suspended (see Manage App Lifecycle: https://developer.chrome.com/apps/app_lifecycle).
|
6214
6222
|
* The default value is "false." When the application is loaded, any serial connections previously opened with persistent=true can be fetched with getConnections. */
|
6215
|
-
|
6223
|
+
persistent?: boolean | undefined;
|
6216
6224
|
/** Optional. An application-defined string to associate with the connection. */
|
6217
6225
|
name?: string | undefined;
|
6218
6226
|
/** Optional. The size of the buffer used to receive data. The default value is 4096. */
|
@@ -6448,6 +6456,13 @@ declare namespace chrome.runtime {
|
|
6448
6456
|
/** The ID of the extension/app. */
|
6449
6457
|
export var id: string;
|
6450
6458
|
|
6459
|
+
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformOs */
|
6460
|
+
export type PlatformOs = 'mac' | 'win' | 'android' | 'cros' | 'linux' | 'openbsd';
|
6461
|
+
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformArch */
|
6462
|
+
export type PlatformArch = 'arm' | 'arm64' | 'x86-32' | 'x86-64' | 'mips' | 'mips64';
|
6463
|
+
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformNaclArch */
|
6464
|
+
export type PlatformNaclArch = 'arm' | 'x86-32' | 'x86-64' | 'mips' | 'mips64';
|
6465
|
+
|
6451
6466
|
export interface LastError {
|
6452
6467
|
/** Optional. Details about the error which occurred. */
|
6453
6468
|
message?: string | undefined;
|
@@ -6524,19 +6539,16 @@ declare namespace chrome.runtime {
|
|
6524
6539
|
export interface PlatformInfo {
|
6525
6540
|
/**
|
6526
6541
|
* The operating system chrome is running on.
|
6527
|
-
* One of: "mac", "win", "android", "cros", "linux", or "openbsd"
|
6528
6542
|
*/
|
6529
|
-
os:
|
6543
|
+
os: PlatformOs;
|
6530
6544
|
/**
|
6531
6545
|
* The machine's processor architecture.
|
6532
|
-
* One of: "arm", "x86-32", or "x86-64"
|
6533
6546
|
*/
|
6534
|
-
arch:
|
6547
|
+
arch: PlatformArch;
|
6535
6548
|
/**
|
6536
6549
|
* The native client architecture. This may be different from arch on some platforms.
|
6537
|
-
* One of: "arm", "x86-32", or "x86-64"
|
6538
6550
|
*/
|
6539
|
-
nacl_arch:
|
6551
|
+
nacl_arch: PlatformNaclArch;
|
6540
6552
|
}
|
6541
6553
|
|
6542
6554
|
/**
|
@@ -10907,11 +10919,11 @@ declare namespace chrome.declarativeNetRequest {
|
|
10907
10919
|
IMAGE = "image",
|
10908
10920
|
FONT = "font",
|
10909
10921
|
OBJECT = "object",
|
10910
|
-
|
10922
|
+
XMLHTTPREQUEST = "xmlhttprequest",
|
10911
10923
|
PING = "ping",
|
10912
10924
|
CSP_REPORT = "csp_report",
|
10913
10925
|
MEDIA = "media",
|
10914
|
-
|
10926
|
+
WEBSOCKET = "websocket",
|
10915
10927
|
OTHER = "other"
|
10916
10928
|
}
|
10917
10929
|
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.160",
|
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": "b51f40588590dbced89b9018e1fdd44615575de3277c0d367e5afdf234f7a119",
|
102
102
|
"typeScriptVersion": "3.7"
|
103
103
|
}
|