@types/chrome 0.0.164 → 0.0.168
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 +2 -2
- chrome/index.d.ts +28 -6
- chrome/package.json +8 -3
chrome/README.md
CHANGED
@@ -8,9 +8,9 @@ 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: Mon,
|
11
|
+
* Last updated: Mon, 06 Dec 2021 04:01:01 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
|
|
15
15
|
# Credits
|
16
|
-
These definitions were written by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10), [couven92](https://github.com/couven92), [RReverser](https://github.com/rreverser), [sreimer15](https://github.com/sreimer15), [MatCarlson](https://github.com/MatCarlson), [ekinsol](https://github.com/ekinsol), [Thierry Régagnon](https://github.com/tregagnon), [Brian Wilson](https://github.com/echoabstract), [Sebastiaan Pasma](https://github.com/spasma), [bdbai](https://github.com/bdbai), [pokutuna](https://github.com/pokutuna), [Jason Xian](https://github.com/JasonXian), [userTim](https://github.com/usertim), [Idan Zeierman](https://github.com/idan315),
|
16
|
+
These definitions were written by [Matthew Kimber](https://github.com/matthewkimber), [otiai10](https://github.com/otiai10), [couven92](https://github.com/couven92), [RReverser](https://github.com/rreverser), [sreimer15](https://github.com/sreimer15), [MatCarlson](https://github.com/MatCarlson), [ekinsol](https://github.com/ekinsol), [Thierry Régagnon](https://github.com/tregagnon), [Brian Wilson](https://github.com/echoabstract), [Sebastiaan Pasma](https://github.com/spasma), [bdbai](https://github.com/bdbai), [pokutuna](https://github.com/pokutuna), [Jason Xian](https://github.com/JasonXian), [userTim](https://github.com/usertim), [Idan Zeierman](https://github.com/idan315), [Nicolas Rodriguez](https://github.com/nicolas377), and [Ido Salomon](https://github.com/idosal).
|
chrome/index.d.ts
CHANGED
@@ -16,6 +16,7 @@
|
|
16
16
|
// userTim <https://github.com/usertim>
|
17
17
|
// Idan Zeierman <https://github.com/idan315>
|
18
18
|
// Nicolas Rodriguez <https://github.com/nicolas377>
|
19
|
+
// Ido Salomon <https://github.com/idosal>
|
19
20
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
20
21
|
// TypeScript Version: 2.4
|
21
22
|
|
@@ -774,7 +775,7 @@ declare namespace chrome.browserAction {
|
|
774
775
|
|
775
776
|
export interface BadgeTextDetails {
|
776
777
|
/** Any number of characters can be passed, but only about four can fit in the space. */
|
777
|
-
text?: string | null;
|
778
|
+
text?: string | null | undefined;
|
778
779
|
/** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
|
779
780
|
tabId?: number | undefined;
|
780
781
|
}
|
@@ -6487,6 +6488,13 @@ declare namespace chrome.runtime {
|
|
6487
6488
|
export type PlatformArch = 'arm' | 'arm64' | 'x86-32' | 'x86-64' | 'mips' | 'mips64';
|
6488
6489
|
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-PlatformNaclArch */
|
6489
6490
|
export type PlatformNaclArch = 'arm' | 'x86-32' | 'x86-64' | 'mips' | 'mips64';
|
6491
|
+
/** https://developer.chrome.com/docs/extensions/reference/runtime/#type-OnInstalledReason */
|
6492
|
+
export enum OnInstalledReason {
|
6493
|
+
INSTALL = 'install',
|
6494
|
+
UPDATE = 'update',
|
6495
|
+
CHROME_UPDATE = 'chrome_update',
|
6496
|
+
SHARED_MODULE_UPDATE = 'shared_module_update'
|
6497
|
+
}
|
6490
6498
|
|
6491
6499
|
export interface LastError {
|
6492
6500
|
/** Optional. Details about the error which occurred. */
|
@@ -6501,9 +6509,8 @@ declare namespace chrome.runtime {
|
|
6501
6509
|
export interface InstalledDetails {
|
6502
6510
|
/**
|
6503
6511
|
* The reason that this event is being dispatched.
|
6504
|
-
* One of: "install", "update", "chrome_update", or "shared_module_update"
|
6505
6512
|
*/
|
6506
|
-
reason:
|
6513
|
+
reason: OnInstalledReason;
|
6507
6514
|
/**
|
6508
6515
|
* Optional.
|
6509
6516
|
* Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'.
|
@@ -7126,7 +7133,10 @@ declare namespace chrome.runtime {
|
|
7126
7133
|
declare namespace chrome.scripting {
|
7127
7134
|
|
7128
7135
|
/* The CSS style origin for a style change. */
|
7129
|
-
export type StyleOrigin =
|
7136
|
+
export type StyleOrigin = 'AUTHOR' | 'USER';
|
7137
|
+
|
7138
|
+
/* The JavaScript world for a script to execute within. */
|
7139
|
+
export type ExecutionWorld = 'ISOLATED' | 'MAIN';
|
7130
7140
|
|
7131
7141
|
export interface InjectionResult {
|
7132
7142
|
/* The frame associated with the injection. */
|
@@ -7158,6 +7168,8 @@ declare namespace chrome.scripting {
|
|
7158
7168
|
export type ScriptInjection<Args extends any[] = []> = {
|
7159
7169
|
/* Details specifying the target into which to inject the script. */
|
7160
7170
|
target: InjectionTarget;
|
7171
|
+
/* The JavaScript world for a script to execute within. */
|
7172
|
+
world?: ExecutionWorld;
|
7161
7173
|
} & ({
|
7162
7174
|
/* The path of the JS files to inject, relative to the extension's root directory. NOTE: Currently a maximum of one file is supported. Exactly one of files and function must be specified. */
|
7163
7175
|
files: string[];
|
@@ -10739,10 +10751,20 @@ declare namespace chrome.windows {
|
|
10739
10751
|
}
|
10740
10752
|
|
10741
10753
|
export interface WindowIdEvent
|
10742
|
-
extends chrome.events.Event<(windowId: number
|
10754
|
+
extends chrome.events.Event<(windowId: number) => void> {
|
10755
|
+
addListener(
|
10756
|
+
callback: (windowId: number) => void,
|
10757
|
+
filters?: WindowEventFilter,
|
10758
|
+
): void;
|
10759
|
+
}
|
10743
10760
|
|
10744
10761
|
export interface WindowReferenceEvent
|
10745
|
-
extends chrome.events.Event<(window: Window
|
10762
|
+
extends chrome.events.Event<(window: Window) => void> {
|
10763
|
+
addListener(
|
10764
|
+
callback: (window: Window) => void,
|
10765
|
+
filters?: WindowEventFilter,
|
10766
|
+
): void;
|
10767
|
+
}
|
10746
10768
|
|
10747
10769
|
/**
|
10748
10770
|
* Specifies what type of browser window to create.
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.168",
|
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",
|
@@ -84,6 +84,11 @@
|
|
84
84
|
"name": "Nicolas Rodriguez",
|
85
85
|
"url": "https://github.com/nicolas377",
|
86
86
|
"githubUsername": "nicolas377"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"name": "Ido Salomon",
|
90
|
+
"url": "https://github.com/idosal",
|
91
|
+
"githubUsername": "idosal"
|
87
92
|
}
|
88
93
|
],
|
89
94
|
"main": "",
|
@@ -98,6 +103,6 @@
|
|
98
103
|
"@types/filesystem": "*",
|
99
104
|
"@types/har-format": "*"
|
100
105
|
},
|
101
|
-
"typesPublisherContentHash": "
|
102
|
-
"typeScriptVersion": "3.
|
106
|
+
"typesPublisherContentHash": "fe256390c65c3ad9525bd7c17c2a1c984d604df3aef194fbd962b6126ade8cad",
|
107
|
+
"typeScriptVersion": "3.8"
|
103
108
|
}
|