@types/chrome 0.2.3 → 0.2.5
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 +1 -1
- chrome/index.d.ts +217 -51
- chrome/package.json +2 -2
chrome/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Fri, 31 Jul 2026
|
|
11
|
+
* Last updated: Fri, 31 Jul 2026 22:47:24 GMT
|
|
12
12
|
* Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
|
|
13
13
|
|
|
14
14
|
# Credits
|
chrome/index.d.ts
CHANGED
|
@@ -407,7 +407,7 @@ declare namespace chrome {
|
|
|
407
407
|
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
|
408
408
|
periodInMinutes?: number | undefined;
|
|
409
409
|
/** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
|
|
410
|
-
when?:
|
|
410
|
+
when?: undefined;
|
|
411
411
|
}
|
|
412
412
|
| {
|
|
413
413
|
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
|
@@ -415,11 +415,11 @@ declare namespace chrome {
|
|
|
415
415
|
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
|
416
416
|
periodInMinutes: number;
|
|
417
417
|
/** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
|
|
418
|
-
when?:
|
|
418
|
+
when?: undefined;
|
|
419
419
|
}
|
|
420
420
|
| {
|
|
421
421
|
/** Length of time in minutes after which the {@link onAlarm} event should fire. */
|
|
422
|
-
delayInMinutes?:
|
|
422
|
+
delayInMinutes?: undefined;
|
|
423
423
|
/** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
|
|
424
424
|
periodInMinutes?: number | undefined;
|
|
425
425
|
/** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
|
|
@@ -1071,7 +1071,10 @@ declare namespace chrome {
|
|
|
1071
1071
|
|
|
1072
1072
|
/** A set of data types. Missing data types are interpreted as `false`. */
|
|
1073
1073
|
interface DataTypeSet {
|
|
1074
|
-
/**
|
|
1074
|
+
/**
|
|
1075
|
+
* Websites' WebSQL data.
|
|
1076
|
+
* @deprecated since Chrome 139. Support for WebSQL has been removed. This data type will be ignored.
|
|
1077
|
+
*/
|
|
1075
1078
|
webSQL?: boolean | undefined;
|
|
1076
1079
|
/** Websites' IndexedDB data. */
|
|
1077
1080
|
indexedDB?: boolean | undefined;
|
|
@@ -1093,7 +1096,10 @@ declare namespace chrome {
|
|
|
1093
1096
|
cache?: boolean | undefined;
|
|
1094
1097
|
/** Cache storage. */
|
|
1095
1098
|
cacheStorage?: boolean | undefined;
|
|
1096
|
-
/**
|
|
1099
|
+
/**
|
|
1100
|
+
* Websites' appcaches.
|
|
1101
|
+
* @deprecated since Chrome 98. Support for appcache has been removed. This data type will be ignored.
|
|
1102
|
+
*/
|
|
1097
1103
|
appcache?: boolean | undefined;
|
|
1098
1104
|
/** Websites' file systems. */
|
|
1099
1105
|
fileSystems?: boolean | undefined;
|
|
@@ -1192,6 +1198,7 @@ declare namespace chrome {
|
|
|
1192
1198
|
* Clears websites' WebSQL data.
|
|
1193
1199
|
*
|
|
1194
1200
|
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1201
|
+
* @deprecated since Chrome 139. Support for WebSQL has been removed. This function has no effect.
|
|
1195
1202
|
*/
|
|
1196
1203
|
function removeWebSQL(options: RemovalOptions): Promise<void>;
|
|
1197
1204
|
function removeWebSQL(options: RemovalOptions, callback: () => void): void;
|
|
@@ -1200,6 +1207,7 @@ declare namespace chrome {
|
|
|
1200
1207
|
* Clears websites' appcache data.
|
|
1201
1208
|
*
|
|
1202
1209
|
* Can return its result via Promise in Manifest V3 or later since Chrome 96.
|
|
1210
|
+
* @deprecated since Chrome 98. Support for appcache has been removed. This function has no effect.
|
|
1203
1211
|
*/
|
|
1204
1212
|
function removeAppcache(options: RemovalOptions): Promise<void>;
|
|
1205
1213
|
function removeAppcache(options: RemovalOptions, callback: () => void): void;
|
|
@@ -2504,7 +2512,7 @@ declare namespace chrome {
|
|
|
2504
2512
|
*
|
|
2505
2513
|
* Permissions: "declarativeWebRequest"
|
|
2506
2514
|
*
|
|
2507
|
-
* MV2 only
|
|
2515
|
+
* Beta and MV2 only
|
|
2508
2516
|
* @deprecated Check out the {@link declarativeNetRequest} API instead
|
|
2509
2517
|
*/
|
|
2510
2518
|
export namespace declarativeWebRequest {
|
|
@@ -2559,9 +2567,9 @@ declare namespace chrome {
|
|
|
2559
2567
|
/** Matches if the MIME media type of a response (from the HTTP Content-Type header) is not contained in the list. */
|
|
2560
2568
|
excludeContentType?: string[] | undefined;
|
|
2561
2569
|
/** Matches if none of the request headers is matched by any of the HeaderFilters. */
|
|
2562
|
-
|
|
2570
|
+
excludeRequestHeaders?: HeaderFilter[] | undefined;
|
|
2563
2571
|
/** Matches if none of the response headers is matched by any of the HeaderFilters. */
|
|
2564
|
-
|
|
2572
|
+
excludeResponseHeaders?: HeaderFilter[] | undefined;
|
|
2565
2573
|
/**
|
|
2566
2574
|
* Matches if the conditions of the UrlFilter are fulfilled for the 'first party' URL of the request. The 'first party' URL of a request, when present, can be different from the request's target URL, and describes what is considered 'first party' for the sake of third-party checks for cookies.
|
|
2567
2575
|
* @deprecated since Chrome 82
|
|
@@ -2628,7 +2636,7 @@ declare namespace chrome {
|
|
|
2628
2636
|
/** Edits one or more cookies of response. Note that it is preferred to use the Cookies API because this is computationally less expensive. */
|
|
2629
2637
|
interface EditResponseCookie {
|
|
2630
2638
|
/** Filter for cookies that will be modified. All empty entries are ignored. */
|
|
2631
|
-
filter:
|
|
2639
|
+
filter: FilterResponseCookie;
|
|
2632
2640
|
/** Attributes that shall be overridden in cookies that matched the filter. Attributes that are set to an empty string are removed. */
|
|
2633
2641
|
modification: ResponseCookie;
|
|
2634
2642
|
}
|
|
@@ -2672,7 +2680,7 @@ declare namespace chrome {
|
|
|
2672
2680
|
/** Existence of the Secure cookie attribute. */
|
|
2673
2681
|
secure?: string | undefined;
|
|
2674
2682
|
/** Filters session cookies. Session cookies have no lifetime specified in any of 'max-age' or 'expires' attributes. */
|
|
2675
|
-
|
|
2683
|
+
sessionCookie?: boolean | undefined;
|
|
2676
2684
|
/** Value of a cookie, may be padded in double-quotes. */
|
|
2677
2685
|
value?: string | undefined;
|
|
2678
2686
|
}
|
|
@@ -2823,11 +2831,28 @@ declare namespace chrome {
|
|
|
2823
2831
|
* Manifest: "devtools_page"
|
|
2824
2832
|
*/
|
|
2825
2833
|
export namespace devtools.inspectedWindow {
|
|
2834
|
+
interface SetContentResult {
|
|
2835
|
+
code: string;
|
|
2836
|
+
description: string;
|
|
2837
|
+
details: string[];
|
|
2838
|
+
isError?: boolean;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2826
2841
|
/** A resource within the inspected page, such as a document, a script, or an image. */
|
|
2827
2842
|
interface Resource {
|
|
2828
2843
|
/** The URL of the resource. */
|
|
2829
2844
|
url: string;
|
|
2830
|
-
/**
|
|
2845
|
+
/**
|
|
2846
|
+
* Gets the content of the resource.
|
|
2847
|
+
*
|
|
2848
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 151.
|
|
2849
|
+
*/
|
|
2850
|
+
getContent(): Promise<{
|
|
2851
|
+
/** Content of the resource (potentially encoded). */
|
|
2852
|
+
content: string;
|
|
2853
|
+
/** Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported.*/
|
|
2854
|
+
encoding: string;
|
|
2855
|
+
}>;
|
|
2831
2856
|
getContent(
|
|
2832
2857
|
callback: (
|
|
2833
2858
|
/** Content of the resource (potentially encoded). */
|
|
@@ -2840,14 +2865,17 @@ declare namespace chrome {
|
|
|
2840
2865
|
* Sets the content of the resource.
|
|
2841
2866
|
* @param content New content of the resource. Only resources with the text type are currently supported.
|
|
2842
2867
|
* @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
|
|
2868
|
+
*
|
|
2869
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 151.
|
|
2843
2870
|
*/
|
|
2844
2871
|
setContent(
|
|
2845
2872
|
content: string,
|
|
2846
2873
|
commit: boolean,
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2874
|
+
): Promise<undefined>;
|
|
2875
|
+
setContent(
|
|
2876
|
+
content: string,
|
|
2877
|
+
commit: boolean,
|
|
2878
|
+
callback: (result: SetContentResult) => void,
|
|
2851
2879
|
): void;
|
|
2852
2880
|
}
|
|
2853
2881
|
|
|
@@ -2887,7 +2915,13 @@ declare namespace chrome {
|
|
|
2887
2915
|
* @param expression An expression to evaluate.
|
|
2888
2916
|
* @param options The options parameter can contain one or more options.
|
|
2889
2917
|
* @param callback A function called when evaluation completes.
|
|
2918
|
+
*
|
|
2919
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 151.
|
|
2890
2920
|
*/
|
|
2921
|
+
function eval<T = { [key: string]: unknown }>(
|
|
2922
|
+
expression: string,
|
|
2923
|
+
options?: EvalOptions,
|
|
2924
|
+
): Promise<{ result: T; exceptionInfo: EvaluationExceptionInfo }>;
|
|
2891
2925
|
function eval<T = { [key: string]: unknown }>(
|
|
2892
2926
|
expression: string,
|
|
2893
2927
|
callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void,
|
|
@@ -2898,7 +2932,12 @@ declare namespace chrome {
|
|
|
2898
2932
|
callback?: (result: T, exceptionInfo: EvaluationExceptionInfo) => void,
|
|
2899
2933
|
): void;
|
|
2900
2934
|
|
|
2901
|
-
/**
|
|
2935
|
+
/**
|
|
2936
|
+
* Retrieves the list of resources from the inspected page.
|
|
2937
|
+
*
|
|
2938
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 151.
|
|
2939
|
+
*/
|
|
2940
|
+
function getResources(): Promise<Resource[]>;
|
|
2902
2941
|
function getResources(callback: (resources: Resource[]) => void): void;
|
|
2903
2942
|
|
|
2904
2943
|
/** Fired when a new resource is added to the inspected page. */
|
|
@@ -2931,7 +2970,17 @@ declare namespace chrome {
|
|
|
2931
2970
|
export namespace devtools.network {
|
|
2932
2971
|
/** Represents a network request for a document resource (script, image and so on). See HAR Specification for reference. */
|
|
2933
2972
|
interface Request extends HARFormatEntry {
|
|
2934
|
-
/**
|
|
2973
|
+
/**
|
|
2974
|
+
* Returns content of the response body.
|
|
2975
|
+
*
|
|
2976
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 151.
|
|
2977
|
+
*/
|
|
2978
|
+
getContent(): Promise<{
|
|
2979
|
+
/** Content of the response body (potentially encoded). */
|
|
2980
|
+
content: string;
|
|
2981
|
+
/** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
|
|
2982
|
+
encoding: string;
|
|
2983
|
+
}>;
|
|
2935
2984
|
getContent(
|
|
2936
2985
|
callback: (
|
|
2937
2986
|
/** Content of the response body (potentially encoded). */
|
|
@@ -2942,7 +2991,12 @@ declare namespace chrome {
|
|
|
2942
2991
|
): void;
|
|
2943
2992
|
}
|
|
2944
2993
|
|
|
2945
|
-
/**
|
|
2994
|
+
/**
|
|
2995
|
+
* Returns HAR log that contains all known network requests.
|
|
2996
|
+
*
|
|
2997
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 151.
|
|
2998
|
+
*/
|
|
2999
|
+
function getHAR(): Promise<HARFormatLog>;
|
|
2946
3000
|
function getHAR(
|
|
2947
3001
|
callback: (
|
|
2948
3002
|
/** A HAR log. See HAR specification for details. */
|
|
@@ -6358,8 +6412,11 @@ declare namespace chrome {
|
|
|
6358
6412
|
* Can return its result via Promise since Chrome 105.
|
|
6359
6413
|
*/
|
|
6360
6414
|
function getAuthToken(details?: TokenDetails): Promise<GetAuthTokenResult>;
|
|
6361
|
-
function getAuthToken(
|
|
6362
|
-
|
|
6415
|
+
function getAuthToken(
|
|
6416
|
+
details: TokenDetails | undefined,
|
|
6417
|
+
callback: (token?: string, grantedScopes?: string[]) => void,
|
|
6418
|
+
): void;
|
|
6419
|
+
function getAuthToken(callback: (token?: string, grantedScopes?: string[]) => void): void;
|
|
6363
6420
|
|
|
6364
6421
|
/**
|
|
6365
6422
|
* Retrieves email address and obfuscated gaia id of the user signed into a profile.
|
|
@@ -7241,7 +7298,7 @@ declare namespace chrome {
|
|
|
7241
7298
|
enum ExtensionType {
|
|
7242
7299
|
EXTENSION = "extension",
|
|
7243
7300
|
HOSTED_APP = "hosted_app",
|
|
7244
|
-
|
|
7301
|
+
PACKAGED_APP = "packaged_app",
|
|
7245
7302
|
LEGACY_PACKAGED_APP = "legacy_packaged_app",
|
|
7246
7303
|
THEME = "theme",
|
|
7247
7304
|
LOGIN_SCREEN_EXTENSION = "login_screen_extension",
|
|
@@ -7407,6 +7464,66 @@ declare namespace chrome {
|
|
|
7407
7464
|
const onEnabled: events.Event<(info: ExtensionInfo) => void>;
|
|
7408
7465
|
}
|
|
7409
7466
|
|
|
7467
|
+
////////////////////
|
|
7468
|
+
// MimeHandler
|
|
7469
|
+
////////////////////
|
|
7470
|
+
/**
|
|
7471
|
+
* Use the `chrome.mimeHandler` API to handle MIME type streams in third-party extensions.
|
|
7472
|
+
* @since Chrome 151, MV3
|
|
7473
|
+
*/
|
|
7474
|
+
export namespace mimeHandler {
|
|
7475
|
+
interface MimeHandlerOptions {
|
|
7476
|
+
/** Whether this handler is active for the given MIME type. */
|
|
7477
|
+
enabled: boolean;
|
|
7478
|
+
}
|
|
7479
|
+
|
|
7480
|
+
interface StreamInfo {
|
|
7481
|
+
/** True if loaded in an embedded context (iframe/embed/object). */
|
|
7482
|
+
embedded: boolean;
|
|
7483
|
+
/** The MIME type of the intercepted content. */
|
|
7484
|
+
mimeType: string;
|
|
7485
|
+
/** The original URL the user navigated to. */
|
|
7486
|
+
originalUrl: string;
|
|
7487
|
+
/** HTTP response headers as key-value pairs. */
|
|
7488
|
+
responseHeaders: { [key: string]: unknown };
|
|
7489
|
+
/** The URL to fetch the stream data from. */
|
|
7490
|
+
streamUrl: string;
|
|
7491
|
+
/** The tab ID containing the document. */
|
|
7492
|
+
tabId: number;
|
|
7493
|
+
}
|
|
7494
|
+
|
|
7495
|
+
/**
|
|
7496
|
+
* Aborts current stream handling and hands the content off to the user agent's native handler. After this call the extension frame will be torn down; callers should not expect further execution.
|
|
7497
|
+
*
|
|
7498
|
+
* Can return its result via Promise
|
|
7499
|
+
*/
|
|
7500
|
+
function abortAndFallbackToNativeHandler(): Promise<void>;
|
|
7501
|
+
function abortAndFallbackToNativeHandler(callback: () => void): void;
|
|
7502
|
+
|
|
7503
|
+
/**
|
|
7504
|
+
* Reads the persisted options for a MIME type. Returns defaults (enabled=true) if none have been stored.
|
|
7505
|
+
* @param mimeType The MIME type whose options to read.
|
|
7506
|
+
*
|
|
7507
|
+
* Can return its result via Promise
|
|
7508
|
+
*/
|
|
7509
|
+
function getMimeHandlerOptions(mimeType: string): Promise<MimeHandlerOptions>;
|
|
7510
|
+
function getMimeHandlerOptions(mimeType: string, callback: (options: MimeHandlerOptions) => void): void;
|
|
7511
|
+
|
|
7512
|
+
/** Retrieves stream information for the current MIME handler context. Must be called from within a MIME handler extension page. */
|
|
7513
|
+
function getStreamInfo(): Promise<StreamInfo>;
|
|
7514
|
+
function getStreamInfo(callback: (info: StreamInfo) => void): void;
|
|
7515
|
+
|
|
7516
|
+
/**
|
|
7517
|
+
* Sets the configuration options for a specified MIME type.
|
|
7518
|
+
* @param mimeType The MIME type to configure.
|
|
7519
|
+
* @param options The new options to use.
|
|
7520
|
+
*
|
|
7521
|
+
* Can return its result via Promise
|
|
7522
|
+
*/
|
|
7523
|
+
function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions): Promise<void>;
|
|
7524
|
+
function setMimeHandlerOptions(mimeType: string, options: MimeHandlerOptions, callback: () => void): void;
|
|
7525
|
+
}
|
|
7526
|
+
|
|
7410
7527
|
////////////////////
|
|
7411
7528
|
// Notifications
|
|
7412
7529
|
////////////////////
|
|
@@ -8494,6 +8611,17 @@ declare namespace chrome {
|
|
|
8494
8611
|
* Permissions: "privacy"
|
|
8495
8612
|
*/
|
|
8496
8613
|
export namespace privacy {
|
|
8614
|
+
/**
|
|
8615
|
+
* Categories of Autofill data.
|
|
8616
|
+
* @since Chrome 151
|
|
8617
|
+
*/
|
|
8618
|
+
enum AutofillBlockedType {
|
|
8619
|
+
CONTACT_INFO = "contact_info",
|
|
8620
|
+
PAYMENTS = "payments",
|
|
8621
|
+
IDENTITY_DOCS = "identity_docs",
|
|
8622
|
+
TRAVEL = "travel",
|
|
8623
|
+
}
|
|
8624
|
+
|
|
8497
8625
|
/**
|
|
8498
8626
|
* The IP handling policy of WebRTC.
|
|
8499
8627
|
* @since Chrome 48
|
|
@@ -9176,9 +9304,11 @@ declare namespace chrome {
|
|
|
9176
9304
|
}
|
|
9177
9305
|
|
|
9178
9306
|
interface ManifestAction {
|
|
9179
|
-
default_icon?: ManifestIcons | undefined;
|
|
9307
|
+
default_icon?: ManifestIcons | string | undefined;
|
|
9180
9308
|
default_title?: string | undefined;
|
|
9181
9309
|
default_popup?: string | undefined;
|
|
9310
|
+
/** @default 'enabled' */
|
|
9311
|
+
default_state?: "enabled" | "disabled";
|
|
9182
9312
|
}
|
|
9183
9313
|
|
|
9184
9314
|
/** Source: https://developer.chrome.com/docs/extensions/reference/permissions-list */
|
|
@@ -9284,22 +9414,37 @@ declare namespace chrome {
|
|
|
9284
9414
|
| "webAuthenticationProxy"
|
|
9285
9415
|
>;
|
|
9286
9416
|
|
|
9417
|
+
/** A search engine. */
|
|
9287
9418
|
interface SearchProvider {
|
|
9419
|
+
/** Name of the search engine displayed to user. This is required if you don't set `prepopulated_id`. */
|
|
9288
9420
|
name?: string | undefined;
|
|
9421
|
+
/** An omnibox keyword for the search engine. This is required if you don't set `prepopulated_id`. */
|
|
9289
9422
|
keyword?: string | undefined;
|
|
9423
|
+
/** An icon URL for the search engine. This is required if you don't set `prepopulated_id`. */
|
|
9290
9424
|
favicon_url?: string | undefined;
|
|
9425
|
+
/** The search URL the search engine uses. */
|
|
9291
9426
|
search_url: string;
|
|
9427
|
+
/** The encoding used for search terms. This is required if you don't set `prepopulated_id`. */
|
|
9292
9428
|
encoding?: string | undefined;
|
|
9429
|
+
/** The URL the search engine uses for suggestions. If this isn't used, the engine doesn't support suggestions. */
|
|
9293
9430
|
suggest_url?: string | undefined;
|
|
9294
9431
|
instant_url?: string | undefined;
|
|
9432
|
+
/** The URL the search engine uses for image search. If this isn't used, the engine doesn't support image search. */
|
|
9295
9433
|
image_url?: string | undefined;
|
|
9434
|
+
/** The post parameters for `search_url`. */
|
|
9296
9435
|
search_url_post_params?: string | undefined;
|
|
9436
|
+
/** The post parameters for `suggest_url`. */
|
|
9297
9437
|
suggest_url_post_params?: string | undefined;
|
|
9438
|
+
/** The post parameters for `instant_url`. */
|
|
9298
9439
|
instant_url_post_params?: string | undefined;
|
|
9440
|
+
/** The post parameters for `image_url`. */
|
|
9299
9441
|
image_url_post_params?: string | undefined;
|
|
9442
|
+
/** A list of URL patterns that can be used in addition to `search_url`. */
|
|
9300
9443
|
alternate_urls?: string[] | undefined;
|
|
9444
|
+
/** An ID for Chrome's built-in search engine. */
|
|
9301
9445
|
prepopulated_id?: number | undefined;
|
|
9302
|
-
|
|
9446
|
+
/** Specifies whether the search provider should be default. */
|
|
9447
|
+
is_default: boolean;
|
|
9303
9448
|
}
|
|
9304
9449
|
|
|
9305
9450
|
interface ManifestBase {
|
|
@@ -9324,8 +9469,10 @@ declare namespace chrome {
|
|
|
9324
9469
|
author?: { email: string } | undefined;
|
|
9325
9470
|
/** Defines overrides for selected Chrome settings. */
|
|
9326
9471
|
chrome_settings_overrides?: {
|
|
9472
|
+
/** The new value for the homepage. */
|
|
9327
9473
|
homepage?: string | undefined;
|
|
9328
9474
|
search_provider?: SearchProvider | undefined;
|
|
9475
|
+
/** An array of length one containing a URL to be used as the startup page. */
|
|
9329
9476
|
startup_pages?: string[] | undefined;
|
|
9330
9477
|
} | undefined;
|
|
9331
9478
|
/** Defines overrides for default Chrome pages. */
|
|
@@ -9337,13 +9484,16 @@ declare namespace chrome {
|
|
|
9337
9484
|
/** Defines keyboard shortcuts within the extension. */
|
|
9338
9485
|
commands?: {
|
|
9339
9486
|
[name: string]: {
|
|
9340
|
-
suggested_key?:
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9487
|
+
suggested_key?:
|
|
9488
|
+
| {
|
|
9489
|
+
default?: string | undefined;
|
|
9490
|
+
windows?: string | undefined;
|
|
9491
|
+
mac?: string | undefined;
|
|
9492
|
+
chromeos?: string | undefined;
|
|
9493
|
+
linux?: string | undefined;
|
|
9494
|
+
}
|
|
9495
|
+
| string
|
|
9496
|
+
| undefined;
|
|
9347
9497
|
description?: string | undefined;
|
|
9348
9498
|
global?: boolean | undefined;
|
|
9349
9499
|
};
|
|
@@ -9359,7 +9509,7 @@ declare namespace chrome {
|
|
|
9359
9509
|
cross_origin_opener_policy?: { value: string } | undefined;
|
|
9360
9510
|
current_locale?: string | undefined;
|
|
9361
9511
|
/** Defines static rules for the declarativeNetRequest API, which allows blocking and modifying of network requests. */
|
|
9362
|
-
declarative_net_request?: { rule_resources
|
|
9512
|
+
declarative_net_request?: { rule_resources: declarativeNetRequest.Ruleset[] } | undefined;
|
|
9363
9513
|
/** Defines pages that use the DevTools APIs. */
|
|
9364
9514
|
devtools_page?: string | undefined;
|
|
9365
9515
|
event_rules?:
|
|
@@ -9431,20 +9581,13 @@ declare namespace chrome {
|
|
|
9431
9581
|
/** Allows the use of an OAuth 2.0 security ID. The value of this key must be an object with "client_id" and "scopes" properties. */
|
|
9432
9582
|
oauth2?: {
|
|
9433
9583
|
client_id: string;
|
|
9434
|
-
scopes
|
|
9584
|
+
scopes: string[];
|
|
9435
9585
|
} | undefined;
|
|
9436
9586
|
offline_enabled?: boolean | undefined;
|
|
9437
9587
|
/** Allows the extension to register a keyword in Chrome's address bar. */
|
|
9438
9588
|
omnibox?: { keyword: string } | undefined;
|
|
9439
9589
|
/** Specifies a path to an options.html file for the extension to use as an options page. */
|
|
9440
9590
|
options_page?: string | undefined;
|
|
9441
|
-
/** Specifies a path to an HTML file that lets a user change extension options from the Chrome Extensions page. */
|
|
9442
|
-
options_ui?: {
|
|
9443
|
-
/** Path to the options page, relative to the extension's root. */
|
|
9444
|
-
page: string;
|
|
9445
|
-
/** Specify as `false` to declare an embedded options page. If `true`, the extension's options page will be opened in a new tab rather than embedded in `chrome://extensions`. */
|
|
9446
|
-
open_in_tab: boolean;
|
|
9447
|
-
} | undefined;
|
|
9448
9591
|
/** Lists technologies required to use the extension. */
|
|
9449
9592
|
requirements?: {
|
|
9450
9593
|
"3D"?: { features?: string[] | undefined } | undefined;
|
|
@@ -9480,8 +9623,8 @@ declare namespace chrome {
|
|
|
9480
9623
|
manifest_version: 2;
|
|
9481
9624
|
|
|
9482
9625
|
// Pick one (or none)
|
|
9483
|
-
browser_action?: ManifestAction | undefined;
|
|
9484
|
-
page_action?: ManifestAction | undefined;
|
|
9626
|
+
browser_action?: Omit<ManifestAction, "default_state"> | undefined;
|
|
9627
|
+
page_action?: Omit<ManifestAction, "default_state"> | undefined;
|
|
9485
9628
|
|
|
9486
9629
|
// Optional
|
|
9487
9630
|
background?:
|
|
@@ -9507,6 +9650,15 @@ declare namespace chrome {
|
|
|
9507
9650
|
| undefined;
|
|
9508
9651
|
/** Defines restrictions on the scripts, styles, and other resources an extension can use. */
|
|
9509
9652
|
content_security_policy?: string | undefined;
|
|
9653
|
+
/** Specifies a path to an HTML file that lets a user change extension options from the Chrome Extensions page. */
|
|
9654
|
+
options_ui?: {
|
|
9655
|
+
/** Path to the options page, relative to the extension's root. */
|
|
9656
|
+
page: string;
|
|
9657
|
+
/** If `true`, a Chrome user agent stylesheet will be applied to your options page. Defaults to `false`. */
|
|
9658
|
+
chrome_style?: boolean | undefined;
|
|
9659
|
+
/** Specify as `false` to declare an embedded options page. If `true`, the extension's options page will be opened in a new tab rather than embedded in `chrome://extensions`. */
|
|
9660
|
+
open_in_tab?: boolean | undefined;
|
|
9661
|
+
} | undefined;
|
|
9510
9662
|
/** Declares optional permissions for your extension. */
|
|
9511
9663
|
optional_permissions?: (ManifestOptionalPermission | string)[] | undefined;
|
|
9512
9664
|
/** Enables use of particular extension APIs. */
|
|
@@ -9570,6 +9722,25 @@ declare namespace chrome {
|
|
|
9570
9722
|
| undefined;
|
|
9571
9723
|
/** Lists the web pages your extension is allowed to interact with, defined using URL match patterns. User permission for these sites is requested at install time. */
|
|
9572
9724
|
host_permissions?: string[] | undefined;
|
|
9725
|
+
/** Specifies a path to an HTML file that lets a user change extension options from the Chrome Extensions page. */
|
|
9726
|
+
options_ui?: {
|
|
9727
|
+
/** Specifies the path to the options page, relative to the extension's root. */
|
|
9728
|
+
page: string;
|
|
9729
|
+
/** Indicates whether the extension's options page will be opened in a new tab. If set to `false`, the extension's options page is embedded in `chrome://extensions` rather than opened in a new tab. */
|
|
9730
|
+
open_in_tab?: boolean | undefined;
|
|
9731
|
+
} | undefined;
|
|
9732
|
+
/**
|
|
9733
|
+
* Maps MIME types to the extension pages that render them. As of Chrome 151, `application/pdf` is the only MIME type available to public handlers. Declaring an unsupported MIME type causes an installation warning.
|
|
9734
|
+
* @since Chrome 151
|
|
9735
|
+
*/
|
|
9736
|
+
mime_types_handler?: {
|
|
9737
|
+
"application/pdf": {
|
|
9738
|
+
/** The HTML file to display when a document of the corresponding MIME type is opened. This file must be located within your extension. */
|
|
9739
|
+
handler_url: string;
|
|
9740
|
+
/** Specifies whether to handle documents embedded in `<embed>`, `<object>`, or `<iframe>` elements. Defaults to `false`, meaning the handler only receives top-level navigations. */
|
|
9741
|
+
can_embed?: boolean;
|
|
9742
|
+
};
|
|
9743
|
+
};
|
|
9573
9744
|
/** Declares optional permissions for your extension. */
|
|
9574
9745
|
optional_permissions?: ManifestOptionalPermission[] | undefined;
|
|
9575
9746
|
/** Declares optional host permissions for your extension. */
|
|
@@ -10785,15 +10956,10 @@ declare namespace chrome {
|
|
|
10785
10956
|
|
|
10786
10957
|
interface MirrorModeInfo {
|
|
10787
10958
|
/** The mirror mode that should be set. */
|
|
10788
|
-
mode
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
interface MirrorModeInfoMixed extends MirrorModeInfo {
|
|
10792
|
-
/** The mirror mode that should be set. */
|
|
10793
|
-
mode: "mixed";
|
|
10794
|
-
/** The id of the mirroring source display. */
|
|
10959
|
+
mode: `${MirrorMode}`;
|
|
10960
|
+
/** The id of the mirroring source display. This is only valid for 'mixed'. */
|
|
10795
10961
|
mirroringSourceId?: string | undefined;
|
|
10796
|
-
/** The ids of the mirroring destination displays. */
|
|
10962
|
+
/** The ids of the mirroring destination displays. This is only valid for 'mixed'. */
|
|
10797
10963
|
mirroringDestinationIds?: string[] | undefined;
|
|
10798
10964
|
}
|
|
10799
10965
|
|
|
@@ -10934,8 +11100,8 @@ declare namespace chrome {
|
|
|
10934
11100
|
* @param info The information of the mirror mode that should be applied to the display mode.
|
|
10935
11101
|
* @since Chrome 65
|
|
10936
11102
|
*/
|
|
10937
|
-
function setMirrorMode(info: MirrorModeInfo
|
|
10938
|
-
function setMirrorMode(info: MirrorModeInfo
|
|
11103
|
+
function setMirrorMode(info: MirrorModeInfo, callback: () => void): void;
|
|
11104
|
+
function setMirrorMode(info: MirrorModeInfo): Promise<void>;
|
|
10939
11105
|
|
|
10940
11106
|
/** Fired when anything changes to the display configuration. */
|
|
10941
11107
|
const onDisplayChanged: chrome.events.Event<() => void>;
|
chrome/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/chrome",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "TypeScript definitions for chrome",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,6 +94,6 @@
|
|
|
94
94
|
"@types/har-format": "*"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {},
|
|
97
|
-
"typesPublisherContentHash": "
|
|
97
|
+
"typesPublisherContentHash": "e51c75dde3ead4663df9abefa0b6c0b7b91334e97ff04a090ec4665fd83ff079",
|
|
98
98
|
"typeScriptVersion": "5.6"
|
|
99
99
|
}
|