@types/chrome 0.1.13 → 0.1.14

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 +30 -17
  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: Mon, 29 Sep 2025 19:02:13 GMT
11
+ * Last updated: Mon, 29 Sep 2025 19:32:00 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
@@ -8627,29 +8627,42 @@ declare namespace chrome {
8627
8627
  * @since Chrome 87
8628
8628
  */
8629
8629
  export namespace search {
8630
- export type Disposition = "CURRENT_TAB" | "NEW_TAB" | "NEW_WINDOW";
8631
-
8632
- export interface QueryInfo {
8633
- /** Location where search results should be displayed. CURRENT_TAB is the default. */
8634
- disposition?: Disposition | undefined;
8635
- /** Location where search results should be displayed. tabIdcannot be used with disposition. */
8636
- tabId?: number | undefined;
8637
- /** String to query with the default search provider. */
8638
- text?: string | undefined;
8630
+ export enum Disposition {
8631
+ /** Specifies that the search results display in the calling tab or the tab from the active browser. */
8632
+ CURRENT_TAB = "CURRENT_TAB",
8633
+ /** Specifies that the search results display in a new tab. */
8634
+ NEW_TAB = "NEW_TAB",
8635
+ /** Specifies that the search results display in a new window. */
8636
+ NEW_WINDOW = "NEW_WINDOW",
8639
8637
  }
8640
8638
 
8641
- /**
8642
- * Used to query the default search provider. In case of an error, runtime.lastError will be set.
8643
- * @param options search configuration options.
8644
- */
8645
- export function query(options: QueryInfo, callback: () => void): void;
8639
+ export type QueryInfo =
8640
+ & {
8641
+ /** String to query with the default search provider. */
8642
+ text?: string | undefined;
8643
+ }
8644
+ & (
8645
+ | {
8646
+ /** Location where search results should be displayed. `CURRENT_TAB` is the default. */
8647
+ disposition?: `${Disposition}` | undefined;
8648
+ /** Location where search results should be displayed. `tabId` cannot be used with `disposition`. */
8649
+ tabId?: undefined;
8650
+ }
8651
+ | {
8652
+ /** Location where search results should be displayed. `CURRENT_TAB` is the default. */
8653
+ disposition?: undefined;
8654
+ /** Location where search results should be displayed. `tabId` cannot be used with `disposition`. */
8655
+ tabId?: number | undefined;
8656
+ }
8657
+ );
8646
8658
 
8647
8659
  /**
8648
- * Used to query the default search provider. In case of an error, runtime.lastError will be set.
8649
- * @param options search configuration options.
8650
- * @return The `query` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
8660
+ * Used to query the default search provider. In case of an error, {@link runtime.lastError} will be set.
8661
+ *
8662
+ * Can return its result via Promise in Manifest V3 or later since Chrome 96.
8651
8663
  */
8652
8664
  export function query(options: QueryInfo): Promise<void>;
8665
+ export function query(options: QueryInfo, callback: () => void): void;
8653
8666
  }
8654
8667
 
8655
8668
  ////////////////////
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
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": "e9a8cff02c9f22c9b5091b4453e8560fb0f276e53c0fda367c1d5ff929553b95",
97
+ "typesPublisherContentHash": "2a0e1ced978ad35915b1c262da583e4f3dd9cc4aaa598935e14ee906b8038e3a",
98
98
  "typeScriptVersion": "5.2"
99
99
  }