@types/chrome 0.3.0 → 0.3.2

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.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +95 -21
  3. 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: Tue, 15 Sep 2026 20:33:28 GMT
11
+ * Last updated: Mon, 28 Sep 2026 21:04:10 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
@@ -2044,7 +2044,7 @@ declare namespace chrome {
2044
2044
  const ACTION_MENU_TOP_LEVEL_LIMIT: 6;
2045
2045
 
2046
2046
  /**
2047
- * Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in {@link chrome.runtime.lastError}.
2047
+ * Creates a new context menu item. If an error occurs during creation, it may not be detected until the creation callback fires; details will be in {@link runtime.lastError}.
2048
2048
  * @return The ID of the newly created item.
2049
2049
  */
2050
2050
  function create(createProperties: CreateProperties, callback?: () => void): number | string;
@@ -8989,6 +8989,43 @@ declare namespace chrome {
8989
8989
  const onProxyError: events.Event<(details: ErrorDetails) => void>;
8990
8990
  }
8991
8991
 
8992
+ ////////////////////
8993
+ // PublicSuffix
8994
+ ////////////////////
8995
+ /**
8996
+ * Use the `chrome.publicSuffix` API to query the browser's Public Suffix List (PSL).
8997
+ *
8998
+ * Permissions: "publicSuffix"
8999
+ * @since Chrome 153
9000
+ */
9001
+ export namespace publicSuffix {
9002
+ /** The encoding to use for returned domains. */
9003
+ enum DomainEncoding {
9004
+ DISPLAY = "display",
9005
+ PUNYCODE = "punycode",
9006
+ }
9007
+
9008
+ interface DomainOptions {
9009
+ /** Whether IP addresses may be returned as domains. Defaults to false. Note: When allowed, IP addresses are returned without being looked up in the Public Suffix List. */
9010
+ allowIPAddress?: boolean | undefined;
9011
+ /** Whether known public suffixes may be returned as domains. Defaults to false. */
9012
+ allowPlainSuffix?: boolean | undefined;
9013
+ /** Whether unknown TLDs should be considered as a public suffix. For example, for non-public hostnames like `printer.internal-network`. Defaults to false. */
9014
+ allowUnknownSuffix?: boolean | undefined;
9015
+ /** The encoding to use for the returned domain. Defaults to "punycode", but pass "display" if displaying the domain to the user. Generally, "display" will use Unicode, except in cases where that would be unsafe due to ["Unicode confusables"](https://www.unicode.org/reports/tr39/#Confusable_Detection). */
9016
+ encoding?: `${DomainEncoding}` | undefined;
9017
+ }
9018
+
9019
+ /** Gets the registrable domain for `hostname`, if any. */
9020
+ function getDomain(hostname: string, options?: DomainOptions): string | null;
9021
+
9022
+ /** Gets the known public suffix for `hostname`, if any. */
9023
+ function getKnownSuffix(hostname: string): string | null;
9024
+
9025
+ /** Determines whether `hostname` is itself a known public suffix. */
9026
+ function isKnownSuffix(hostname: string): boolean;
9027
+ }
9028
+
8992
9029
  ////////////////////
8993
9030
  // ReadingList
8994
9031
  ////////////////////
@@ -9283,14 +9320,31 @@ declare namespace chrome {
9283
9320
  includeTlsChannelId?: boolean | undefined;
9284
9321
  }
9285
9322
 
9286
- interface InstalledDetails {
9287
- /** The reason that this event is being dispatched. */
9288
- reason: `${OnInstalledReason}`;
9289
- /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9290
- previousVersion?: string;
9291
- /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9292
- id?: string;
9293
- }
9323
+ type InstalledDetails =
9324
+ | {
9325
+ /** The reason that this event is being dispatched. */
9326
+ reason: `${OnInstalledReason.UPDATE}`;
9327
+ /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9328
+ previousVersion: string;
9329
+ /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9330
+ id?: undefined;
9331
+ }
9332
+ | {
9333
+ /** The reason that this event is being dispatched. */
9334
+ reason: `${OnInstalledReason.SHARED_MODULE_UPDATE}`;
9335
+ /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9336
+ previousVersion?: undefined;
9337
+ /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9338
+ id: string;
9339
+ }
9340
+ | {
9341
+ /** The reason that this event is being dispatched. */
9342
+ reason: `${OnInstalledReason.INSTALL}` | `${OnInstalledReason.CHROME_UPDATE}`;
9343
+ /** Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'. */
9344
+ previousVersion?: undefined;
9345
+ /** Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'. */
9346
+ id?: undefined;
9347
+ };
9294
9348
 
9295
9349
  /**
9296
9350
  * A context hosting extension content.
@@ -9375,7 +9429,7 @@ declare namespace chrome {
9375
9429
  postMessage: (message: any) => void;
9376
9430
  /** Immediately disconnect the port. Calling `disconnect()` on an already-disconnected port has no effect. When a port is disconnected, no new events will be dispatched to this port. */
9377
9431
  disconnect: () => void;
9378
- /** This property will **only** be present on ports passed to {@link runtime.onConnect onConnect} / {@link runtime.onConnectExternal onConnectExternal} / {@link runtime.onConnectExternal onConnectNative} listeners. */
9432
+ /** This property will **only** be present on ports passed to {@link runtime.onConnect onConnect} / {@link runtime.onConnectExternal onConnectExternal} / {@link runtime.onConnectNative onConnectNative} listeners. */
9379
9433
  sender?: MessageSender;
9380
9434
  /** Fired when the port is disconnected from the other end(s). {@link runtime.lastError} may be set if the port was disconnected by an error. If the port is closed via {@link Port.disconnect disconnect}, then this event is _only_ fired on the other end. This event is fired at most once (see also Port lifetime). */
9381
9435
  onDisconnect: events.Event<(port: Port) => void>;
@@ -9518,7 +9572,6 @@ declare namespace chrome {
9518
9572
  ManifestPermission,
9519
9573
  | "debugger"
9520
9574
  | "declarativeNetRequest"
9521
- | "devtools"
9522
9575
  | "experimental"
9523
9576
  | "fontSettings"
9524
9577
  | "geolocation"
@@ -9704,6 +9757,8 @@ declare namespace chrome {
9704
9757
  omnibox?: { keyword: string } | undefined;
9705
9758
  /** Specifies a path to an options.html file for the extension to use as an options page. */
9706
9759
  options_page?: string | undefined;
9760
+ /** URL of the web app that replaces this extension. */
9761
+ replacement_web_app?: string | undefined;
9707
9762
  /** Lists technologies required to use the extension. */
9708
9763
  requirements?: {
9709
9764
  "3D"?: { features?: string[] | undefined } | undefined;
@@ -9719,6 +9774,12 @@ declare namespace chrome {
9719
9774
  short_name?: string | undefined;
9720
9775
  /** Declares a JSON schema for the managed storage area. */
9721
9776
  storage?: { managed_schema: string } | undefined;
9777
+ /**
9778
+ * An array of trial tokens to enable Origin Trial and Deprecation Trial features in extension contexts. You can browse and register for active trials on the active trials page.
9779
+ *
9780
+ * To participate in multiple trials simultaneously, include each token as a separate array entry.
9781
+ */
9782
+ trial_tokens?: string[] | undefined;
9722
9783
  /** Registers the extension as a text to speech engine. */
9723
9784
  tts_engine?: {
9724
9785
  voices: Array<{
@@ -9845,6 +9906,11 @@ declare namespace chrome {
9845
9906
  /** 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. */
9846
9907
  open_in_tab?: boolean | undefined;
9847
9908
  } | undefined;
9909
+ /**
9910
+ * The message serialization format used to communicate with extension pages/content scripts/frames running in this extension. The default value is "json".
9911
+ * @since Chrome 148
9912
+ */
9913
+ message_serialization?: "json" | "structured_clone" | undefined;
9848
9914
  /**
9849
9915
  * 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.
9850
9916
  * @since Chrome 151
@@ -10019,7 +10085,7 @@ declare namespace chrome {
10019
10085
  * Send a single message to a native application. This method requires the `"nativeMessaging"` permission
10020
10086
  *
10021
10087
  * Can return its result via Promise in Manifest V3 or later since Chrome 99.
10022
- * @param application The name of the native messaging host.
10088
+ * @param application The name of the native messaging host, or target details.
10023
10089
  * @param message The message that will be passed to the native messaging host.
10024
10090
  */
10025
10091
  function sendNativeMessage(application: string, message: object): Promise<any>;
@@ -10043,7 +10109,7 @@ declare namespace chrome {
10043
10109
  *
10044
10110
  * The precise behavior may depend on your manifest's options_ui or options_page key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
10045
10111
  *
10046
- * If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link runtime.lastError lastError} .
10112
+ * If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set {@link runtime.lastError lastError}.
10047
10113
  *
10048
10114
  * Can return its result via Promise in Manifest V3 or later since Chrome 99
10049
10115
  */
@@ -10098,13 +10164,13 @@ declare namespace chrome {
10098
10164
 
10099
10165
  /**
10100
10166
  * Fired when a connection is made from a user script from this extension.
10101
- * @since chrome 115 MV3
10167
+ * @since Chrome 115, MV3
10102
10168
  */
10103
10169
  const onUserScriptConnect: events.Event<(port: Port) => void>;
10104
10170
 
10105
10171
  /**
10106
10172
  * Fired when a message is sent from a user script associated with the same extension.
10107
- * @since chrome 115, MV3
10173
+ * @since Chrome 115, MV3
10108
10174
  */
10109
10175
  const onUserScriptMessage: events.Event<
10110
10176
  (message: any, sender: MessageSender, sendResponse: (response?: any) => void) => void
@@ -10982,7 +11048,7 @@ declare namespace chrome {
10982
11048
  /** The user-friendly name (e.g. 'HP LCD monitor'). */
10983
11049
  name: string;
10984
11050
  /**
10985
- * @platform ChromeOS and Web UI only
11051
+ * @platform ChromeOS only
10986
11052
  * @since Chrome 67
10987
11053
  */
10988
11054
  edid?: Edid;
@@ -11093,7 +11159,7 @@ declare namespace chrome {
11093
11159
  /**
11094
11160
  * Requests the layout info for all displays
11095
11161
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11096
- * @platform ChromeOS and Web UI only
11162
+ * @platform ChromeOS only
11097
11163
  * @since Chrome 53
11098
11164
  */
11099
11165
  function getDisplayLayout(callback: (layouts: DisplayLayout[]) => void): void;
@@ -11105,7 +11171,7 @@ declare namespace chrome {
11105
11171
  * Updates the properties for the display specified by `id`,
11106
11172
  * according to the information provided in `info`.
11107
11173
  * On failure, `runtime.lastError` will be set.
11108
- * @platform ChromeOS and Web UI only
11174
+ * @platform ChromeOS only
11109
11175
  * @param id The display's unique identifier.
11110
11176
  * @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in `info`.
11111
11177
  */
@@ -11118,7 +11184,7 @@ declare namespace chrome {
11118
11184
  * If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout.
11119
11185
  * After layout is resolved, an onDisplayChanged event will be triggered.
11120
11186
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11121
- * @platform ChromeOS and Web UI only
11187
+ * @platform ChromeOS only
11122
11188
  * @since Chrome 53
11123
11189
  * @param layouts The layout information, required for all displays except the primary display.
11124
11190
  */
@@ -11129,8 +11195,8 @@ declare namespace chrome {
11129
11195
  * Enables/disables the unified desktop feature.
11130
11196
  * If enabled while mirroring is active, the desktop mode will not change until mirroring is turned off.
11131
11197
  * Otherwise, the desktop mode will switch to unified immediately.
11198
+ * @platform ChromeOS only
11132
11199
  * @since Chrome 46
11133
- * @platform ChromeOS and Web UI only
11134
11200
  * @param enabled True if unified desktop should be enabled.
11135
11201
  */
11136
11202
  function enableUnifiedDesktop(enabled: boolean): void;
@@ -11139,6 +11205,7 @@ declare namespace chrome {
11139
11205
  * Starts overscan calibration for a display.
11140
11206
  * This will show an overlay on the screen indicating the current overscan insets.
11141
11207
  * If overscan calibration for display `id` is in progress this will reset calibration.
11208
+ * @platform ChromeOS only
11142
11209
  * @since Chrome 53
11143
11210
  * @param id The display's unique identifier.
11144
11211
  */
@@ -11149,6 +11216,7 @@ declare namespace chrome {
11149
11216
  * Typically this should either move the display along an axis (e.g. left+right have the same value)
11150
11217
  * or scale it along an axis (e.g. top+bottom have opposite values).
11151
11218
  * Each Adjust call is cumulative with previous calls since Start.
11219
+ * @platform ChromeOS only
11152
11220
  * @since Chrome 53
11153
11221
  * @param id The display's unique identifier.
11154
11222
  * @param delta The amount to change the overscan insets.
@@ -11157,6 +11225,7 @@ declare namespace chrome {
11157
11225
 
11158
11226
  /**
11159
11227
  * Resets the overscan insets for a display to the last saved value (i.e before Start was called).
11228
+ * @platform ChromeOS only
11160
11229
  * @since Chrome 53
11161
11230
  * @param id The display's unique identifier.
11162
11231
  */
@@ -11164,6 +11233,7 @@ declare namespace chrome {
11164
11233
 
11165
11234
  /**
11166
11235
  * Complete overscan adjustments for a display by saving the current values and hiding the overlay.
11236
+ * @platform ChromeOS only
11167
11237
  * @since Chrome 53
11168
11238
  * @param id The display's unique identifier.
11169
11239
  */
@@ -11175,6 +11245,7 @@ declare namespace chrome {
11175
11245
  * The callback will be invoked in case of successful calibration only.
11176
11246
  * If the calibration fails, this will throw an error.
11177
11247
  * Can return its result via Promise in Manifest V3 or later since Chrome 91.
11248
+ * @platform ChromeOS only
11178
11249
  * @since Chrome 57
11179
11250
  * @param id The display's unique identifier.
11180
11251
  */
@@ -11185,6 +11256,7 @@ declare namespace chrome {
11185
11256
  * Starts custom touch calibration for a display.
11186
11257
  * This should be called when using a custom UX for collecting calibration data.
11187
11258
  * If another touch calibration is already in progress this will throw an error.
11259
+ * @platform ChromeOS only
11188
11260
  * @since Chrome 57
11189
11261
  * @param id The display's unique identifier.
11190
11262
  */
@@ -11195,6 +11267,7 @@ declare namespace chrome {
11195
11267
  * These `pairs` would be used to calibrate the touch screen for display with `id` called in startCustomTouchCalibration().
11196
11268
  * Always call `startCustomTouchCalibration` before calling this method.
11197
11269
  * If another touch calibration is already in progress this will throw an error.
11270
+ * @platform ChromeOS only
11198
11271
  * @since Chrome 57
11199
11272
  * @param pairs The pairs of point used to calibrate the display.
11200
11273
  * @param bounds Bounds of the display when the touch calibration was performed. `bounds.left` and `bounds.top` values are ignored.
@@ -11204,6 +11277,7 @@ declare namespace chrome {
11204
11277
 
11205
11278
  /**
11206
11279
  * Resets the touch calibration for the display and brings it back to its default state by clearing any touch calibration data associated with the display.
11280
+ * @platform ChromeOS only
11207
11281
  * @since Chrome 57
11208
11282
  * @param id The display's unique identifier.
11209
11283
  */
@@ -11213,7 +11287,7 @@ declare namespace chrome {
11213
11287
  * Sets the display mode to the specified mirror mode.
11214
11288
  * Each call resets the state from previous calls.
11215
11289
  * Calling setDisplayProperties() will fail for the mirroring destination displays.
11216
- * @platform ChromeOS and Web UI only
11290
+ * @platform ChromeOS only
11217
11291
  * @param info The information of the mirror mode that should be applied to the display mode.
11218
11292
  * @since Chrome 65
11219
11293
  */
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -54,6 +54,6 @@
54
54
  "@types/har-format": "*"
55
55
  },
56
56
  "peerDependencies": {},
57
- "typesPublisherContentHash": "9c20c819fceff510723a6c0d98a378ee8e943c0a33951dfcd16ddb2a43167319",
57
+ "typesPublisherContentHash": "c958f1f1f0fdca9974a3d23c01aace79ba0b941c3831e233535929542b6e690d",
58
58
  "typeScriptVersion": "5.6"
59
59
  }