@types/chrome 0.0.197 → 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 +93 -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
|
@@ -7649,6 +7669,71 @@ declare namespace chrome.scripting {
|
|
7649
7669
|
* Invoked upon completion of the injection.
|
7650
7670
|
*/
|
7651
7671
|
export function insertCSS(injection: CSSInjection, callback?: () => void): void;
|
7672
|
+
|
7673
|
+
/**
|
7674
|
+
* Removes a CSS stylesheet that was previously inserted by this extension from a target context.
|
7675
|
+
* @param injection
|
7676
|
+
* The details of the styles to remove.
|
7677
|
+
* Note that the css, files, and origin properties must exactly match the stylesheet inserted through `insertCSS`.
|
7678
|
+
* Attempting to remove a non-existent stylesheet is a no-op.
|
7679
|
+
* @return This only returns a Promise when the callback parameter is not specified, and with MV3+.
|
7680
|
+
* @since Chrome 90
|
7681
|
+
*/
|
7682
|
+
export function removeCSS(injection: CSSInjection): Promise<void>;
|
7683
|
+
|
7684
|
+
/**
|
7685
|
+
* Removes a CSS stylesheet that was previously inserted by this extension from a target context.
|
7686
|
+
* @param injection
|
7687
|
+
* The details of the styles to remove.
|
7688
|
+
* Note that the css, files, and origin properties must exactly match the stylesheet inserted through `insertCSS`.
|
7689
|
+
* Attempting to remove a non-existent stylesheet is a no-op.
|
7690
|
+
* @param callback
|
7691
|
+
* Invoked upon completion of the removal.
|
7692
|
+
* @since Chrome 90
|
7693
|
+
*/
|
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;
|
7652
7737
|
}
|
7653
7738
|
|
7654
7739
|
////////////////////
|
@@ -10147,11 +10232,17 @@ declare namespace chrome.tts {
|
|
10147
10232
|
charIndex?: number | undefined;
|
10148
10233
|
/** Optional. The error description, if the event type is 'error'. */
|
10149
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;
|
10150
10241
|
/**
|
10151
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.
|
10152
10243
|
* One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume"
|
10153
10244
|
*/
|
10154
|
-
type:
|
10245
|
+
type: "start" | "end" | "word" | "sentence" | "marker" | "interrupted" | "cancelled" | "error" | "pause" | "resume";
|
10155
10246
|
}
|
10156
10247
|
|
10157
10248
|
/** A description of a voice available for speech synthesis. */
|
@@ -10222,6 +10313,7 @@ declare namespace chrome.tts {
|
|
10222
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. */
|
10223
10314
|
export function stop(): void;
|
10224
10315
|
/** Gets an array of all available voices. */
|
10316
|
+
export function getVoices(): Promise<TtsVoice[]>;
|
10225
10317
|
export function getVoices(callback?: (voices: TtsVoice[]) => void): void;
|
10226
10318
|
/**
|
10227
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
|
}
|