@types/chrome 0.0.198 → 0.0.200
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 +71 -1
- 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: Wed, 26 Oct 2022 20:32:58 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
@@ -7061,6 +7061,7 @@ declare namespace chrome.runtime {
|
|
7061
7061
|
| 'geolocation'
|
7062
7062
|
| 'history'
|
7063
7063
|
| 'identity'
|
7064
|
+
| 'identity.email'
|
7064
7065
|
| 'idle'
|
7065
7066
|
| 'loginState'
|
7066
7067
|
| 'management'
|
@@ -7616,6 +7617,26 @@ declare namespace chrome.scripting {
|
|
7616
7617
|
|
7617
7618
|
type Awaited<T> = T extends PromiseLike<infer U> ? U : T;
|
7618
7619
|
|
7620
|
+
interface RegisteredContentScript {
|
7621
|
+
id: string;
|
7622
|
+
allFrames?: boolean;
|
7623
|
+
css?: string[];
|
7624
|
+
excludeMatches?: string[];
|
7625
|
+
js?: string[];
|
7626
|
+
matches?: string[];
|
7627
|
+
persistAcrossSessions?: boolean;
|
7628
|
+
runAt?: "document_start" | "document_end" | "document_idle";
|
7629
|
+
world?: ExecutionWorld;
|
7630
|
+
}
|
7631
|
+
|
7632
|
+
interface ContentScriptFilter {
|
7633
|
+
ids?: string[];
|
7634
|
+
css?: string;
|
7635
|
+
files?: string[];
|
7636
|
+
origin?: StyleOrigin;
|
7637
|
+
target?: InjectionTarget;
|
7638
|
+
}
|
7639
|
+
|
7619
7640
|
/**
|
7620
7641
|
* Injects a script into a target context. The script will be run at document_end.
|
7621
7642
|
* @param injection
|
@@ -7672,6 +7693,48 @@ declare namespace chrome.scripting {
|
|
7672
7693
|
* @since Chrome 90
|
7673
7694
|
*/
|
7674
7695
|
export function removeCSS(injection: CSSInjection, callback?: () => void): void;
|
7696
|
+
|
7697
|
+
/**
|
7698
|
+
* Registers one or more content scripts.
|
7699
|
+
* @param scripts
|
7700
|
+
*/
|
7701
|
+
export function registerContentScripts(scripts: RegisteredContentScript[]): Promise<void>;
|
7702
|
+
|
7703
|
+
/**
|
7704
|
+
* Registers one or more content scripts.
|
7705
|
+
* @param scripts
|
7706
|
+
* @param callback
|
7707
|
+
*/
|
7708
|
+
export function registerContentScripts(scripts: RegisteredContentScript[], callback?: () => void): void;
|
7709
|
+
|
7710
|
+
/**
|
7711
|
+
* Unregister one or more content scripts.
|
7712
|
+
* @param filter
|
7713
|
+
* @param callback
|
7714
|
+
*/
|
7715
|
+
export function unregisterContentScripts(filter?: ContentScriptFilter): Promise<void>;
|
7716
|
+
|
7717
|
+
/**
|
7718
|
+
* Unregister one or more content scripts.
|
7719
|
+
* @param filter
|
7720
|
+
* @param callback
|
7721
|
+
*/
|
7722
|
+
export function unregisterContentScripts(filter?: ContentScriptFilter, callback?: () => void): void;
|
7723
|
+
|
7724
|
+
/**
|
7725
|
+
* Returns all the content scripts registered with scripting.registerContentScripts()
|
7726
|
+
* or a subset of the registered scripts when using a filter.
|
7727
|
+
* @param filter
|
7728
|
+
*/
|
7729
|
+
export function getRegisteredContentScripts(filter?: ContentScriptFilter): Promise<RegisteredContentScript[]>;
|
7730
|
+
|
7731
|
+
/**
|
7732
|
+
* Returns all the content scripts registered with scripting.registerContentScripts()
|
7733
|
+
* or a subset of the registered scripts when using a filter.
|
7734
|
+
* @param filter
|
7735
|
+
* @param callback
|
7736
|
+
*/
|
7737
|
+
export function getRegisteredContentScripts(filter?: ContentScriptFilter, callback?: (scripts: RegisteredContentScript[]) => void): void;
|
7675
7738
|
}
|
7676
7739
|
|
7677
7740
|
////////////////////
|
@@ -10170,11 +10233,17 @@ declare namespace chrome.tts {
|
|
10170
10233
|
charIndex?: number | undefined;
|
10171
10234
|
/** Optional. The error description, if the event type is 'error'. */
|
10172
10235
|
errorMessage?: string | undefined;
|
10236
|
+
/**
|
10237
|
+
* The length of the next part of the utterance.
|
10238
|
+
* For example, in a word event, this is the length of the word which will be spoken next.
|
10239
|
+
* It will be set to -1 if not set by the speech engine.
|
10240
|
+
*/
|
10241
|
+
length?: number | undefined;
|
10173
10242
|
/**
|
10174
10243
|
* The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances.
|
10175
10244
|
* One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume"
|
10176
10245
|
*/
|
10177
|
-
type:
|
10246
|
+
type: "start" | "end" | "word" | "sentence" | "marker" | "interrupted" | "cancelled" | "error" | "pause" | "resume";
|
10178
10247
|
}
|
10179
10248
|
|
10180
10249
|
/** A description of a voice available for speech synthesis. */
|
@@ -10245,6 +10314,7 @@ declare namespace chrome.tts {
|
|
10245
10314
|
/** Stops any current speech and flushes the queue of any pending utterances. In addition, if speech was paused, it will now be un-paused for the next call to speak. */
|
10246
10315
|
export function stop(): void;
|
10247
10316
|
/** Gets an array of all available voices. */
|
10317
|
+
export function getVoices(): Promise<TtsVoice[]>;
|
10248
10318
|
export function getVoices(callback?: (voices: TtsVoice[]) => void): void;
|
10249
10319
|
/**
|
10250
10320
|
* Speaks text using a text-to-speech engine.
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.200",
|
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",
|
@@ -88,6 +88,6 @@
|
|
88
88
|
"@types/filesystem": "*",
|
89
89
|
"@types/har-format": "*"
|
90
90
|
},
|
91
|
-
"typesPublisherContentHash": "
|
91
|
+
"typesPublisherContentHash": "92b46a975b500d4ae1612850f79c8701c15bf3c75bbfdfbb4cfaa28dacdd4da7",
|
92
92
|
"typeScriptVersion": "4.1"
|
93
93
|
}
|