@types/chrome 0.0.198 → 0.0.199
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 +70 -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: Thu, 20 Oct 2022 11:33:06 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
@@ -7616,6 +7616,26 @@ declare namespace chrome.scripting {
|
|
7616
7616
|
|
7617
7617
|
type Awaited<T> = T extends PromiseLike<infer U> ? U : T;
|
7618
7618
|
|
7619
|
+
interface RegisteredContentScript {
|
7620
|
+
id: string;
|
7621
|
+
allFrames?: boolean;
|
7622
|
+
css?: string[];
|
7623
|
+
excludeMatches?: string[];
|
7624
|
+
js?: string[];
|
7625
|
+
matches?: string[];
|
7626
|
+
persistAcrossSessions?: boolean;
|
7627
|
+
runAt?: "document_start" | "document_end" | "document_idle";
|
7628
|
+
world?: ExecutionWorld;
|
7629
|
+
}
|
7630
|
+
|
7631
|
+
interface ContentScriptFilter {
|
7632
|
+
ids?: string[];
|
7633
|
+
css?: string;
|
7634
|
+
files?: string[];
|
7635
|
+
origin?: StyleOrigin;
|
7636
|
+
target?: InjectionTarget;
|
7637
|
+
}
|
7638
|
+
|
7619
7639
|
/**
|
7620
7640
|
* Injects a script into a target context. The script will be run at document_end.
|
7621
7641
|
* @param injection
|
@@ -7672,6 +7692,48 @@ declare namespace chrome.scripting {
|
|
7672
7692
|
* @since Chrome 90
|
7673
7693
|
*/
|
7674
7694
|
export function removeCSS(injection: CSSInjection, callback?: () => void): void;
|
7695
|
+
|
7696
|
+
/**
|
7697
|
+
* Registers one or more content scripts.
|
7698
|
+
* @param scripts
|
7699
|
+
*/
|
7700
|
+
export function registerContentScripts(scripts: RegisteredContentScript[]): Promise<void>;
|
7701
|
+
|
7702
|
+
/**
|
7703
|
+
* Registers one or more content scripts.
|
7704
|
+
* @param scripts
|
7705
|
+
* @param callback
|
7706
|
+
*/
|
7707
|
+
export function registerContentScripts(scripts: RegisteredContentScript[], callback?: () => void): void;
|
7708
|
+
|
7709
|
+
/**
|
7710
|
+
* Unregister one or more content scripts.
|
7711
|
+
* @param filter
|
7712
|
+
* @param callback
|
7713
|
+
*/
|
7714
|
+
export function unregisterContentScripts(filter?: ContentScriptFilter): Promise<void>;
|
7715
|
+
|
7716
|
+
/**
|
7717
|
+
* Unregister one or more content scripts.
|
7718
|
+
* @param filter
|
7719
|
+
* @param callback
|
7720
|
+
*/
|
7721
|
+
export function unregisterContentScripts(filter?: ContentScriptFilter, callback?: () => void): void;
|
7722
|
+
|
7723
|
+
/**
|
7724
|
+
* Returns all the content scripts registered with scripting.registerContentScripts()
|
7725
|
+
* or a subset of the registered scripts when using a filter.
|
7726
|
+
* @param filter
|
7727
|
+
*/
|
7728
|
+
export function getRegisteredContentScripts(filter?: ContentScriptFilter): Promise<RegisteredContentScript[]>;
|
7729
|
+
|
7730
|
+
/**
|
7731
|
+
* Returns all the content scripts registered with scripting.registerContentScripts()
|
7732
|
+
* or a subset of the registered scripts when using a filter.
|
7733
|
+
* @param filter
|
7734
|
+
* @param callback
|
7735
|
+
*/
|
7736
|
+
export function getRegisteredContentScripts(filter?: ContentScriptFilter, callback?: (scripts: RegisteredContentScript[]) => void): void;
|
7675
7737
|
}
|
7676
7738
|
|
7677
7739
|
////////////////////
|
@@ -10170,11 +10232,17 @@ declare namespace chrome.tts {
|
|
10170
10232
|
charIndex?: number | undefined;
|
10171
10233
|
/** Optional. The error description, if the event type is 'error'. */
|
10172
10234
|
errorMessage?: string | undefined;
|
10235
|
+
/**
|
10236
|
+
* The length of the next part of the utterance.
|
10237
|
+
* For example, in a word event, this is the length of the word which will be spoken next.
|
10238
|
+
* It will be set to -1 if not set by the speech engine.
|
10239
|
+
*/
|
10240
|
+
length?: number | undefined;
|
10173
10241
|
/**
|
10174
10242
|
* 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
10243
|
* One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume"
|
10176
10244
|
*/
|
10177
|
-
type:
|
10245
|
+
type: "start" | "end" | "word" | "sentence" | "marker" | "interrupted" | "cancelled" | "error" | "pause" | "resume";
|
10178
10246
|
}
|
10179
10247
|
|
10180
10248
|
/** A description of a voice available for speech synthesis. */
|
@@ -10245,6 +10313,7 @@ declare namespace chrome.tts {
|
|
10245
10313
|
/** 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
10314
|
export function stop(): void;
|
10247
10315
|
/** Gets an array of all available voices. */
|
10316
|
+
export function getVoices(): Promise<TtsVoice[]>;
|
10248
10317
|
export function getVoices(callback?: (voices: TtsVoice[]) => void): void;
|
10249
10318
|
/**
|
10250
10319
|
* 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.199",
|
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": "535735b8d4679d62069fe70f2a01426c9f129f5decdbec39ab4e6d2f73fdf304",
|
92
92
|
"typeScriptVersion": "4.1"
|
93
93
|
}
|