chrome-types 0.1.404 → 0.1.406

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. package/_all.d.ts +290 -373
  2. package/index.d.ts +205 -263
  3. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Thu Jan 01 2026 22:34:59 GMT+0000 (Coordinated Universal Time)
18
- // Built at 5b92a5a0fc3489f88b8d512004010475d4ae484a
17
+ // Generated on Wed Jan 07 2026 11:21:40 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 63430eaeb62bb0431b4e1b9cd67c91c51556da8e
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -844,6 +844,7 @@ declare namespace chrome {
844
844
  * @chrome-returns-extra since Chrome 111
845
845
  * @param name Optional name to identify this alarm. Defaults to the empty string.
846
846
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
847
+ * @returns Promise that resolves when the alarm has been created.
847
848
  */
848
849
  export function create(
849
850
 
@@ -861,6 +862,7 @@ declare namespace chrome {
861
862
  *
862
863
  * @chrome-returns-extra since Chrome 111
863
864
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
865
+ * @returns Promise that resolves when the alarm has been created.
864
866
  */
865
867
  export function create(
866
868
 
@@ -876,7 +878,6 @@ declare namespace chrome {
876
878
  *
877
879
  * @param name Optional name to identify this alarm. Defaults to the empty string.
878
880
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
879
- * @param callback Invoked when the alarm has been created.
880
881
  */
881
882
  export function create(
882
883
 
@@ -898,7 +899,6 @@ declare namespace chrome {
898
899
  * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
899
900
  *
900
901
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either `when` or `delayInMinutes` (but not both). If `periodInMinutes` is set, the alarm will repeat every `periodInMinutes` minutes after the initial event. If neither `when` or `delayInMinutes` is set for a repeating alarm, `periodInMinutes` is used as the default for `delayInMinutes`.
901
- * @param callback Invoked when the alarm has been created.
902
902
  */
903
903
  export function create(
904
904
 
@@ -1151,6 +1151,7 @@ declare namespace chrome {
1151
1151
  *
1152
1152
  * @chrome-returns-extra since Chrome 116
1153
1153
  * @param filter Device properties by which to filter the list of returned audio devices. If the filter is not set or set to `{}`, returned device list will contain all available audio devices.
1154
+ * @returns Reports the requested list of audio devices.
1154
1155
  */
1155
1156
  export function getDevices(
1156
1157
 
@@ -1161,7 +1162,6 @@ declare namespace chrome {
1161
1162
  * Gets a list of audio devices filtered based on `filter`.
1162
1163
  *
1163
1164
  * @param filter Device properties by which to filter the list of returned audio devices. If the filter is not set or set to `{}`, returned device list will contain all available audio devices.
1164
- * @param callback Reports the requested list of audio devices.
1165
1165
  */
1166
1166
  export function getDevices(
1167
1167
 
@@ -1232,6 +1232,7 @@ declare namespace chrome {
1232
1232
  *
1233
1233
  * @chrome-returns-extra since Chrome 116
1234
1234
  * @param streamType Stream type for which mute state should be fetched.
1235
+ * @returns Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
1235
1236
  */
1236
1237
  export function getMute(
1237
1238
 
@@ -1242,7 +1243,6 @@ declare namespace chrome {
1242
1243
  * Gets the system-wide mute state for the specified stream type.
1243
1244
  *
1244
1245
  * @param streamType Stream type for which mute state should be fetched.
1245
- * @param callback Callback reporting whether mute is set or not for specified stream type.
1246
1246
  */
1247
1247
  export function getMute(
1248
1248
 
@@ -1988,6 +1988,7 @@ declare namespace chrome {
1988
1988
  *
1989
1989
  * @chrome-returns-extra since Chrome 96
1990
1990
  * @param dataToRemove The set of data types to remove.
1991
+ * @returns Resolves when deletion has completed.
1991
1992
  */
1992
1993
  export function remove(
1993
1994
 
@@ -2000,7 +2001,6 @@ declare namespace chrome {
2000
2001
  * Clears various types of browsing data stored in a user's profile.
2001
2002
  *
2002
2003
  * @param dataToRemove The set of data types to remove.
2003
- * @param callback Resolves when deletion has completed.
2004
2004
  */
2005
2005
  export function remove(
2006
2006
 
@@ -2015,6 +2015,7 @@ declare namespace chrome {
2015
2015
  * Clears websites' appcache data.
2016
2016
  *
2017
2017
  * @chrome-returns-extra since Chrome 96
2018
+ * @returns Resolves when websites' appcache data has been cleared.
2018
2019
  */
2019
2020
  export function removeAppcache(
2020
2021
 
@@ -2023,8 +2024,6 @@ declare namespace chrome {
2023
2024
 
2024
2025
  /**
2025
2026
  * Clears websites' appcache data.
2026
- *
2027
- * @param callback Resolves when websites' appcache data has been cleared.
2028
2027
  */
2029
2028
  export function removeAppcache(
2030
2029
 
@@ -2037,6 +2036,7 @@ declare namespace chrome {
2037
2036
  * Clears the browser's cache.
2038
2037
  *
2039
2038
  * @chrome-returns-extra since Chrome 96
2039
+ * @returns Resolves when the browser's cache has been cleared.
2040
2040
  */
2041
2041
  export function removeCache(
2042
2042
 
@@ -2045,8 +2045,6 @@ declare namespace chrome {
2045
2045
 
2046
2046
  /**
2047
2047
  * Clears the browser's cache.
2048
- *
2049
- * @param callback Resolves when the browser's cache has been cleared.
2050
2048
  */
2051
2049
  export function removeCache(
2052
2050
 
@@ -2059,6 +2057,7 @@ declare namespace chrome {
2059
2057
  * Clears websites' cache storage data.
2060
2058
  *
2061
2059
  * @chrome-returns-extra since Chrome 96
2060
+ * @returns Resolves when websites' cache storage has been cleared.
2062
2061
  * @since Chrome 72
2063
2062
  */
2064
2063
  export function removeCacheStorage(
@@ -2069,7 +2068,6 @@ declare namespace chrome {
2069
2068
  /**
2070
2069
  * Clears websites' cache storage data.
2071
2070
  *
2072
- * @param callback Resolves when websites' cache storage has been cleared.
2073
2071
  * @since Chrome 72
2074
2072
  */
2075
2073
  export function removeCacheStorage(
@@ -2083,6 +2081,7 @@ declare namespace chrome {
2083
2081
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
2084
2082
  *
2085
2083
  * @chrome-returns-extra since Chrome 96
2084
+ * @returns Resolves when the browser's cookies and server-bound certificates have been cleared.
2086
2085
  */
2087
2086
  export function removeCookies(
2088
2087
 
@@ -2091,8 +2090,6 @@ declare namespace chrome {
2091
2090
 
2092
2091
  /**
2093
2092
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
2094
- *
2095
- * @param callback Resolves when the browser's cookies and server-bound certificates have been cleared.
2096
2093
  */
2097
2094
  export function removeCookies(
2098
2095
 
@@ -2105,6 +2102,7 @@ declare namespace chrome {
2105
2102
  * Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
2106
2103
  *
2107
2104
  * @chrome-returns-extra since Chrome 96
2105
+ * @returns Resolves when the browser's list of downloaded files has been cleared.
2108
2106
  */
2109
2107
  export function removeDownloads(
2110
2108
 
@@ -2113,8 +2111,6 @@ declare namespace chrome {
2113
2111
 
2114
2112
  /**
2115
2113
  * Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
2116
- *
2117
- * @param callback Resolves when the browser's list of downloaded files has been cleared.
2118
2114
  */
2119
2115
  export function removeDownloads(
2120
2116
 
@@ -2127,6 +2123,7 @@ declare namespace chrome {
2127
2123
  * Clears websites' file system data.
2128
2124
  *
2129
2125
  * @chrome-returns-extra since Chrome 96
2126
+ * @returns Resolves when websites' file systems have been cleared.
2130
2127
  */
2131
2128
  export function removeFileSystems(
2132
2129
 
@@ -2135,8 +2132,6 @@ declare namespace chrome {
2135
2132
 
2136
2133
  /**
2137
2134
  * Clears websites' file system data.
2138
- *
2139
- * @param callback Resolves when websites' file systems have been cleared.
2140
2135
  */
2141
2136
  export function removeFileSystems(
2142
2137
 
@@ -2149,6 +2144,7 @@ declare namespace chrome {
2149
2144
  * Clears the browser's stored form data (autofill).
2150
2145
  *
2151
2146
  * @chrome-returns-extra since Chrome 96
2147
+ * @returns Resolves when the browser's form data has been cleared.
2152
2148
  */
2153
2149
  export function removeFormData(
2154
2150
 
@@ -2157,8 +2153,6 @@ declare namespace chrome {
2157
2153
 
2158
2154
  /**
2159
2155
  * Clears the browser's stored form data (autofill).
2160
- *
2161
- * @param callback Resolves when the browser's form data has been cleared.
2162
2156
  */
2163
2157
  export function removeFormData(
2164
2158
 
@@ -2171,6 +2165,7 @@ declare namespace chrome {
2171
2165
  * Clears the browser's history.
2172
2166
  *
2173
2167
  * @chrome-returns-extra since Chrome 96
2168
+ * @returns Resolves when the browser's history has cleared.
2174
2169
  */
2175
2170
  export function removeHistory(
2176
2171
 
@@ -2179,8 +2174,6 @@ declare namespace chrome {
2179
2174
 
2180
2175
  /**
2181
2176
  * Clears the browser's history.
2182
- *
2183
- * @param callback Resolves when the browser's history has cleared.
2184
2177
  */
2185
2178
  export function removeHistory(
2186
2179
 
@@ -2193,6 +2186,7 @@ declare namespace chrome {
2193
2186
  * Clears websites' IndexedDB data.
2194
2187
  *
2195
2188
  * @chrome-returns-extra since Chrome 96
2189
+ * @returns Resolves when websites' IndexedDB data has been cleared.
2196
2190
  */
2197
2191
  export function removeIndexedDB(
2198
2192
 
@@ -2201,8 +2195,6 @@ declare namespace chrome {
2201
2195
 
2202
2196
  /**
2203
2197
  * Clears websites' IndexedDB data.
2204
- *
2205
- * @param callback Resolves when websites' IndexedDB data has been cleared.
2206
2198
  */
2207
2199
  export function removeIndexedDB(
2208
2200
 
@@ -2215,6 +2207,7 @@ declare namespace chrome {
2215
2207
  * Clears websites' local storage data.
2216
2208
  *
2217
2209
  * @chrome-returns-extra since Chrome 96
2210
+ * @returns Resolves when websites' local storage has been cleared.
2218
2211
  */
2219
2212
  export function removeLocalStorage(
2220
2213
 
@@ -2223,8 +2216,6 @@ declare namespace chrome {
2223
2216
 
2224
2217
  /**
2225
2218
  * Clears websites' local storage data.
2226
- *
2227
- * @param callback Resolves when websites' local storage has been cleared.
2228
2219
  */
2229
2220
  export function removeLocalStorage(
2230
2221
 
@@ -2237,6 +2228,7 @@ declare namespace chrome {
2237
2228
  * Clears plugins' data.
2238
2229
  *
2239
2230
  * @chrome-returns-extra since Chrome 96
2231
+ * @returns Resolves when plugins' data has been cleared.
2240
2232
  * @deprecated Support for Flash has been removed. This function has no effect.
2241
2233
  * @chrome-deprecated-since Chrome 88
2242
2234
  */
@@ -2248,7 +2240,6 @@ declare namespace chrome {
2248
2240
  /**
2249
2241
  * Clears plugins' data.
2250
2242
  *
2251
- * @param callback Resolves when plugins' data has been cleared.
2252
2243
  * @deprecated Support for Flash has been removed. This function has no effect.
2253
2244
  * @chrome-deprecated-since Chrome 88
2254
2245
  */
@@ -2263,6 +2254,7 @@ declare namespace chrome {
2263
2254
  * Clears the browser's stored passwords.
2264
2255
  *
2265
2256
  * @chrome-returns-extra since Chrome 96
2257
+ * @returns Resolves when the browser's passwords have been cleared.
2266
2258
  * @deprecated Support for password deletion through extensions has been removed. This function has no effect.
2267
2259
  */
2268
2260
  export function removePasswords(
@@ -2273,7 +2265,6 @@ declare namespace chrome {
2273
2265
  /**
2274
2266
  * Clears the browser's stored passwords.
2275
2267
  *
2276
- * @param callback Resolves when the browser's passwords have been cleared.
2277
2268
  * @deprecated Support for password deletion through extensions has been removed. This function has no effect.
2278
2269
  */
2279
2270
  export function removePasswords(
@@ -2287,6 +2278,7 @@ declare namespace chrome {
2287
2278
  * Clears websites' service workers.
2288
2279
  *
2289
2280
  * @chrome-returns-extra since Chrome 96
2281
+ * @returns Resolves when websites' service workers have been cleared.
2290
2282
  * @since Chrome 72
2291
2283
  */
2292
2284
  export function removeServiceWorkers(
@@ -2297,7 +2289,6 @@ declare namespace chrome {
2297
2289
  /**
2298
2290
  * Clears websites' service workers.
2299
2291
  *
2300
- * @param callback Resolves when websites' service workers have been cleared.
2301
2292
  * @since Chrome 72
2302
2293
  */
2303
2294
  export function removeServiceWorkers(
@@ -2311,6 +2302,7 @@ declare namespace chrome {
2311
2302
  * Clears websites' WebSQL data.
2312
2303
  *
2313
2304
  * @chrome-returns-extra since Chrome 96
2305
+ * @returns Resolves when websites' WebSQL databases have been cleared.
2314
2306
  */
2315
2307
  export function removeWebSQL(
2316
2308
 
@@ -2319,8 +2311,6 @@ declare namespace chrome {
2319
2311
 
2320
2312
  /**
2321
2313
  * Clears websites' WebSQL data.
2322
- *
2323
- * @param callback Resolves when websites' WebSQL databases have been cleared.
2324
2314
  */
2325
2315
  export function removeWebSQL(
2326
2316
 
@@ -2606,6 +2596,7 @@ declare namespace chrome {
2606
2596
  *
2607
2597
  * @chrome-returns-extra since Chrome 96
2608
2598
  * @param details Contains the details about the requested dialog.
2599
+ * @returns Returns a Promise which resolves when the PIN is provided by the user. Rejects with an error if the dialog request finishes unsuccessfully (e.g. the dialog was canceled by the user or was not allowed to be shown).
2609
2600
  * @since Chrome 57
2610
2601
  */
2611
2602
  export function requestPin(
@@ -2617,7 +2608,6 @@ declare namespace chrome {
2617
2608
  * Requests the PIN from the user. Only one ongoing request at a time is allowed. The requests issued while another flow is ongoing are rejected. It's the extension's responsibility to try again later if another flow is in progress.
2618
2609
  *
2619
2610
  * @param details Contains the details about the requested dialog.
2620
- * @param callback Is called when the dialog is resolved with the user input, or when the dialog request finishes unsuccessfully (e.g. the dialog was canceled by the user or was not allowed to be shown).
2621
2611
  * @since Chrome 57
2622
2612
  */
2623
2613
  export function requestPin(
@@ -2634,6 +2624,7 @@ declare namespace chrome {
2634
2624
  *
2635
2625
  * @chrome-returns-extra since Chrome 96
2636
2626
  * @param details Contains the details about the reason for stopping the request flow.
2627
+ * @returns Returns a Promise which resolves when the request to close the PIN dialog is complete.
2637
2628
  * @since Chrome 57
2638
2629
  */
2639
2630
  export function stopPinRequest(
@@ -2645,7 +2636,6 @@ declare namespace chrome {
2645
2636
  * Stops the pin request started by the {@link requestPin} function.
2646
2637
  *
2647
2638
  * @param details Contains the details about the reason for stopping the request flow.
2648
- * @param callback To be used by Chrome to send to the extension the status from their request to close PIN dialog for user.
2649
2639
  * @since Chrome 57
2650
2640
  */
2651
2641
  export function stopPinRequest(
@@ -2662,6 +2652,7 @@ declare namespace chrome {
2662
2652
  *
2663
2653
  * @chrome-returns-extra since Chrome 96
2664
2654
  * @param details The certificates to set. Invalid certificates will be ignored.
2655
+ * @returns Returns a Promise which resolves upon completion.
2665
2656
  * @since Chrome 86
2666
2657
  */
2667
2658
  export function setCertificates(
@@ -2675,7 +2666,6 @@ declare namespace chrome {
2675
2666
  * The extension should call this function after initialization and on every change in the set of currently available certificates. The extension should also call this function in response to {@link onCertificatesUpdateRequested} every time this event is received.
2676
2667
  *
2677
2668
  * @param details The certificates to set. Invalid certificates will be ignored.
2678
- * @param callback Called upon completion.
2679
2669
  * @since Chrome 86
2680
2670
  */
2681
2671
  export function setCertificates(
@@ -2779,13 +2769,12 @@ declare namespace chrome {
2779
2769
  * Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
2780
2770
  *
2781
2771
  * @chrome-returns-extra since Chrome 96
2772
+ * @returns Resolves with a list of the registered commands.
2782
2773
  */
2783
2774
  export function getAll(): Promise<Command[]>;
2784
2775
 
2785
2776
  /**
2786
2777
  * Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
2787
- *
2788
- * @param callback Resolves with a list of the registered commands.
2789
2778
  */
2790
2779
  export function getAll(
2791
2780
 
@@ -3506,6 +3495,7 @@ declare namespace chrome {
3506
3495
  * @chrome-returns-extra since Chrome 123
3507
3496
  * @param id The ID of the item to update.
3508
3497
  * @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
3498
+ * @returns Resolves when the context menu has been updated.
3509
3499
  */
3510
3500
  export function update(
3511
3501
 
@@ -3560,7 +3550,6 @@ declare namespace chrome {
3560
3550
  *
3561
3551
  * @param id The ID of the item to update.
3562
3552
  * @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
3563
- * @param callback Resolves when the context menu has been updated.
3564
3553
  */
3565
3554
  export function update(
3566
3555
 
@@ -3617,6 +3606,7 @@ declare namespace chrome {
3617
3606
  *
3618
3607
  * @chrome-returns-extra since Chrome 123
3619
3608
  * @param menuItemId The ID of the context menu item to remove.
3609
+ * @returns Resolves when the context menu has been removed.
3620
3610
  */
3621
3611
  export function remove(
3622
3612
 
@@ -3627,7 +3617,6 @@ declare namespace chrome {
3627
3617
  * Removes a context menu item.
3628
3618
  *
3629
3619
  * @param menuItemId The ID of the context menu item to remove.
3630
- * @param callback Resolves when the context menu has been removed.
3631
3620
  */
3632
3621
  export function remove(
3633
3622
 
@@ -3640,13 +3629,12 @@ declare namespace chrome {
3640
3629
  * Removes all context menu items added by this extension.
3641
3630
  *
3642
3631
  * @chrome-returns-extra since Chrome 123
3632
+ * @returns Resolves when removal is complete.
3643
3633
  */
3644
3634
  export function removeAll(): Promise<void>;
3645
3635
 
3646
3636
  /**
3647
3637
  * Removes all context menu items added by this extension.
3648
- *
3649
- * @param callback Resolves when removal is complete.
3650
3638
  */
3651
3639
  export function removeAll(
3652
3640
 
@@ -4427,6 +4415,7 @@ declare namespace chrome {
4427
4415
  * @chrome-returns-extra since Chrome 96
4428
4416
  * @param target Debugging target to which you want to attach.
4429
4417
  * @param requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained [here](https://developer.chrome.com/devtools/docs/debugger-protocol).
4418
+ * @returns Resolves once the attach operation succeeds or fails. The promise resolves with no value. If the attach fails, the promise will be rejected.
4430
4419
  */
4431
4420
  export function attach(
4432
4421
 
@@ -4440,7 +4429,6 @@ declare namespace chrome {
4440
4429
  *
4441
4430
  * @param target Debugging target to which you want to attach.
4442
4431
  * @param requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained [here](https://developer.chrome.com/devtools/docs/debugger-protocol).
4443
- * @param callback Resolves once the attach operation succeeds or fails. The promise resolves with no value. If the attach fails, the promise will be rejected.
4444
4432
  */
4445
4433
  export function attach(
4446
4434
 
@@ -4456,6 +4444,7 @@ declare namespace chrome {
4456
4444
  *
4457
4445
  * @chrome-returns-extra since Chrome 96
4458
4446
  * @param target Debugging target from which you want to detach.
4447
+ * @returns Resolves once the detach operation succeeds or fails. The promise resolves with no value. If the detach fails, the promise will be rejected.
4459
4448
  */
4460
4449
  export function detach(
4461
4450
 
@@ -4466,7 +4455,6 @@ declare namespace chrome {
4466
4455
  * Detaches debugger from the given target.
4467
4456
  *
4468
4457
  * @param target Debugging target from which you want to detach.
4469
- * @param callback Resolves once the detach operation succeeds or fails. The promise resolves with no value. If the detach fails, the promise will be rejected.
4470
4458
  */
4471
4459
  export function detach(
4472
4460
 
@@ -4482,6 +4470,7 @@ declare namespace chrome {
4482
4470
  * @param target Debugging target to which you want to send the command.
4483
4471
  * @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
4484
4472
  * @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
4473
+ * @returns Response body. If an error occurs while posting the message, the promise will be rejected.
4485
4474
  */
4486
4475
  export function sendCommand(
4487
4476
 
@@ -4498,7 +4487,6 @@ declare namespace chrome {
4498
4487
  * @param target Debugging target to which you want to send the command.
4499
4488
  * @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
4500
4489
  * @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
4501
- * @param callback Response body. If an error occurs while posting the message, the promise will be rejected.
4502
4490
  */
4503
4491
  export function sendCommand(
4504
4492
 
@@ -5549,6 +5537,7 @@ declare namespace chrome {
5549
5537
  * * {@link MAX_NUMBER_OF_DYNAMIC_RULES} is the maximum number of dynamic rules an extension can add. The number of [unsafe rules](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#safe_rules) must not exceed {@link MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES}.
5550
5538
  *
5551
5539
  * @chrome-returns-extra since Chrome 91
5540
+ * @returns Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
5552
5541
  */
5553
5542
  export function updateDynamicRules(
5554
5543
 
@@ -5565,8 +5554,6 @@ declare namespace chrome {
5565
5554
  * * These rules are persisted across browser sessions and across extension updates.
5566
5555
  * * Static rules specified as part of the extension package can not be removed using this function.
5567
5556
  * * {@link MAX_NUMBER_OF_DYNAMIC_RULES} is the maximum number of dynamic rules an extension can add. The number of [unsafe rules](https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#safe_rules) must not exceed {@link MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES}.
5568
- *
5569
- * @param callback Called once the update is complete or has failed. In case of an error, {@link runtime.lastError} will be set and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
5570
5557
  */
5571
5558
  export function updateDynamicRules(
5572
5559
 
@@ -5583,6 +5570,7 @@ declare namespace chrome {
5583
5570
  *
5584
5571
  * @chrome-returns-extra since Chrome 91
5585
5572
  * @param filter An object to filter the list of fetched rules.
5573
+ * @returns Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
5586
5574
  */
5587
5575
  export function getDynamicRules(
5588
5576
 
@@ -5596,7 +5584,6 @@ declare namespace chrome {
5596
5584
  * Returns the current set of dynamic rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
5597
5585
  *
5598
5586
  * @param filter An object to filter the list of fetched rules.
5599
- * @param callback Called with the set of dynamic rules. An error might be raised in case of transient internal errors.
5600
5587
  */
5601
5588
  export function getDynamicRules(
5602
5589
 
@@ -5618,6 +5605,7 @@ declare namespace chrome {
5618
5605
  * * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
5619
5606
  *
5620
5607
  * @chrome-returns-extra since Chrome 91
5608
+ * @returns Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
5621
5609
  * @since Chrome 90
5622
5610
  */
5623
5611
  export function updateSessionRules(
@@ -5632,7 +5620,6 @@ declare namespace chrome {
5632
5620
  * * These rules are not persisted across sessions and are backed in memory.
5633
5621
  * * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
5634
5622
  *
5635
- * @param callback Called once the update is complete or has failed. In case of an error, {@link runtime.lastError} will be set and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
5636
5623
  * @since Chrome 90
5637
5624
  */
5638
5625
  export function updateSessionRules(
@@ -5647,6 +5634,7 @@ declare namespace chrome {
5647
5634
  *
5648
5635
  * @chrome-returns-extra since Chrome 91
5649
5636
  * @param filter An object to filter the list of fetched rules.
5637
+ * @returns Promise that resolves with the set of session scoped rules.
5650
5638
  * @since Chrome 90
5651
5639
  */
5652
5640
  export function getSessionRules(
@@ -5661,7 +5649,6 @@ declare namespace chrome {
5661
5649
  * Returns the current set of session scoped rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
5662
5650
  *
5663
5651
  * @param filter An object to filter the list of fetched rules.
5664
- * @param callback Called with the set of session scoped rules.
5665
5652
  * @since Chrome 90
5666
5653
  */
5667
5654
  export function getSessionRules(
@@ -5681,6 +5668,7 @@ declare namespace chrome {
5681
5668
  * Note that the set of enabled static rulesets is persisted across sessions but not across extension updates, i.e. the `rule_resources` manifest key will determine the set of enabled static rulesets on each extension update.
5682
5669
  *
5683
5670
  * @chrome-returns-extra since Chrome 91
5671
+ * @returns Promise that resolves once the update is complete. In case of an error, the promise will be rejected and no change will be made to the set of enabled rulesets. This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
5684
5672
  */
5685
5673
  export function updateEnabledRulesets(
5686
5674
 
@@ -5693,8 +5681,6 @@ declare namespace chrome {
5693
5681
  /**
5694
5682
  * Updates the set of enabled static rulesets for the extension. The rulesets with IDs listed in `options.disableRulesetIds` are first removed, and then the rulesets listed in `options.enableRulesetIds` are added.
5695
5683
  * Note that the set of enabled static rulesets is persisted across sessions but not across extension updates, i.e. the `rule_resources` manifest key will determine the set of enabled static rulesets on each extension update.
5696
- *
5697
- * @param callback Called once the update is complete. In case of an error, {@link runtime.lastError} will be set and no change will be made to set of enabled rulesets. This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
5698
5684
  */
5699
5685
  export function updateEnabledRulesets(
5700
5686
 
@@ -5710,13 +5696,12 @@ declare namespace chrome {
5710
5696
  * Returns the ids for the current set of enabled static rulesets.
5711
5697
  *
5712
5698
  * @chrome-returns-extra since Chrome 91
5699
+ * @returns Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
5713
5700
  */
5714
5701
  export function getEnabledRulesets(): Promise<string[]>;
5715
5702
 
5716
5703
  /**
5717
5704
  * Returns the ids for the current set of enabled static rulesets.
5718
- *
5719
- * @param callback Called with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
5720
5705
  */
5721
5706
  export function getEnabledRulesets(
5722
5707
 
@@ -5728,6 +5713,7 @@ declare namespace chrome {
5728
5713
  /**
5729
5714
  * Disables and enables individual static rules in a {@link Ruleset}. Changes to rules belonging to a disabled {@link Ruleset} will take effect the next time that it becomes enabled.
5730
5715
  *
5716
+ * @returns Promise that resolves when the update is complete. In case of an error, the promise will be rejected and no change will be made to the enabled static rules.
5731
5717
  * @since Chrome 111
5732
5718
  */
5733
5719
  export function updateStaticRules(
@@ -5738,7 +5724,6 @@ declare namespace chrome {
5738
5724
  /**
5739
5725
  * Disables and enables individual static rules in a {@link Ruleset}. Changes to rules belonging to a disabled {@link Ruleset} will take effect the next time that it becomes enabled.
5740
5726
  *
5741
- * @param callback Called once the update is complete. In case of an error, {@link runtime.lastError} will be set and no change will be made to the enabled static rules.
5742
5727
  * @since Chrome 111
5743
5728
  */
5744
5729
  export function updateStaticRules(
@@ -5752,6 +5737,7 @@ declare namespace chrome {
5752
5737
  * Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
5753
5738
  *
5754
5739
  * @param options Specifies the ruleset to query.
5740
+ * @returns Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
5755
5741
  * @since Chrome 111
5756
5742
  */
5757
5743
  export function getDisabledRuleIds(
@@ -5763,7 +5749,6 @@ declare namespace chrome {
5763
5749
  * Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
5764
5750
  *
5765
5751
  * @param options Specifies the ruleset to query.
5766
- * @param callback Called with a list of ids that correspond to the disabled rules in that ruleset.
5767
5752
  * @since Chrome 111
5768
5753
  */
5769
5754
  export function getDisabledRuleIds(
@@ -5780,6 +5765,7 @@ declare namespace chrome {
5780
5765
  *
5781
5766
  * @chrome-returns-extra since Chrome 91
5782
5767
  * @param filter An object to filter the list of matched rules.
5768
+ * @returns Promise that resolves once the list of matched rules has been fetched. In case of an error, the Promise will be rejected. This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
5783
5769
  */
5784
5770
  export function getMatchedRules(
5785
5771
 
@@ -5790,7 +5776,6 @@ declare namespace chrome {
5790
5776
  * Returns all rules matched for the extension. Callers can optionally filter the list of matched rules by specifying a `filter`. This method is only available to extensions with the `"declarativeNetRequestFeedback"` permission or having the `"activeTab"` permission granted for the `tabId` specified in `filter`. Note: Rules not associated with an active document that were matched more than five minutes ago will not be returned.
5791
5777
  *
5792
5778
  * @param filter An object to filter the list of matched rules.
5793
- * @param callback Called once the list of matched rules has been fetched. In case of an error, {@link runtime.lastError} will be set and no rules will be returned. This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
5794
5779
  */
5795
5780
  export function getMatchedRules(
5796
5781
 
@@ -5832,6 +5817,7 @@ declare namespace chrome {
5832
5817
  *
5833
5818
  * @chrome-returns-extra since Chrome 91
5834
5819
  * @param regexOptions The regular expression to check.
5820
+ * @returns Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
5835
5821
  * @since Chrome 87
5836
5822
  */
5837
5823
  export function isRegexSupported(
@@ -5843,7 +5829,6 @@ declare namespace chrome {
5843
5829
  * Checks if the given regular expression will be supported as a `regexFilter` rule condition.
5844
5830
  *
5845
5831
  * @param regexOptions The regular expression to check.
5846
- * @param callback Called with details consisting of whether the regular expression is supported and the reason if not.
5847
5832
  * @since Chrome 87
5848
5833
  */
5849
5834
  export function isRegexSupported(
@@ -5878,6 +5863,7 @@ declare namespace chrome {
5878
5863
  /**
5879
5864
  * Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
5880
5865
  *
5866
+ * @returns Promise that resolves with the details of matched rules.
5881
5867
  * @since Chrome 103
5882
5868
  */
5883
5869
  export function testMatchOutcome(
@@ -5888,7 +5874,6 @@ declare namespace chrome {
5888
5874
  /**
5889
5875
  * Checks if any of the extension's declarativeNetRequest rules would match a hypothetical request. Note: Only available for unpacked extensions as this is only intended to be used during extension development.
5890
5876
  *
5891
- * @param callback Called with the details of matched rules.
5892
5877
  * @since Chrome 103
5893
5878
  */
5894
5879
  export function testMatchOutcome(
@@ -6715,6 +6700,7 @@ declare namespace chrome {
6715
6700
  * Resolves the given hostname or IP address literal.
6716
6701
  *
6717
6702
  * @param hostname The hostname to resolve.
6703
+ * @returns Promise that resolves when the resolution operation completes.
6718
6704
  */
6719
6705
  export function resolve(
6720
6706
 
@@ -6725,7 +6711,6 @@ declare namespace chrome {
6725
6711
  * Resolves the given hostname or IP address literal.
6726
6712
  *
6727
6713
  * @param hostname The hostname to resolve.
6728
- * @param callback Called when the resolution operation completes.
6729
6714
  */
6730
6715
  export function resolve(
6731
6716
 
@@ -7246,6 +7231,7 @@ declare namespace chrome {
7246
7231
  *
7247
7232
  * @chrome-returns-extra since Chrome 96
7248
7233
  * @param options An object containing scan parameters.
7234
+ * @returns Returns a Promise which resolves with the scan results.
7249
7235
  */
7250
7236
  export function scan(
7251
7237
 
@@ -7256,7 +7242,6 @@ declare namespace chrome {
7256
7242
  * Performs a document scan and returns a Promise that resolves with a {@link ScanResults} object. If a callback is passed to this function, the returned data is passed to it instead.
7257
7243
  *
7258
7244
  * @param options An object containing scan parameters.
7259
- * @param callback Called with the result and data from the scan.
7260
7245
  */
7261
7246
  export function scan(
7262
7247
 
@@ -7271,6 +7256,7 @@ declare namespace chrome {
7271
7256
  * Gets the list of available scanners and returns a Promise that resolves with a {@link GetScannerListResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7272
7257
  *
7273
7258
  * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
7259
+ * @returns Returns a Promise which resolves with the result and list of scanners.
7274
7260
  * @since Chrome 125
7275
7261
  */
7276
7262
  export function getScannerList(
@@ -7282,7 +7268,6 @@ declare namespace chrome {
7282
7268
  * Gets the list of available scanners and returns a Promise that resolves with a {@link GetScannerListResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7283
7269
  *
7284
7270
  * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
7285
- * @param callback Called with the result and list of scanners.
7286
7271
  * @since Chrome 125
7287
7272
  */
7288
7273
  export function getScannerList(
@@ -7298,6 +7283,7 @@ declare namespace chrome {
7298
7283
  * Opens a scanner for exclusive access and returns a Promise that resolves with an {@link OpenScannerResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7299
7284
  *
7300
7285
  * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
7286
+ * @returns Returns a Promise which resolves with the result.
7301
7287
  * @since Chrome 125
7302
7288
  */
7303
7289
  export function openScanner(
@@ -7309,7 +7295,6 @@ declare namespace chrome {
7309
7295
  * Opens a scanner for exclusive access and returns a Promise that resolves with an {@link OpenScannerResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7310
7296
  *
7311
7297
  * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
7312
- * @param callback Called with the result.
7313
7298
  * @since Chrome 125
7314
7299
  */
7315
7300
  export function openScanner(
@@ -7325,6 +7310,7 @@ declare namespace chrome {
7325
7310
  * Gets the group names and member options from a scanner previously opened by {@link openScanner}. This method returns a Promise that resolves with a {@link GetOptionGroupsResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7326
7311
  *
7327
7312
  * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
7313
+ * @returns Returns a Promise which resolves with the result.
7328
7314
  * @since Chrome 125
7329
7315
  */
7330
7316
  export function getOptionGroups(
@@ -7336,7 +7322,6 @@ declare namespace chrome {
7336
7322
  * Gets the group names and member options from a scanner previously opened by {@link openScanner}. This method returns a Promise that resolves with a {@link GetOptionGroupsResponse} object. If a callback is passed to this function, returned data is passed to it instead.
7337
7323
  *
7338
7324
  * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
7339
- * @param callback Called with the result.
7340
7325
  * @since Chrome 125
7341
7326
  */
7342
7327
  export function getOptionGroups(
@@ -7352,6 +7337,7 @@ declare namespace chrome {
7352
7337
  * Closes the scanner with the passed in handle and returns a Promise that resolves with a {@link CloseScannerResponse} object. If a callback is used, the object is passed to it instead. Even if the response is not a success, the supplied handle becomes invalid and should not be used for further operations.
7353
7338
  *
7354
7339
  * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
7340
+ * @returns Returns a Promise which resolves with the result.
7355
7341
  * @since Chrome 125
7356
7342
  */
7357
7343
  export function closeScanner(
@@ -7363,7 +7349,6 @@ declare namespace chrome {
7363
7349
  * Closes the scanner with the passed in handle and returns a Promise that resolves with a {@link CloseScannerResponse} object. If a callback is used, the object is passed to it instead. Even if the response is not a success, the supplied handle becomes invalid and should not be used for further operations.
7364
7350
  *
7365
7351
  * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
7366
- * @param callback Called with the result.
7367
7352
  * @since Chrome 125
7368
7353
  */
7369
7354
  export function closeScanner(
@@ -7380,6 +7365,7 @@ declare namespace chrome {
7380
7365
  *
7381
7366
  * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
7382
7367
  * @param options A list of `OptionSetting` objects to be applied to the scanner.
7368
+ * @returns Returns a Promise which resolves with the result.
7383
7369
  * @since Chrome 125
7384
7370
  */
7385
7371
  export function setOptions(
@@ -7394,7 +7380,6 @@ declare namespace chrome {
7394
7380
  *
7395
7381
  * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
7396
7382
  * @param options A list of `OptionSetting` objects to be applied to the scanner.
7397
- * @param callback Called with the result.
7398
7383
  * @since Chrome 125
7399
7384
  */
7400
7385
  export function setOptions(
@@ -7413,6 +7398,7 @@ declare namespace chrome {
7413
7398
  *
7414
7399
  * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
7415
7400
  * @param options A {@link StartScanOptions} object indicating the options to be used for the scan. The `StartScanOptions.format` property must match one of the entries returned in the scanner's `ScannerInfo`.
7401
+ * @returns Returns a Promise which resolves with the result.
7416
7402
  * @since Chrome 125
7417
7403
  */
7418
7404
  export function startScan(
@@ -7427,7 +7413,6 @@ declare namespace chrome {
7427
7413
  *
7428
7414
  * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
7429
7415
  * @param options A {@link StartScanOptions} object indicating the options to be used for the scan. The `StartScanOptions.format` property must match one of the entries returned in the scanner's `ScannerInfo`.
7430
- * @param callback Called with the result.
7431
7416
  * @since Chrome 125
7432
7417
  */
7433
7418
  export function startScan(
@@ -7445,6 +7430,7 @@ declare namespace chrome {
7445
7430
  * Cancels a started scan and returns a Promise that resolves with a {@link CancelScanResponse} object. If a callback is used, the object is passed to it instead.
7446
7431
  *
7447
7432
  * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
7433
+ * @returns Returns a Promise which resolves with the result.
7448
7434
  * @since Chrome 125
7449
7435
  */
7450
7436
  export function cancelScan(
@@ -7456,7 +7442,6 @@ declare namespace chrome {
7456
7442
  * Cancels a started scan and returns a Promise that resolves with a {@link CancelScanResponse} object. If a callback is used, the object is passed to it instead.
7457
7443
  *
7458
7444
  * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
7459
- * @param callback Called with the result.
7460
7445
  * @since Chrome 125
7461
7446
  */
7462
7447
  export function cancelScan(
@@ -7476,6 +7461,7 @@ declare namespace chrome {
7476
7461
  * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
7477
7462
  *
7478
7463
  * @param job Active job handle previously returned from {@link startScan}.
7464
+ * @returns Returns a Promise which resolves with the result.
7479
7465
  * @since Chrome 125
7480
7466
  */
7481
7467
  export function readScanData(
@@ -7491,7 +7477,6 @@ declare namespace chrome {
7491
7477
  * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
7492
7478
  *
7493
7479
  * @param job Active job handle previously returned from {@link startScan}.
7494
- * @param callback Called with the result.
7495
7480
  * @since Chrome 125
7496
7481
  */
7497
7482
  export function readScanData(
@@ -8049,6 +8034,7 @@ declare namespace chrome {
8049
8034
  *
8050
8035
  * @chrome-returns-extra since Chrome 96
8051
8036
  * @param options What to download and how.
8037
+ * @returns Returns a Promise which resolves with the id of the new {@link DownloadItem}.
8052
8038
  */
8053
8039
  export function download(
8054
8040
 
@@ -8059,7 +8045,6 @@ declare namespace chrome {
8059
8045
  * Download a URL. If the URL uses the HTTP\[S\] protocol, then the request will include all cookies currently set for its hostname. If both `filename` and `saveAs` are specified, then the Save As dialog will be displayed, pre-populated with the specified `filename`. If the download started successfully, `callback` will be called with the new {@link DownloadItem}'s `downloadId`. If there was an error starting the download, then `callback` will be called with `downloadId=undefined` and {@link runtime.lastError} will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.
8060
8046
  *
8061
8047
  * @param options What to download and how.
8062
- * @param callback Called with the id of the new {@link DownloadItem}.
8063
8048
  */
8064
8049
  export function download(
8065
8050
 
@@ -8097,6 +8082,7 @@ declare namespace chrome {
8097
8082
  *
8098
8083
  * @chrome-returns-extra since Chrome 96
8099
8084
  * @param downloadId The id of the download to pause.
8085
+ * @returns Returns a Promise which resolves when the pause request is completed.
8100
8086
  */
8101
8087
  export function pause(
8102
8088
 
@@ -8107,7 +8093,6 @@ declare namespace chrome {
8107
8093
  * Pause the download. If the request was successful the download is in a paused state. Otherwise {@link runtime.lastError} contains an error message. The request will fail if the download is not active.
8108
8094
  *
8109
8095
  * @param downloadId The id of the download to pause.
8110
- * @param callback Called when the pause request is completed.
8111
8096
  */
8112
8097
  export function pause(
8113
8098
 
@@ -8121,6 +8106,7 @@ declare namespace chrome {
8121
8106
  *
8122
8107
  * @chrome-returns-extra since Chrome 96
8123
8108
  * @param downloadId The id of the download to resume.
8109
+ * @returns Returns a Promise which resolves when the resume request is completed.
8124
8110
  */
8125
8111
  export function resume(
8126
8112
 
@@ -8131,7 +8117,6 @@ declare namespace chrome {
8131
8117
  * Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise {@link runtime.lastError} contains an error message. The request will fail if the download is not active.
8132
8118
  *
8133
8119
  * @param downloadId The id of the download to resume.
8134
- * @param callback Called when the resume request is completed.
8135
8120
  */
8136
8121
  export function resume(
8137
8122
 
@@ -8145,6 +8130,7 @@ declare namespace chrome {
8145
8130
  *
8146
8131
  * @chrome-returns-extra since Chrome 96
8147
8132
  * @param downloadId The id of the download to cancel.
8133
+ * @returns Returns a Promise which resolves when the cancel request is completed.
8148
8134
  */
8149
8135
  export function cancel(
8150
8136
 
@@ -8155,7 +8141,6 @@ declare namespace chrome {
8155
8141
  * Cancel a download. When `callback` is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
8156
8142
  *
8157
8143
  * @param downloadId The id of the download to cancel.
8158
- * @param callback Called when the cancel request is completed.
8159
8144
  */
8160
8145
  export function cancel(
8161
8146
 
@@ -8169,6 +8154,7 @@ declare namespace chrome {
8169
8154
  *
8170
8155
  * @chrome-returns-extra since Chrome 96
8171
8156
  * @param downloadId The identifier for the download.
8157
+ * @returns Returns a Promise which resolves with a URL to an image that represents the download.
8172
8158
  */
8173
8159
  export function getFileIcon(
8174
8160
 
@@ -8181,7 +8167,6 @@ declare namespace chrome {
8181
8167
  * Retrieve an icon for the specified download. For new downloads, file icons are available after the {@link onCreated} event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, {@link runtime.lastError} will contain an error message.
8182
8168
  *
8183
8169
  * @param downloadId The identifier for the download.
8184
- * @param callback A URL to an image that represents the download.
8185
8170
  */
8186
8171
  export function getFileIcon(
8187
8172
 
@@ -8282,6 +8267,7 @@ declare namespace chrome {
8282
8267
  *
8283
8268
  * @chrome-returns-extra since Chrome 96
8284
8269
  * @param downloadId The identifier for the {@link DownloadItem}.
8270
+ * @returns Returns a Promise which resolves when the danger prompt dialog closes.
8285
8271
  */
8286
8272
  export function acceptDanger(
8287
8273
 
@@ -8292,7 +8278,6 @@ declare namespace chrome {
8292
8278
  * Prompt the user to accept a dangerous download. Can only be called from a visible context (tab, window, or page/browser action popup). Does not automatically accept dangerous downloads. If the download is accepted, then an {@link onChanged} event will fire, otherwise nothing will happen. When all the data is fetched into a temporary file and either the download is not dangerous or the danger has been accepted, then the temporary file is renamed to the target filename, the `state` changes to 'complete', and {@link onChanged} fires.
8293
8279
  *
8294
8280
  * @param downloadId The identifier for the {@link DownloadItem}.
8295
- * @param callback Called when the danger prompt dialog closes.
8296
8281
  */
8297
8282
  export function acceptDanger(
8298
8283
 
@@ -8316,6 +8301,7 @@ declare namespace chrome {
8316
8301
  * Change the download UI of every window associated with the current browser profile. As long as at least one extension has set {@link UiOptions.enabled} to false, the download UI will be hidden. Setting {@link UiOptions.enabled} to true while at least one other extension has disabled it will return an error through {@link runtime.lastError}. Requires the `"downloads.ui"` permission in addition to the `"downloads"` permission.
8317
8302
  *
8318
8303
  * @param options Encapsulate a change to the download UI.
8304
+ * @returns Returns a Promise which resolves when the UI update is completed.
8319
8305
  * @since Chrome 105
8320
8306
  */
8321
8307
  export function setUiOptions(
@@ -8327,7 +8313,6 @@ declare namespace chrome {
8327
8313
  * Change the download UI of every window associated with the current browser profile. As long as at least one extension has set {@link UiOptions.enabled} to false, the download UI will be hidden. Setting {@link UiOptions.enabled} to true while at least one other extension has disabled it will return an error through {@link runtime.lastError}. Requires the `"downloads.ui"` permission in addition to the `"downloads"` permission.
8328
8314
  *
8329
8315
  * @param options Encapsulate a change to the download UI.
8330
- * @param callback Called when the UI update is completed.
8331
8316
  * @since Chrome 105
8332
8317
  */
8333
8318
  export function setUiOptions(
@@ -8352,13 +8337,12 @@ declare namespace chrome {
8352
8337
  * Fetches the value of [the device identifier of the directory API](https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices), that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API. If the current user is not affiliated, returns an empty string.
8353
8338
  *
8354
8339
  * @chrome-returns-extra since Chrome 96
8340
+ * @returns Returns a Promise which resolves with the device identifier of the directory API.
8355
8341
  */
8356
8342
  export function getDirectoryDeviceId(): Promise<string>;
8357
8343
 
8358
8344
  /**
8359
8345
  * Fetches the value of [the device identifier of the directory API](https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices), that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API. If the current user is not affiliated, returns an empty string.
8360
- *
8361
- * @param callback Called with the device identifier of the directory API when received.
8362
8346
  */
8363
8347
  export function getDirectoryDeviceId(
8364
8348
 
@@ -8371,6 +8355,7 @@ declare namespace chrome {
8371
8355
  * Fetches the device's serial number. Please note the purpose of this API is to administrate the device (e.g. generating Certificate Sign Requests for device-wide certificates). This API may not be used for tracking devices without the consent of the device's administrator. If the current user is not affiliated, returns an empty string.
8372
8356
  *
8373
8357
  * @chrome-returns-extra since Chrome 96
8358
+ * @returns Returns a Promise which resolves with the serial number of the device.
8374
8359
  * @since Chrome 66
8375
8360
  */
8376
8361
  export function getDeviceSerialNumber(): Promise<string>;
@@ -8378,7 +8363,6 @@ declare namespace chrome {
8378
8363
  /**
8379
8364
  * Fetches the device's serial number. Please note the purpose of this API is to administrate the device (e.g. generating Certificate Sign Requests for device-wide certificates). This API may not be used for tracking devices without the consent of the device's administrator. If the current user is not affiliated, returns an empty string.
8380
8365
  *
8381
- * @param callback Called with the serial number of the device.
8382
8366
  * @since Chrome 66
8383
8367
  */
8384
8368
  export function getDeviceSerialNumber(
@@ -8392,6 +8376,7 @@ declare namespace chrome {
8392
8376
  * Fetches the administrator-annotated Asset Id. If the current user is not affiliated or no Asset Id has been set by the administrator, returns an empty string.
8393
8377
  *
8394
8378
  * @chrome-returns-extra since Chrome 96
8379
+ * @returns Returns a Promise which resolves with the Asset ID of the device.
8395
8380
  * @since Chrome 66
8396
8381
  */
8397
8382
  export function getDeviceAssetId(): Promise<string>;
@@ -8399,7 +8384,6 @@ declare namespace chrome {
8399
8384
  /**
8400
8385
  * Fetches the administrator-annotated Asset Id. If the current user is not affiliated or no Asset Id has been set by the administrator, returns an empty string.
8401
8386
  *
8402
- * @param callback Called with the Asset ID of the device.
8403
8387
  * @since Chrome 66
8404
8388
  */
8405
8389
  export function getDeviceAssetId(
@@ -8413,6 +8397,7 @@ declare namespace chrome {
8413
8397
  * Fetches the administrator-annotated Location. If the current user is not affiliated or no Annotated Location has been set by the administrator, returns an empty string.
8414
8398
  *
8415
8399
  * @chrome-returns-extra since Chrome 96
8400
+ * @returns Returns a Promise which resolves with the Annotated Location of the device.
8416
8401
  * @since Chrome 66
8417
8402
  */
8418
8403
  export function getDeviceAnnotatedLocation(): Promise<string>;
@@ -8420,7 +8405,6 @@ declare namespace chrome {
8420
8405
  /**
8421
8406
  * Fetches the administrator-annotated Location. If the current user is not affiliated or no Annotated Location has been set by the administrator, returns an empty string.
8422
8407
  *
8423
- * @param callback Called with the Annotated Location of the device.
8424
8408
  * @since Chrome 66
8425
8409
  */
8426
8410
  export function getDeviceAnnotatedLocation(
@@ -8434,6 +8418,7 @@ declare namespace chrome {
8434
8418
  * Fetches the device's hostname as set by DeviceHostnameTemplate policy. If the current user is not affiliated or no hostname has been set by the enterprise policy, returns an empty string.
8435
8419
  *
8436
8420
  * @chrome-returns-extra since Chrome 96
8421
+ * @returns Returns a Promise which resolves with the hostname of the device.
8437
8422
  * @since Chrome 82
8438
8423
  */
8439
8424
  export function getDeviceHostname(): Promise<string>;
@@ -8441,7 +8426,6 @@ declare namespace chrome {
8441
8426
  /**
8442
8427
  * Fetches the device's hostname as set by DeviceHostnameTemplate policy. If the current user is not affiliated or no hostname has been set by the enterprise policy, returns an empty string.
8443
8428
  *
8444
- * @param callback Called with hostname of the device.
8445
8429
  * @since Chrome 82
8446
8430
  */
8447
8431
  export function getDeviceHostname(
@@ -8472,13 +8456,12 @@ declare namespace chrome {
8472
8456
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
8473
8457
  *
8474
8458
  * @chrome-returns-extra since Chrome 96
8459
+ * @returns Returns a Promise which resolves with the hardware platform info.
8475
8460
  */
8476
8461
  export function getHardwarePlatformInfo(): Promise<HardwarePlatformInfo>;
8477
8462
 
8478
8463
  /**
8479
8464
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
8480
- *
8481
- * @param callback Called with the hardware platform info.
8482
8465
  */
8483
8466
  export function getHardwarePlatformInfo(
8484
8467
 
@@ -8510,6 +8493,7 @@ declare namespace chrome {
8510
8493
  * Sets the current input method. This function only changes the current input method to an enabled input method. Input methods can be enabled by enterprise polices. If the input method ID is invalid, or not enabled, {@link runtime.lastError} will be set with a failure reason.
8511
8494
  *
8512
8495
  * @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
8496
+ * @returns Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
8513
8497
  */
8514
8498
  export function setCurrentInputMethod(
8515
8499
 
@@ -8520,7 +8504,6 @@ declare namespace chrome {
8520
8504
  * Sets the current input method. This function only changes the current input method to an enabled input method. Input methods can be enabled by enterprise polices. If the input method ID is invalid, or not enabled, {@link runtime.lastError} will be set with a failure reason.
8521
8505
  *
8522
8506
  * @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
8523
- * @param callback Called when the input method is changed or if there is an error.
8524
8507
  */
8525
8508
  export function setCurrentInputMethod(
8526
8509
 
@@ -8586,13 +8569,12 @@ declare namespace chrome {
8586
8569
  * Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, {@link runtime.lastError} will be set with a failure reason.
8587
8570
  *
8588
8571
  * @chrome-returns-extra since Chrome 96
8572
+ * @returns Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
8589
8573
  */
8590
8574
  export function getNetworkDetails(): Promise<NetworkDetails>;
8591
8575
 
8592
8576
  /**
8593
8577
  * Retrieves the network details of the device's default network. If the user is not affiliated or the device is not connected to a network, {@link runtime.lastError} will be set with a failure reason.
8594
- *
8595
- * @param callback Called with the device's default network's {@link NetworkDetails}.
8596
8578
  */
8597
8579
  export function getNetworkDetails(
8598
8580
 
@@ -8691,13 +8673,12 @@ declare namespace chrome {
8691
8673
  * Returns the available Tokens. In a regular user's session the list will always contain the user's token with `id` `"user"`. If a system-wide TPM token is available, the returned list will also contain the system-wide token with `id` `"system"`. The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
8692
8674
  *
8693
8675
  * @chrome-returns-extra since Chrome 131
8676
+ * @returns Invoked by `getTokens` with the list of available Tokens.
8694
8677
  */
8695
8678
  export function getTokens(): Promise<Token[]>;
8696
8679
 
8697
8680
  /**
8698
8681
  * Returns the available Tokens. In a regular user's session the list will always contain the user's token with `id` `"user"`. If a system-wide TPM token is available, the returned list will also contain the system-wide token with `id` `"system"`. The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
8699
- *
8700
- * @param callback Invoked by `getTokens` with the list of available Tokens.
8701
8682
  */
8702
8683
  export function getTokens(
8703
8684
 
@@ -8714,6 +8695,7 @@ declare namespace chrome {
8714
8695
  *
8715
8696
  * @chrome-returns-extra since Chrome 131
8716
8697
  * @param tokenId The id of a Token returned by `getTokens`.
8698
+ * @returns Returns a Promise which resolves with the list of the available certificates.
8717
8699
  */
8718
8700
  export function getCertificates(
8719
8701
 
@@ -8724,7 +8706,6 @@ declare namespace chrome {
8724
8706
  * Returns the list of all client certificates available from the given token. Can be used to check for the existence and expiration of client certificates that are usable for a certain authentication.
8725
8707
  *
8726
8708
  * @param tokenId The id of a Token returned by `getTokens`.
8727
- * @param callback Called back with the list of the available certificates.
8728
8709
  */
8729
8710
  export function getCertificates(
8730
8711
 
@@ -8744,6 +8725,7 @@ declare namespace chrome {
8744
8725
  * @chrome-returns-extra since Chrome 131
8745
8726
  * @param tokenId The id of a Token returned by `getTokens`.
8746
8727
  * @param certificate The DER encoding of a X.509 certificate.
8728
+ * @returns Returns a Promise which resolves when this operation is finished.
8747
8729
  */
8748
8730
  export function importCertificate(
8749
8731
 
@@ -8757,7 +8739,6 @@ declare namespace chrome {
8757
8739
  *
8758
8740
  * @param tokenId The id of a Token returned by `getTokens`.
8759
8741
  * @param certificate The DER encoding of a X.509 certificate.
8760
- * @param callback Called back when this operation is finished.
8761
8742
  */
8762
8743
  export function importCertificate(
8763
8744
 
@@ -8774,6 +8755,7 @@ declare namespace chrome {
8774
8755
  * @chrome-returns-extra since Chrome 131
8775
8756
  * @param tokenId The id of a Token returned by `getTokens`.
8776
8757
  * @param certificate The DER encoding of a X.509 certificate.
8758
+ * @returns Returns a Promise which resolves when this operation is finished.
8777
8759
  */
8778
8760
  export function removeCertificate(
8779
8761
 
@@ -8787,7 +8769,6 @@ declare namespace chrome {
8787
8769
  *
8788
8770
  * @param tokenId The id of a Token returned by `getTokens`.
8789
8771
  * @param certificate The DER encoding of a X.509 certificate.
8790
- * @param callback Called back when this operation is finished.
8791
8772
  */
8792
8773
  export function removeCertificate(
8793
8774
 
@@ -8807,6 +8788,7 @@ declare namespace chrome {
8807
8788
  *
8808
8789
  * @chrome-returns-extra since Chrome 131
8809
8790
  * @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
8791
+ * @returns Returns a Promise which resolves with the challenge response.
8810
8792
  * @since Chrome 110
8811
8793
  */
8812
8794
  export function challengeKey(
@@ -8822,7 +8804,6 @@ declare namespace chrome {
8822
8804
  * This function is highly restricted and will fail if the current device is not managed, the current user is not managed, or if this operation has not explicitly been enabled for the caller by enterprise device policy. The challenged key does not reside in the `"system"` or `"user"` token and is not accessible by any other API.
8823
8805
  *
8824
8806
  * @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
8825
- * @param callback Called back with the challenge response.
8826
8807
  * @since Chrome 110
8827
8808
  */
8828
8809
  export function challengeKey(
@@ -8843,6 +8824,7 @@ declare namespace chrome {
8843
8824
  * @chrome-returns-extra since Chrome 131
8844
8825
  * @param challenge A challenge as emitted by the Verified Access Web API.
8845
8826
  * @param registerKey If set, the current Enterprise Machine Key is registered with the `"system"` token and relinquishes the Enterprise Machine Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise Machine Key.
8827
+ * @returns Returns a Promise which resolves with the challenge response.
8846
8828
  * @deprecated Use {@link challengeKey} instead.
8847
8829
  * @since Chrome 50
8848
8830
  * @chrome-deprecated-since Chrome 110
@@ -8862,7 +8844,6 @@ declare namespace chrome {
8862
8844
  *
8863
8845
  * @param challenge A challenge as emitted by the Verified Access Web API.
8864
8846
  * @param registerKey If set, the current Enterprise Machine Key is registered with the `"system"` token and relinquishes the Enterprise Machine Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise Machine Key.
8865
- * @param callback Called back with the challenge response.
8866
8847
  * @deprecated Use {@link challengeKey} instead.
8867
8848
  * @since Chrome 50
8868
8849
  * @chrome-deprecated-since Chrome 110
@@ -8890,6 +8871,7 @@ declare namespace chrome {
8890
8871
  * @chrome-returns-extra since Chrome 131
8891
8872
  * @param challenge A challenge as emitted by the Verified Access Web API.
8892
8873
  * @param registerKey If set, the current Enterprise User Key is registered with the `"user"` token and relinquishes the Enterprise User Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise User Key.
8874
+ * @returns Returns a Promise which resolves with the challenge response.
8893
8875
  * @deprecated Use {@link challengeKey} instead.
8894
8876
  * @since Chrome 50
8895
8877
  * @chrome-deprecated-since Chrome 110
@@ -8906,7 +8888,6 @@ declare namespace chrome {
8906
8888
  *
8907
8889
  * @param challenge A challenge as emitted by the Verified Access Web API.
8908
8890
  * @param registerKey If set, the current Enterprise User Key is registered with the `"user"` token and relinquishes the Enterprise User Key role. The key can then be associated with a certificate and used like any other signing key. This key is 2048-bit RSA. Subsequent calls to this function will then generate a new Enterprise User Key.
8909
- * @param callback Called back with the challenge response.
8910
8891
  * @deprecated Use {@link challengeKey} instead.
8911
8892
  * @since Chrome 50
8912
8893
  * @chrome-deprecated-since Chrome 110
@@ -10814,6 +10795,7 @@ declare namespace chrome {
10814
10795
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
10815
10796
  *
10816
10797
  * @chrome-returns-extra since Chrome 96
10798
+ * @returns A generic result callback to indicate success or failure.
10817
10799
  */
10818
10800
  export function mount(
10819
10801
 
@@ -10826,8 +10808,6 @@ declare namespace chrome {
10826
10808
  * Depending on the type of the file system being mounted, the `source` option must be set appropriately.
10827
10809
  *
10828
10810
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
10829
- *
10830
- * @param callback A generic result callback to indicate success or failure.
10831
10811
  */
10832
10812
  export function mount(
10833
10813
 
@@ -10842,6 +10822,7 @@ declare namespace chrome {
10842
10822
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
10843
10823
  *
10844
10824
  * @chrome-returns-extra since Chrome 96
10825
+ * @returns A generic result callback to indicate success or failure.
10845
10826
  */
10846
10827
  export function unmount(
10847
10828
 
@@ -10852,8 +10833,6 @@ declare namespace chrome {
10852
10833
  * Unmounts a file system with the given `fileSystemId`. It must be called after {@link onUnmountRequested} is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
10853
10834
  *
10854
10835
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
10855
- *
10856
- * @param callback A generic result callback to indicate success or failure.
10857
10836
  */
10858
10837
  export function unmount(
10859
10838
 
@@ -10866,13 +10845,12 @@ declare namespace chrome {
10866
10845
  * Returns all file systems mounted by the extension.
10867
10846
  *
10868
10847
  * @chrome-returns-extra since Chrome 96
10848
+ * @returns Callback to receive the result of {@link getAll} function.
10869
10849
  */
10870
10850
  export function getAll(): Promise<FileSystemInfo[]>;
10871
10851
 
10872
10852
  /**
10873
10853
  * Returns all file systems mounted by the extension.
10874
- *
10875
- * @param callback Callback to receive the result of {@link getAll} function.
10876
10854
  */
10877
10855
  export function getAll(
10878
10856
 
@@ -10885,6 +10863,7 @@ declare namespace chrome {
10885
10863
  * Returns information about a file system with the passed `fileSystemId`.
10886
10864
  *
10887
10865
  * @chrome-returns-extra since Chrome 96
10866
+ * @returns Callback to receive the result of {@link get} function.
10888
10867
  */
10889
10868
  export function get(
10890
10869
 
@@ -10893,8 +10872,6 @@ declare namespace chrome {
10893
10872
 
10894
10873
  /**
10895
10874
  * Returns information about a file system with the passed `fileSystemId`.
10896
- *
10897
- * @param callback Callback to receive the result of {@link get} function.
10898
10875
  */
10899
10876
  export function get(
10900
10877
 
@@ -10919,6 +10896,7 @@ declare namespace chrome {
10919
10896
  * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
10920
10897
  *
10921
10898
  * @chrome-returns-extra since Chrome 96
10899
+ * @returns A generic result callback to indicate success or failure.
10922
10900
  * @since Chrome 45
10923
10901
  */
10924
10902
  export function notify(
@@ -10939,7 +10917,6 @@ declare namespace chrome {
10939
10917
  *
10940
10918
  * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
10941
10919
  *
10942
- * @param callback A generic result callback to indicate success or failure.
10943
10920
  * @since Chrome 45
10944
10921
  */
10945
10922
  export function notify(
@@ -11626,6 +11603,7 @@ declare namespace chrome {
11626
11603
  *
11627
11604
  * @chrome-returns-extra since Chrome 116
11628
11605
  * @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
11606
+ * @returns Resolves when registration completes.
11629
11607
  */
11630
11608
  export function register(
11631
11609
 
@@ -11636,7 +11614,6 @@ declare namespace chrome {
11636
11614
  * Registers the application with FCM. The registration ID will be returned by the `callback`. If `register` is called again with the same list of `senderIds`, the same registration ID will be returned.
11637
11615
  *
11638
11616
  * @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
11639
- * @param callback Resolves when registration completes.
11640
11617
  */
11641
11618
  export function register(
11642
11619
 
@@ -11654,13 +11631,12 @@ declare namespace chrome {
11654
11631
  * Unregisters the application from FCM.
11655
11632
  *
11656
11633
  * @chrome-returns-extra since Chrome 116
11634
+ * @returns Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
11657
11635
  */
11658
11636
  export function unregister(): Promise<void>;
11659
11637
 
11660
11638
  /**
11661
11639
  * Unregisters the application from FCM.
11662
- *
11663
- * @param callback Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
11664
11640
  */
11665
11641
  export function unregister(
11666
11642
 
@@ -11672,6 +11648,7 @@ declare namespace chrome {
11672
11648
  *
11673
11649
  * @chrome-returns-extra since Chrome 116
11674
11650
  * @param message A message to send to the other party via FCM.
11651
+ * @returns Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
11675
11652
  */
11676
11653
  export function send(
11677
11654
 
@@ -11703,7 +11680,6 @@ declare namespace chrome {
11703
11680
  * Sends a message according to its contents.
11704
11681
  *
11705
11682
  * @param message A message to send to the other party via FCM.
11706
- * @param callback Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
11707
11683
  */
11708
11684
  export function send(
11709
11685
 
@@ -12364,6 +12340,7 @@ declare namespace chrome {
12364
12340
  *
12365
12341
  * @chrome-returns-extra since Chrome 105
12366
12342
  * @param details Token options.
12343
+ * @returns Returns a Promise which resolves with an OAuth2 access token as specified by the manifest, or rejects if there was an error. The `grantedScopes` parameter is populated since Chrome 87. When available, this parameter contains the list of granted scopes corresponding with the returned token.
12367
12344
  */
12368
12345
  export function getAuthToken(
12369
12346
 
@@ -12380,7 +12357,6 @@ declare namespace chrome {
12380
12357
  * Note: When called with a callback, instead of returning an object this function will return the two properties as separate arguments passed to the callback.
12381
12358
  *
12382
12359
  * @param details Token options.
12383
- * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error. The `grantedScopes` parameter is populated since Chrome 87. When available, this parameter contains the list of granted scopes corresponding with the returned token.
12384
12360
  */
12385
12361
  export function getAuthToken(
12386
12362
 
@@ -12403,6 +12379,7 @@ declare namespace chrome {
12403
12379
  *
12404
12380
  * @chrome-returns-extra since Chrome 106
12405
12381
  * @param details Profile options.
12382
+ * @returns Returns a Promise which resolves with the `ProfileUserInfo` of the primary Chrome account, or an empty `ProfileUserInfo` if the account with given `details` doesn't exist.
12406
12383
  */
12407
12384
  export function getProfileUserInfo(
12408
12385
 
@@ -12420,7 +12397,6 @@ declare namespace chrome {
12420
12397
  * This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile.
12421
12398
  *
12422
12399
  * @param details Profile options.
12423
- * @param callback Called with the `ProfileUserInfo` of the primary Chrome account, of an empty `ProfileUserInfo` if the account with given `details` doesn't exist.
12424
12400
  */
12425
12401
  export function getProfileUserInfo(
12426
12402
 
@@ -12441,6 +12417,7 @@ declare namespace chrome {
12441
12417
  *
12442
12418
  * @chrome-returns-extra since Chrome 106
12443
12419
  * @param details Token information.
12420
+ * @returns Returns a Promise which resolves when the token has been removed from the cache.
12444
12421
  */
12445
12422
  export function removeCachedAuthToken(
12446
12423
 
@@ -12453,7 +12430,6 @@ declare namespace chrome {
12453
12430
  * If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with `getAuthToken`.
12454
12431
  *
12455
12432
  * @param details Token information.
12456
- * @param callback Called when the token has been removed from the cache.
12457
12433
  */
12458
12434
  export function removeCachedAuthToken(
12459
12435
 
@@ -12470,6 +12446,7 @@ declare namespace chrome {
12470
12446
  * * De-authorizes the user from all auth flows
12471
12447
  *
12472
12448
  * @chrome-returns-extra since Chrome 106
12449
+ * @returns Returns a Promise which resolves when the state has been cleared.
12473
12450
  * @since Chrome 87
12474
12451
  */
12475
12452
  export function clearAllCachedAuthTokens(): Promise<void>;
@@ -12481,7 +12458,6 @@ declare namespace chrome {
12481
12458
  * * Removes user's account preferences
12482
12459
  * * De-authorizes the user from all auth flows
12483
12460
  *
12484
- * @param callback Called when the state has been cleared.
12485
12461
  * @since Chrome 87
12486
12462
  */
12487
12463
  export function clearAllCachedAuthTokens(
@@ -12498,6 +12474,7 @@ declare namespace chrome {
12498
12474
  *
12499
12475
  * @chrome-returns-extra since Chrome 106
12500
12476
  * @param details WebAuth flow options.
12477
+ * @returns Returns a Promise which resolves with the URL redirected back to your application.
12501
12478
  */
12502
12479
  export function launchWebAuthFlow(
12503
12480
 
@@ -12512,7 +12489,6 @@ declare namespace chrome {
12512
12489
  * For a good user experience it is important interactive auth flows are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests with no context. In particular, do not launch an interactive auth flow when your app is first launched.
12513
12490
  *
12514
12491
  * @param details WebAuth flow options.
12515
- * @param callback Called with the URL redirected back to your application.
12516
12492
  */
12517
12493
  export function launchWebAuthFlow(
12518
12494
 
@@ -13015,6 +12991,7 @@ declare namespace chrome {
13015
12991
  * Set the current composition. If this extension does not own the active IME, this fails.
13016
12992
  *
13017
12993
  * @chrome-returns-extra since Chrome 111
12994
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
13018
12995
  */
13019
12996
  export function setComposition(
13020
12997
 
@@ -13070,8 +13047,6 @@ declare namespace chrome {
13070
13047
 
13071
13048
  /**
13072
13049
  * Set the current composition. If this extension does not own the active IME, this fails.
13073
- *
13074
- * @param callback Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
13075
13050
  */
13076
13051
  export function setComposition(
13077
13052
 
@@ -13133,6 +13108,7 @@ declare namespace chrome {
13133
13108
  * Clear the current composition. If this extension does not own the active IME, this fails.
13134
13109
  *
13135
13110
  * @chrome-returns-extra since Chrome 111
13111
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
13136
13112
  */
13137
13113
  export function clearComposition(
13138
13114
 
@@ -13147,8 +13123,6 @@ declare namespace chrome {
13147
13123
 
13148
13124
  /**
13149
13125
  * Clear the current composition. If this extension does not own the active IME, this fails.
13150
- *
13151
- * @param callback Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
13152
13126
  */
13153
13127
  export function clearComposition(
13154
13128
 
@@ -13169,6 +13143,7 @@ declare namespace chrome {
13169
13143
  * Commits the provided text to the current input.
13170
13144
  *
13171
13145
  * @chrome-returns-extra since Chrome 111
13146
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
13172
13147
  */
13173
13148
  export function commitText(
13174
13149
 
@@ -13188,8 +13163,6 @@ declare namespace chrome {
13188
13163
 
13189
13164
  /**
13190
13165
  * Commits the provided text to the current input.
13191
- *
13192
- * @param callback Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
13193
13166
  */
13194
13167
  export function commitText(
13195
13168
 
@@ -13215,6 +13188,7 @@ declare namespace chrome {
13215
13188
  * Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
13216
13189
  *
13217
13190
  * @chrome-returns-extra since Chrome 111
13191
+ * @returns Resolves when the operation completes.
13218
13192
  */
13219
13193
  export function sendKeyEvents(
13220
13194
 
@@ -13234,8 +13208,6 @@ declare namespace chrome {
13234
13208
 
13235
13209
  /**
13236
13210
  * Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
13237
- *
13238
- * @param callback Resolves when the operation completes.
13239
13211
  */
13240
13212
  export function sendKeyEvents(
13241
13213
 
@@ -13264,6 +13236,7 @@ declare namespace chrome {
13264
13236
  * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
13265
13237
  *
13266
13238
  * @chrome-returns-extra since Chrome 111
13239
+ * @returns Resolves when the operation completes.
13267
13240
  */
13268
13241
  export function setCandidateWindowProperties(
13269
13242
 
@@ -13330,8 +13303,6 @@ declare namespace chrome {
13330
13303
 
13331
13304
  /**
13332
13305
  * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
13333
- *
13334
- * @param callback Resolves when the operation completes.
13335
13306
  */
13336
13307
  export function setCandidateWindowProperties(
13337
13308
 
@@ -13404,6 +13375,7 @@ declare namespace chrome {
13404
13375
  * Sets the current candidate list. This fails if this extension doesn't own the active IME
13405
13376
  *
13406
13377
  * @chrome-returns-extra since Chrome 111
13378
+ * @returns Resolves when the operation completes.
13407
13379
  */
13408
13380
  export function setCandidates(
13409
13381
 
@@ -13465,8 +13437,6 @@ declare namespace chrome {
13465
13437
 
13466
13438
  /**
13467
13439
  * Sets the current candidate list. This fails if this extension doesn't own the active IME
13468
- *
13469
- * @param callback Resolves when the operation completes.
13470
13440
  */
13471
13441
  export function setCandidates(
13472
13442
 
@@ -13534,6 +13504,7 @@ declare namespace chrome {
13534
13504
  * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
13535
13505
  *
13536
13506
  * @chrome-returns-extra since Chrome 111
13507
+ * @returns Resolves when the operation completes
13537
13508
  */
13538
13509
  export function setCursorPosition(
13539
13510
 
@@ -13553,8 +13524,6 @@ declare namespace chrome {
13553
13524
 
13554
13525
  /**
13555
13526
  * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
13556
- *
13557
- * @param callback Resolves when the operation completes
13558
13527
  */
13559
13528
  export function setCursorPosition(
13560
13529
 
@@ -13580,6 +13549,7 @@ declare namespace chrome {
13580
13549
  * Shows/Hides an assistive window with the given properties.
13581
13550
  *
13582
13551
  * @chrome-returns-extra since Chrome 111
13552
+ * @returns Resolves when the operation completes.
13583
13553
  * @since Chrome 85
13584
13554
  */
13585
13555
  export function setAssistiveWindowProperties(
@@ -13601,7 +13571,6 @@ declare namespace chrome {
13601
13571
  /**
13602
13572
  * Shows/Hides an assistive window with the given properties.
13603
13573
  *
13604
- * @param callback Resolves when the operation completes.
13605
13574
  * @since Chrome 85
13606
13575
  */
13607
13576
  export function setAssistiveWindowProperties(
@@ -13628,6 +13597,7 @@ declare namespace chrome {
13628
13597
  * Highlights/Unhighlights a button in an assistive window.
13629
13598
  *
13630
13599
  * @chrome-returns-extra since Chrome 111
13600
+ * @returns Resolves when the operation completes. On failure, the promise will be rejected.
13631
13601
  * @since Chrome 86
13632
13602
  */
13633
13603
  export function setAssistiveWindowButtonHighlighted(
@@ -13664,7 +13634,6 @@ declare namespace chrome {
13664
13634
  /**
13665
13635
  * Highlights/Unhighlights a button in an assistive window.
13666
13636
  *
13667
- * @param callback Resolves when the operation completes. On failure, the promise will be rejected.
13668
13637
  * @since Chrome 86
13669
13638
  */
13670
13639
  export function setAssistiveWindowButtonHighlighted(
@@ -13724,6 +13693,7 @@ declare namespace chrome {
13724
13693
  * Updates the state of the MenuItems specified
13725
13694
  *
13726
13695
  * @chrome-returns-extra since Chrome 111
13696
+ * @returns Resolves when the operation completes
13727
13697
  */
13728
13698
  export function updateMenuItems(
13729
13699
 
@@ -13732,8 +13702,6 @@ declare namespace chrome {
13732
13702
 
13733
13703
  /**
13734
13704
  * Updates the state of the MenuItems specified
13735
- *
13736
- * @param callback Resolves when the operation completes
13737
13705
  */
13738
13706
  export function updateMenuItems(
13739
13707
 
@@ -13746,6 +13714,7 @@ declare namespace chrome {
13746
13714
  * Deletes the text around the caret.
13747
13715
  *
13748
13716
  * @chrome-returns-extra since Chrome 111
13717
+ * @returns Resolves when the operation completes.
13749
13718
  */
13750
13719
  export function deleteSurroundingText(
13751
13720
 
@@ -13775,8 +13744,6 @@ declare namespace chrome {
13775
13744
 
13776
13745
  /**
13777
13746
  * Deletes the text around the caret.
13778
- *
13779
- * @param callback Resolves when the operation completes.
13780
13747
  */
13781
13748
  export function deleteSurroundingText(
13782
13749
 
@@ -13837,13 +13804,12 @@ declare namespace chrome {
13837
13804
  * Retrieves an identifier for the app instance. The instance ID will be returned by the `callback`. The same ID will be returned as long as the application identity has not been revoked or expired.
13838
13805
  *
13839
13806
  * @chrome-returns-extra since Chrome 96
13807
+ * @returns Resolves when the retrieval completes.
13840
13808
  */
13841
13809
  export function getID(): Promise<string>;
13842
13810
 
13843
13811
  /**
13844
13812
  * Retrieves an identifier for the app instance. The instance ID will be returned by the `callback`. The same ID will be returned as long as the application identity has not been revoked or expired.
13845
- *
13846
- * @param callback Resolves when the retrieval completes.
13847
13813
  */
13848
13814
  export function getID(
13849
13815
 
@@ -13859,13 +13825,12 @@ declare namespace chrome {
13859
13825
  * Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
13860
13826
  *
13861
13827
  * @chrome-returns-extra since Chrome 96
13828
+ * @returns Resolves when the retrieval completes.
13862
13829
  */
13863
13830
  export function getCreationTime(): Promise<number>;
13864
13831
 
13865
13832
  /**
13866
13833
  * Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
13867
- *
13868
- * @param callback Resolves when the retrieval completes.
13869
13834
  */
13870
13835
  export function getCreationTime(
13871
13836
 
@@ -13882,6 +13847,7 @@ declare namespace chrome {
13882
13847
  *
13883
13848
  * @chrome-returns-extra since Chrome 96
13884
13849
  * @param getTokenParams Parameters for getToken.
13850
+ * @returns Resolves when the retrieval completes.
13885
13851
  */
13886
13852
  export function getToken(
13887
13853
 
@@ -13916,7 +13882,6 @@ declare namespace chrome {
13916
13882
  * Return a token that allows the authorized entity to access the service defined by scope.
13917
13883
  *
13918
13884
  * @param getTokenParams Parameters for getToken.
13919
- * @param callback Resolves when the retrieval completes.
13920
13885
  */
13921
13886
  export function getToken(
13922
13887
 
@@ -13959,6 +13924,7 @@ declare namespace chrome {
13959
13924
  *
13960
13925
  * @chrome-returns-extra since Chrome 96
13961
13926
  * @param deleteTokenParams Parameters for deleteToken.
13927
+ * @returns Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
13962
13928
  */
13963
13929
  export function deleteToken(
13964
13930
 
@@ -13984,7 +13950,6 @@ declare namespace chrome {
13984
13950
  * Revokes a granted token.
13985
13951
  *
13986
13952
  * @param deleteTokenParams Parameters for deleteToken.
13987
- * @param callback Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
13988
13953
  */
13989
13954
  export function deleteToken(
13990
13955
 
@@ -14012,13 +13977,12 @@ declare namespace chrome {
14012
13977
  * Resets the app instance identifier and revokes all tokens associated with it.
14013
13978
  *
14014
13979
  * @chrome-returns-extra since Chrome 96
13980
+ * @returns Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
14015
13981
  */
14016
13982
  export function deleteID(): Promise<void>;
14017
13983
 
14018
13984
  /**
14019
13985
  * Resets the app instance identifier and revokes all tokens associated with it.
14020
- *
14021
- * @param callback Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
14022
13986
  */
14023
13987
  export function deleteID(
14024
13988
 
@@ -14961,6 +14925,7 @@ declare namespace chrome {
14961
14925
 
14962
14926
  The `notificationId` parameter is required before Chrome 42.
14963
14927
  * @param options Contents of the notification.
14928
+ * @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
14964
14929
  */
14965
14930
  export function create(
14966
14931
 
@@ -14974,6 +14939,7 @@ declare namespace chrome {
14974
14939
  *
14975
14940
  * @chrome-returns-extra since Chrome 116
14976
14941
  * @param options Contents of the notification.
14942
+ * @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
14977
14943
  */
14978
14944
  export function create(
14979
14945
 
@@ -14989,11 +14955,6 @@ declare namespace chrome {
14989
14955
 
14990
14956
  The `notificationId` parameter is required before Chrome 42.
14991
14957
  * @param options Contents of the notification.
14992
- * @param callback
14993
-
14994
- Returns the notification id (either supplied or generated) that represents the created notification.
14995
-
14996
- The callback is required before Chrome 42.
14997
14958
  */
14998
14959
  export function create(
14999
14960
 
@@ -15010,11 +14971,6 @@ declare namespace chrome {
15010
14971
  * Creates and displays a notification.
15011
14972
  *
15012
14973
  * @param options Contents of the notification.
15013
- * @param callback
15014
-
15015
- Returns the notification id (either supplied or generated) that represents the created notification.
15016
-
15017
- The callback is required before Chrome 42.
15018
14974
  */
15019
14975
  export function create(
15020
14976
 
@@ -15031,6 +14987,7 @@ declare namespace chrome {
15031
14987
  * @chrome-returns-extra since Chrome 116
15032
14988
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
15033
14989
  * @param options Contents of the notification to update to.
14990
+ * @returns Returns a Promise which resolves to indicate whether a matching notification existed.
15034
14991
  */
15035
14992
  export function update(
15036
14993
 
@@ -15044,11 +15001,6 @@ declare namespace chrome {
15044
15001
  *
15045
15002
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
15046
15003
  * @param options Contents of the notification to update to.
15047
- * @param callback
15048
-
15049
- Called to indicate whether a matching notification existed.
15050
-
15051
- The callback is required before Chrome 42.
15052
15004
  */
15053
15005
  export function update(
15054
15006
 
@@ -15066,6 +15018,7 @@ declare namespace chrome {
15066
15018
  *
15067
15019
  * @chrome-returns-extra since Chrome 116
15068
15020
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
15021
+ * @returns Returns a Promise which resolves to indicate whether a matching notification existed.
15069
15022
  */
15070
15023
  export function clear(
15071
15024
 
@@ -15076,11 +15029,6 @@ declare namespace chrome {
15076
15029
  * Clears the specified notification.
15077
15030
  *
15078
15031
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
15079
- * @param callback
15080
-
15081
- Called to indicate whether a matching notification existed.
15082
-
15083
- The callback is required before Chrome 42.
15084
15032
  */
15085
15033
  export function clear(
15086
15034
 
@@ -15095,13 +15043,12 @@ declare namespace chrome {
15095
15043
  * Retrieves all the notifications of this app or extension.
15096
15044
  *
15097
15045
  * @chrome-returns-extra since Chrome 116
15046
+ * @returns Returns a Promise which resolves with the set of notification\_ids currently in the system.
15098
15047
  */
15099
15048
  export function getAll(): Promise<{[name: string]: any}>;
15100
15049
 
15101
15050
  /**
15102
15051
  * Retrieves all the notifications of this app or extension.
15103
- *
15104
- * @param callback Returns the set of notification\_ids currently in the system.
15105
15052
  */
15106
15053
  export function getAll(
15107
15054
 
@@ -15114,13 +15061,12 @@ declare namespace chrome {
15114
15061
  * Retrieves whether the user has enabled notifications from this app or extension.
15115
15062
  *
15116
15063
  * @chrome-returns-extra since Chrome 116
15064
+ * @returns Returns a Promise which resolves with the current permission level.
15117
15065
  */
15118
15066
  export function getPermissionLevel(): Promise<PermissionLevel>;
15119
15067
 
15120
15068
  /**
15121
15069
  * Retrieves whether the user has enabled notifications from this app or extension.
15122
- *
15123
- * @param callback Returns the current permission level.
15124
15070
  */
15125
15071
  export function getPermissionLevel(
15126
15072
 
@@ -15201,6 +15147,7 @@ declare namespace chrome {
15201
15147
  * Creates a new offscreen document for the extension.
15202
15148
  *
15203
15149
  * @param parameters The parameters describing the offscreen document to create.
15150
+ * @returns Promise that resolves when the offscreen document is created and has completed its initial page load.
15204
15151
  */
15205
15152
  export function createDocument(
15206
15153
 
@@ -15211,7 +15158,6 @@ declare namespace chrome {
15211
15158
  * Creates a new offscreen document for the extension.
15212
15159
  *
15213
15160
  * @param parameters The parameters describing the offscreen document to create.
15214
- * @param callback Invoked when the offscreen document is created and has completed its initial page load.
15215
15161
  */
15216
15162
  export function createDocument(
15217
15163
 
@@ -15222,13 +15168,13 @@ declare namespace chrome {
15222
15168
 
15223
15169
  /**
15224
15170
  * Closes the currently-open offscreen document for the extension.
15171
+ *
15172
+ * @returns Promise that resolves when the offscreen document has been closed.
15225
15173
  */
15226
15174
  export function closeDocument(): Promise<void>;
15227
15175
 
15228
15176
  /**
15229
15177
  * Closes the currently-open offscreen document for the extension.
15230
- *
15231
- * @param callback Invoked when the offscreen document has been closed.
15232
15178
  */
15233
15179
  export function closeDocument(
15234
15180
 
@@ -15369,6 +15315,7 @@ declare namespace chrome {
15369
15315
  * Saves the content of the tab with given id as MHTML.
15370
15316
  *
15371
15317
  * @chrome-returns-extra since Chrome 116
15318
+ * @returns Resolves when the MHTML has been generated.
15372
15319
  */
15373
15320
  export function saveAsMHTML(
15374
15321
 
@@ -15383,8 +15330,6 @@ declare namespace chrome {
15383
15330
 
15384
15331
  /**
15385
15332
  * Saves the content of the tab with given id as MHTML.
15386
- *
15387
- * @param callback Resolves when the MHTML has been generated.
15388
15333
  */
15389
15334
  export function saveAsMHTML(
15390
15335
 
@@ -16762,6 +16707,7 @@ declare namespace chrome {
16762
16707
  * Returns the ID of the renderer process for the specified tab.
16763
16708
  *
16764
16709
  * @param tabId The ID of the tab for which the renderer process ID is to be returned.
16710
+ * @returns A callback to return the ID of the renderer process of a tab.
16765
16711
  */
16766
16712
  export function getProcessIdForTab(
16767
16713
 
@@ -16772,7 +16718,6 @@ declare namespace chrome {
16772
16718
  * Returns the ID of the renderer process for the specified tab.
16773
16719
  *
16774
16720
  * @param tabId The ID of the tab for which the renderer process ID is to be returned.
16775
- * @param callback A callback to return the ID of the renderer process of a tab.
16776
16721
  */
16777
16722
  export function getProcessIdForTab(
16778
16723
 
@@ -16790,6 +16735,7 @@ declare namespace chrome {
16790
16735
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
16791
16736
  *
16792
16737
  * @param processId The ID of the process to be terminated.
16738
+ * @returns A callback to report the status of the termination.
16793
16739
  */
16794
16740
  export function terminate(
16795
16741
 
@@ -16800,7 +16746,6 @@ declare namespace chrome {
16800
16746
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
16801
16747
  *
16802
16748
  * @param processId The ID of the process to be terminated.
16803
- * @param callback A callback to report the status of the termination.
16804
16749
  */
16805
16750
  export function terminate(
16806
16751
 
@@ -16819,6 +16764,7 @@ declare namespace chrome {
16819
16764
  *
16820
16765
  * @param processIds The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested.
16821
16766
  * @param includeMemory True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.
16767
+ * @returns A callback called when the processes information is collected.
16822
16768
  */
16823
16769
  export function getProcessInfo(
16824
16770
 
@@ -16832,7 +16778,6 @@ declare namespace chrome {
16832
16778
  *
16833
16779
  * @param processIds The list of process IDs or single process ID for which to return the process information. An empty list indicates all processes are requested.
16834
16780
  * @param includeMemory True if detailed memory usage is required. Note, collecting memory usage information incurs extra CPU usage and should only be queried for when needed.
16835
- * @param callback A callback called when the processes information is collected.
16836
16781
  */
16837
16782
  export function getProcessInfo(
16838
16783
 
@@ -17148,6 +17093,7 @@ declare namespace chrome {
17148
17093
  * Adds an entry to the reading list if it does not exist.
17149
17094
  *
17150
17095
  * @param entry The entry to add to the reading list.
17096
+ * @returns Resolves once the entry has been added.
17151
17097
  */
17152
17098
  export function addEntry(
17153
17099
 
@@ -17158,7 +17104,6 @@ declare namespace chrome {
17158
17104
  * Adds an entry to the reading list if it does not exist.
17159
17105
  *
17160
17106
  * @param entry The entry to add to the reading list.
17161
- * @param callback Invoked once the entry has been added.
17162
17107
  */
17163
17108
  export function addEntry(
17164
17109
 
@@ -17171,6 +17116,7 @@ declare namespace chrome {
17171
17116
  * Removes an entry from the reading list if it exists.
17172
17117
  *
17173
17118
  * @param info The entry to remove from the reading list.
17119
+ * @returns Resolves once the entry has been removed.
17174
17120
  */
17175
17121
  export function removeEntry(
17176
17122
 
@@ -17181,7 +17127,6 @@ declare namespace chrome {
17181
17127
  * Removes an entry from the reading list if it exists.
17182
17128
  *
17183
17129
  * @param info The entry to remove from the reading list.
17184
- * @param callback Invoked once the entry has been removed.
17185
17130
  */
17186
17131
  export function removeEntry(
17187
17132
 
@@ -17194,6 +17139,7 @@ declare namespace chrome {
17194
17139
  * Updates a reading list entry if it exists.
17195
17140
  *
17196
17141
  * @param info The entry to update.
17142
+ * @returns Resolves once the matched entries have been updated.
17197
17143
  */
17198
17144
  export function updateEntry(
17199
17145
 
@@ -17204,7 +17150,6 @@ declare namespace chrome {
17204
17150
  * Updates a reading list entry if it exists.
17205
17151
  *
17206
17152
  * @param info The entry to update.
17207
- * @param callback Invoked once the matched entries have been updated.
17208
17153
  */
17209
17154
  export function updateEntry(
17210
17155
 
@@ -17217,6 +17162,7 @@ declare namespace chrome {
17217
17162
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
17218
17163
  *
17219
17164
  * @param info The properties to search for.
17165
+ * @returns Resolves once the entries have been matched.
17220
17166
  */
17221
17167
  export function query(
17222
17168
 
@@ -17227,7 +17173,6 @@ declare namespace chrome {
17227
17173
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
17228
17174
  *
17229
17175
  * @param info The properties to search for.
17230
- * @param callback Invoked once the entries have been matched.
17231
17176
  */
17232
17177
  export function query(
17233
17178
 
@@ -17770,6 +17715,7 @@ declare namespace chrome {
17770
17715
  *
17771
17716
  * @chrome-returns-extra since Chrome 99
17772
17717
  * @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
17718
+ * @returns Promise that resolves when the uninstall URL is set. If the given URL is invalid, the promise will be rejected.
17773
17719
  */
17774
17720
  export function setUninstallURL(
17775
17721
 
@@ -17780,7 +17726,6 @@ declare namespace chrome {
17780
17726
  * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 1023 characters.
17781
17727
  *
17782
17728
  * @param url URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
17783
- * @param callback Called when the uninstall URL is set. If the given URL is invalid, {@link runtime.lastError} will be set.
17784
17729
  */
17785
17730
  export function setUninstallURL(
17786
17731
 
@@ -17864,6 +17809,7 @@ declare namespace chrome {
17864
17809
  *
17865
17810
  * @chrome-returns-extra since Chrome 99
17866
17811
  * @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
17812
+ * @returns Promise that resolves when a restart request was successfully rescheduled.
17867
17813
  * @since Chrome 53
17868
17814
  */
17869
17815
  export function restartAfterDelay(
@@ -17875,7 +17821,6 @@ declare namespace chrome {
17875
17821
  * Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will be delayed. If called with a value of -1, the reboot will be cancelled. It's a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the first extension to invoke this API.
17876
17822
  *
17877
17823
  * @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
17878
- * @param callback A callback to be invoked when a restart request was successfully rescheduled.
17879
17824
  * @since Chrome 53
17880
17825
  */
17881
17826
  export function restartAfterDelay(
@@ -17927,6 +17872,7 @@ declare namespace chrome {
17927
17872
  * @chrome-returns-extra since Chrome 99
17928
17873
  * @param extensionId The ID of the extension to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
17929
17874
  * @param message The message to send. This message should be a JSON-ifiable object.
17875
+ * @returns Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
17930
17876
  */
17931
17877
  export function sendMessage(
17932
17878
 
@@ -17948,6 +17894,7 @@ declare namespace chrome {
17948
17894
  *
17949
17895
  * @chrome-returns-extra since Chrome 99
17950
17896
  * @param message The message to send. This message should be a JSON-ifiable object.
17897
+ * @returns Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
17951
17898
  */
17952
17899
  export function sendMessage(
17953
17900
 
@@ -17967,7 +17914,6 @@ declare namespace chrome {
17967
17914
  *
17968
17915
  * @param extensionId The ID of the extension to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for [web messaging](https://developer.chrome.com/docs/extensions/manifest/externally_connectable).
17969
17916
  * @param message The message to send. This message should be a JSON-ifiable object.
17970
- * @param callback Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
17971
17917
  */
17972
17918
  export function sendMessage(
17973
17919
 
@@ -17996,7 +17942,6 @@ declare namespace chrome {
17996
17942
  * Sends a single message to event listeners within your extension or a different extension/app. Similar to {@link runtime.connect} but only sends a single message, with an optional response. If sending to your extension, the {@link runtime.onMessage} event will be fired in every frame of your extension (except for the sender's frame), or {@link runtime.onMessageExternal}, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use {@link tabs.sendMessage}.
17997
17943
  *
17998
17944
  * @param message The message to send. This message should be a JSON-ifiable object.
17999
- * @param callback Promise support was added for extension contexts in Chrome 99. When communicating from a web page to an extension, promises are available from Chrome 118.
18000
17945
  */
18001
17946
  export function sendMessage(
18002
17947
 
@@ -18060,13 +18005,12 @@ declare namespace chrome {
18060
18005
  * Returns information about the current platform.
18061
18006
  *
18062
18007
  * @chrome-returns-extra since Chrome 99
18008
+ * @returns Promise that resolves with information about the current platform.
18063
18009
  */
18064
18010
  export function getPlatformInfo(): Promise<PlatformInfo>;
18065
18011
 
18066
18012
  /**
18067
18013
  * Returns information about the current platform.
18068
- *
18069
- * @param callback Called with results
18070
18014
  */
18071
18015
  export function getPlatformInfo(
18072
18016
 
@@ -18099,6 +18043,7 @@ declare namespace chrome {
18099
18043
  * Fetches information about active contexts associated with this extension
18100
18044
  *
18101
18045
  * @param filter A filter to find matching contexts. A context matches if it matches all specified fields in the filter. Any unspecified field in the filter matches all contexts.
18046
+ * @returns Promise that resolves with the matching contexts, if any.
18102
18047
  * @since Chrome 116
18103
18048
  * @chrome-min-manifest MV3
18104
18049
  */
@@ -18111,7 +18056,6 @@ declare namespace chrome {
18111
18056
  * Fetches information about active contexts associated with this extension
18112
18057
  *
18113
18058
  * @param filter A filter to find matching contexts. A context matches if it matches all specified fields in the filter. Any unspecified field in the filter matches all contexts.
18114
- * @param callback Invoked with the matching contexts, if any.
18115
18059
  * @since Chrome 116
18116
18060
  * @chrome-min-manifest MV3
18117
18061
  */
@@ -18338,6 +18282,7 @@ declare namespace chrome {
18338
18282
  *
18339
18283
  * @chrome-returns-extra since Chrome 90
18340
18284
  * @param injection The details of the script which to inject.
18285
+ * @returns Returns a Promise which resolves upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
18341
18286
  */
18342
18287
  export function executeScript(
18343
18288
 
@@ -18348,7 +18293,6 @@ declare namespace chrome {
18348
18293
  * Injects a script into a target context. By default, the script will be run at `document_idle`, or immediately if the page has already loaded. If the `injectImmediately` property is set, the script will inject without waiting, even if the page has not finished loading. If the script evaluates to a promise, the browser will wait for the promise to settle and return the resulting value.
18349
18294
  *
18350
18295
  * @param injection The details of the script which to inject.
18351
- * @param callback Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
18352
18296
  */
18353
18297
  export function executeScript(
18354
18298
 
@@ -18364,6 +18308,7 @@ declare namespace chrome {
18364
18308
  *
18365
18309
  * @chrome-returns-extra since Chrome 90
18366
18310
  * @param injection The details of the styles to insert.
18311
+ * @returns Returns a Promise which resolves upon completion of the insertion.
18367
18312
  */
18368
18313
  export function insertCSS(
18369
18314
 
@@ -18374,7 +18319,6 @@ declare namespace chrome {
18374
18319
  * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
18375
18320
  *
18376
18321
  * @param injection The details of the styles to insert.
18377
- * @param callback Invoked upon completion of the insertion.
18378
18322
  */
18379
18323
  export function insertCSS(
18380
18324
 
@@ -18387,6 +18331,7 @@ declare namespace chrome {
18387
18331
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
18388
18332
  *
18389
18333
  * @param injection The details of the styles to remove. Note that the `css`, `files`, and `origin` properties must exactly match the stylesheet inserted through {@link insertCSS}. Attempting to remove a non-existent stylesheet is a no-op.
18334
+ * @returns Returns a Promise which resolves upon the completion of the removal.
18390
18335
  * @since Chrome 90
18391
18336
  */
18392
18337
  export function removeCSS(
@@ -18398,7 +18343,6 @@ declare namespace chrome {
18398
18343
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
18399
18344
  *
18400
18345
  * @param injection The details of the styles to remove. Note that the `css`, `files`, and `origin` properties must exactly match the stylesheet inserted through {@link insertCSS}. Attempting to remove a non-existent stylesheet is a no-op.
18401
- * @param callback A callback to be invoked upon the completion of the removal.
18402
18346
  * @since Chrome 90
18403
18347
  */
18404
18348
  export function removeCSS(
@@ -18412,6 +18356,7 @@ declare namespace chrome {
18412
18356
  * Registers one or more content scripts for this extension.
18413
18357
  *
18414
18358
  * @param scripts Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered.
18359
+ * @returns Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
18415
18360
  * @since Chrome 96
18416
18361
  */
18417
18362
  export function registerContentScripts(
@@ -18423,7 +18368,6 @@ declare namespace chrome {
18423
18368
  * Registers one or more content scripts for this extension.
18424
18369
  *
18425
18370
  * @param scripts Contains a list of scripts to be registered. If there are errors during script parsing/file validation, or if the IDs specified already exist, then no scripts are registered.
18426
- * @param callback A callback to be invoked once scripts have been fully registered or if an error has occurred.
18427
18371
  * @since Chrome 96
18428
18372
  */
18429
18373
  export function registerContentScripts(
@@ -18463,6 +18407,7 @@ declare namespace chrome {
18463
18407
  * Unregisters content scripts for this extension.
18464
18408
  *
18465
18409
  * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
18410
+ * @returns Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
18466
18411
  * @since Chrome 96
18467
18412
  */
18468
18413
  export function unregisterContentScripts(
@@ -18474,7 +18419,6 @@ declare namespace chrome {
18474
18419
  * Unregisters content scripts for this extension.
18475
18420
  *
18476
18421
  * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
18477
- * @param callback A callback to be invoked once scripts have been unregistered or if an error has occurred.
18478
18422
  * @since Chrome 96
18479
18423
  */
18480
18424
  export function unregisterContentScripts(
@@ -18488,6 +18432,7 @@ declare namespace chrome {
18488
18432
  * Updates one or more content scripts for this extension.
18489
18433
  *
18490
18434
  * @param scripts Contains a list of scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
18435
+ * @returns Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
18491
18436
  * @since Chrome 96
18492
18437
  */
18493
18438
  export function updateContentScripts(
@@ -18499,7 +18444,6 @@ declare namespace chrome {
18499
18444
  * Updates one or more content scripts for this extension.
18500
18445
  *
18501
18446
  * @param scripts Contains a list of scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
18502
- * @param callback A callback to be invoked once scripts have been updated or if an error has occurred.
18503
18447
  * @since Chrome 96
18504
18448
  */
18505
18449
  export function updateContentScripts(
@@ -18894,6 +18838,7 @@ declare namespace chrome {
18894
18838
  * Configures the side panel.
18895
18839
  *
18896
18840
  * @param options The configuration options to apply to the panel.
18841
+ * @returns Returns a Promise which resolves when the options have been set.
18897
18842
  */
18898
18843
  export function setOptions(
18899
18844
 
@@ -18904,7 +18849,6 @@ declare namespace chrome {
18904
18849
  * Configures the side panel.
18905
18850
  *
18906
18851
  * @param options The configuration options to apply to the panel.
18907
- * @param callback Invoked when the options have been set.
18908
18852
  */
18909
18853
  export function setOptions(
18910
18854
 
@@ -18917,6 +18861,7 @@ declare namespace chrome {
18917
18861
  * Returns the active panel configuration.
18918
18862
  *
18919
18863
  * @param options Specifies the context to return the configuration for.
18864
+ * @returns Returns a Promise which resolves with the active panel configuration.
18920
18865
  */
18921
18866
  export function getOptions(
18922
18867
 
@@ -18927,7 +18872,6 @@ declare namespace chrome {
18927
18872
  * Returns the active panel configuration.
18928
18873
  *
18929
18874
  * @param options Specifies the context to return the configuration for.
18930
- * @param callback Called with the active panel configuration.
18931
18875
  */
18932
18876
  export function getOptions(
18933
18877
 
@@ -18942,6 +18886,7 @@ declare namespace chrome {
18942
18886
  * Configures the extension's side panel behavior. This is an upsert operation.
18943
18887
  *
18944
18888
  * @param behavior The new behavior to be set.
18889
+ * @returns Returns a Promise which resolves when the new behavior has been set.
18945
18890
  */
18946
18891
  export function setPanelBehavior(
18947
18892
 
@@ -18952,7 +18897,6 @@ declare namespace chrome {
18952
18897
  * Configures the extension's side panel behavior. This is an upsert operation.
18953
18898
  *
18954
18899
  * @param behavior The new behavior to be set.
18955
- * @param callback Called when the new behavior has been set.
18956
18900
  */
18957
18901
  export function setPanelBehavior(
18958
18902
 
@@ -18963,13 +18907,13 @@ declare namespace chrome {
18963
18907
 
18964
18908
  /**
18965
18909
  * Returns the extension's current side panel behavior.
18910
+ *
18911
+ * @returns Returns a Promise which resolves with the extension's side panel behavior.
18966
18912
  */
18967
18913
  export function getPanelBehavior(): Promise<PanelBehavior>;
18968
18914
 
18969
18915
  /**
18970
18916
  * Returns the extension's current side panel behavior.
18971
- *
18972
- * @param callback Called with the extension's side panel behavior.
18973
18917
  */
18974
18918
  export function getPanelBehavior(
18975
18919
 
@@ -18982,6 +18926,7 @@ declare namespace chrome {
18982
18926
  * Opens the side panel for the extension. This may only be called in response to a user action.
18983
18927
  *
18984
18928
  * @param options Specifies the context in which to open the side panel.
18929
+ * @returns Returns a Promise which resolves when the side panel has been opened.
18985
18930
  * @since Chrome 116
18986
18931
  */
18987
18932
  export function open(
@@ -18993,7 +18938,6 @@ declare namespace chrome {
18993
18938
  * Opens the side panel for the extension. This may only be called in response to a user action.
18994
18939
  *
18995
18940
  * @param options Specifies the context in which to open the side panel.
18996
- * @param callback Called when the side panel has been opened.
18997
18941
  * @since Chrome 116
18998
18942
  */
18999
18943
  export function open(
@@ -19006,6 +18950,7 @@ declare namespace chrome {
19006
18950
  /**
19007
18951
  * Returns the side panel's current layout.
19008
18952
  *
18953
+ * @returns Returns a Promise which resolves with a {@link PanelLayout}.
19009
18954
  * @since Chrome 140
19010
18955
  */
19011
18956
  export function getLayout(): Promise<PanelLayout>;
@@ -19013,7 +18958,6 @@ declare namespace chrome {
19013
18958
  /**
19014
18959
  * Returns the side panel's current layout.
19015
18960
  *
19016
- * @param callback Called with a {@link PanelLayout} containing the side value.
19017
18961
  * @since Chrome 140
19018
18962
  */
19019
18963
  export function getLayout(
@@ -19195,6 +19139,7 @@ declare namespace chrome {
19195
19139
  * Creates a TCP socket.
19196
19140
  *
19197
19141
  * @param properties The socket properties (optional).
19142
+ * @returns Called when the socket has been created.
19198
19143
  */
19199
19144
  export function create(
19200
19145
 
@@ -19205,7 +19150,6 @@ declare namespace chrome {
19205
19150
  * Creates a TCP socket.
19206
19151
  *
19207
19152
  * @param properties The socket properties (optional).
19208
- * @param callback Called when the socket has been created.
19209
19153
  */
19210
19154
  export function create(
19211
19155
 
@@ -19224,6 +19168,7 @@ declare namespace chrome {
19224
19168
  *
19225
19169
  * @param socketId The socket identifier.
19226
19170
  * @param properties The properties to update.
19171
+ * @returns Called when the properties are updated.
19227
19172
  */
19228
19173
  export function update(
19229
19174
 
@@ -19237,7 +19182,6 @@ declare namespace chrome {
19237
19182
  *
19238
19183
  * @param socketId The socket identifier.
19239
19184
  * @param properties The properties to update.
19240
- * @param callback Called when the properties are updated.
19241
19185
  */
19242
19186
  export function update(
19243
19187
 
@@ -19250,6 +19194,8 @@ declare namespace chrome {
19250
19194
 
19251
19195
  /**
19252
19196
  * Enables or disables the application from receiving messages from its peer. The default value is "false". Pausing a socket is typically used by an application to throttle data sent by its peer. When a socket is paused, no `onReceive` event is raised. When a socket is connected and un-paused, `onReceive` events are raised again when messages are received.
19197
+ *
19198
+ * @returns Callback from the `setPaused` method.
19253
19199
  */
19254
19200
  export function setPaused(
19255
19201
 
@@ -19260,8 +19206,6 @@ declare namespace chrome {
19260
19206
 
19261
19207
  /**
19262
19208
  * Enables or disables the application from receiving messages from its peer. The default value is "false". Pausing a socket is typically used by an application to throttle data sent by its peer. When a socket is paused, no `onReceive` event is raised. When a socket is connected and un-paused, `onReceive` events are raised again when messages are received.
19263
- *
19264
- * @param callback Callback from the `setPaused` method.
19265
19209
  */
19266
19210
  export function setPaused(
19267
19211
 
@@ -19393,6 +19337,7 @@ declare namespace chrome {
19393
19337
  * Disconnects the socket.
19394
19338
  *
19395
19339
  * @param socketId The socket identifier.
19340
+ * @returns Called when the disconnect attempt is complete.
19396
19341
  */
19397
19342
  export function disconnect(
19398
19343
 
@@ -19403,7 +19348,6 @@ declare namespace chrome {
19403
19348
  * Disconnects the socket.
19404
19349
  *
19405
19350
  * @param socketId The socket identifier.
19406
- * @param callback Called when the disconnect attempt is complete.
19407
19351
  */
19408
19352
  export function disconnect(
19409
19353
 
@@ -19470,6 +19414,7 @@ declare namespace chrome {
19470
19414
  * Closes the socket and releases the address/port the socket is bound to. Each socket created should be closed after use. The socket id is no no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
19471
19415
  *
19472
19416
  * @param socketId The socket identifier.
19417
+ * @returns Called when the `close` operation completes.
19473
19418
  */
19474
19419
  export function close(
19475
19420
 
@@ -19480,7 +19425,6 @@ declare namespace chrome {
19480
19425
  * Closes the socket and releases the address/port the socket is bound to. Each socket created should be closed after use. The socket id is no no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
19481
19426
  *
19482
19427
  * @param socketId The socket identifier.
19483
- * @param callback Called when the `close` operation completes.
19484
19428
  */
19485
19429
  export function close(
19486
19430
 
@@ -19493,6 +19437,7 @@ declare namespace chrome {
19493
19437
  * Retrieves the state of the given socket.
19494
19438
  *
19495
19439
  * @param socketId The socket identifier.
19440
+ * @returns Called when the socket state is available.
19496
19441
  */
19497
19442
  export function getInfo(
19498
19443
 
@@ -19503,7 +19448,6 @@ declare namespace chrome {
19503
19448
  * Retrieves the state of the given socket.
19504
19449
  *
19505
19450
  * @param socketId The socket identifier.
19506
- * @param callback Called when the socket state is available.
19507
19451
  */
19508
19452
  export function getInfo(
19509
19453
 
@@ -19519,13 +19463,13 @@ declare namespace chrome {
19519
19463
 
19520
19464
  /**
19521
19465
  * Retrieves the list of currently opened sockets owned by the application.
19466
+ *
19467
+ * @returns Called when the list of sockets is available.
19522
19468
  */
19523
19469
  export function getSockets(): Promise<SocketInfo[]>;
19524
19470
 
19525
19471
  /**
19526
19472
  * Retrieves the list of currently opened sockets owned by the application.
19527
- *
19528
- * @param callback Called when the list of sockets is available.
19529
19473
  */
19530
19474
  export function getSockets(
19531
19475
 
@@ -19649,6 +19593,7 @@ declare namespace chrome {
19649
19593
  * Creates a TCP server socket.
19650
19594
  *
19651
19595
  * @param properties The socket properties (optional).
19596
+ * @returns Called when the socket has been created.
19652
19597
  */
19653
19598
  export function create(
19654
19599
 
@@ -19659,7 +19604,6 @@ declare namespace chrome {
19659
19604
  * Creates a TCP server socket.
19660
19605
  *
19661
19606
  * @param properties The socket properties (optional).
19662
- * @param callback Called when the socket has been created.
19663
19607
  */
19664
19608
  export function create(
19665
19609
 
@@ -19678,6 +19622,7 @@ declare namespace chrome {
19678
19622
  *
19679
19623
  * @param socketId The socket identifier.
19680
19624
  * @param properties The properties to update.
19625
+ * @returns Called when the properties are updated.
19681
19626
  */
19682
19627
  export function update(
19683
19628
 
@@ -19691,7 +19636,6 @@ declare namespace chrome {
19691
19636
  *
19692
19637
  * @param socketId The socket identifier.
19693
19638
  * @param properties The properties to update.
19694
- * @param callback Called when the properties are updated.
19695
19639
  */
19696
19640
  export function update(
19697
19641
 
@@ -19704,6 +19648,8 @@ declare namespace chrome {
19704
19648
 
19705
19649
  /**
19706
19650
  * Enables or disables a listening socket from accepting new connections. When paused, a listening socket accepts new connections until its backlog (see `listen` function) is full then refuses additional connection requests. `onAccept` events are raised only when the socket is un-paused.
19651
+ *
19652
+ * @returns Callback from the `setPaused` method.
19707
19653
  */
19708
19654
  export function setPaused(
19709
19655
 
@@ -19714,8 +19660,6 @@ declare namespace chrome {
19714
19660
 
19715
19661
  /**
19716
19662
  * Enables or disables a listening socket from accepting new connections. When paused, a listening socket accepts new connections until its backlog (see `listen` function) is full then refuses additional connection requests. `onAccept` events are raised only when the socket is un-paused.
19717
- *
19718
- * @param callback Callback from the `setPaused` method.
19719
19663
  */
19720
19664
  export function setPaused(
19721
19665
 
@@ -19781,6 +19725,7 @@ declare namespace chrome {
19781
19725
  * Disconnects the listening socket, i.e. stops accepting new connections and releases the address/port the socket is bound to. The socket identifier remains valid, e.g. it can be used with `listen` to accept connections on a new port and address.
19782
19726
  *
19783
19727
  * @param socketId The socket identifier.
19728
+ * @returns Called when the disconnect attempt is complete.
19784
19729
  */
19785
19730
  export function disconnect(
19786
19731
 
@@ -19791,7 +19736,6 @@ declare namespace chrome {
19791
19736
  * Disconnects the listening socket, i.e. stops accepting new connections and releases the address/port the socket is bound to. The socket identifier remains valid, e.g. it can be used with `listen` to accept connections on a new port and address.
19792
19737
  *
19793
19738
  * @param socketId The socket identifier.
19794
- * @param callback Called when the disconnect attempt is complete.
19795
19739
  */
19796
19740
  export function disconnect(
19797
19741
 
@@ -19804,6 +19748,7 @@ declare namespace chrome {
19804
19748
  * Disconnects and destroys the socket. Each socket created should be closed after use. The socket id is no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
19805
19749
  *
19806
19750
  * @param socketId The socket identifier.
19751
+ * @returns Called when the `close` operation completes.
19807
19752
  */
19808
19753
  export function close(
19809
19754
 
@@ -19814,7 +19759,6 @@ declare namespace chrome {
19814
19759
  * Disconnects and destroys the socket. Each socket created should be closed after use. The socket id is no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
19815
19760
  *
19816
19761
  * @param socketId The socket identifier.
19817
- * @param callback Called when the `close` operation completes.
19818
19762
  */
19819
19763
  export function close(
19820
19764
 
@@ -19827,6 +19771,7 @@ declare namespace chrome {
19827
19771
  * Retrieves the state of the given socket.
19828
19772
  *
19829
19773
  * @param socketId The socket identifier.
19774
+ * @returns Called when the socket state is available.
19830
19775
  */
19831
19776
  export function getInfo(
19832
19777
 
@@ -19837,7 +19782,6 @@ declare namespace chrome {
19837
19782
  * Retrieves the state of the given socket.
19838
19783
  *
19839
19784
  * @param socketId The socket identifier.
19840
- * @param callback Called when the socket state is available.
19841
19785
  */
19842
19786
  export function getInfo(
19843
19787
 
@@ -19853,13 +19797,13 @@ declare namespace chrome {
19853
19797
 
19854
19798
  /**
19855
19799
  * Retrieves the list of currently opened sockets owned by the application.
19800
+ *
19801
+ * @returns Called when the list of sockets is available.
19856
19802
  */
19857
19803
  export function getSockets(): Promise<SocketInfo[]>;
19858
19804
 
19859
19805
  /**
19860
19806
  * Retrieves the list of currently opened sockets owned by the application.
19861
- *
19862
- * @param callback Called when the list of sockets is available.
19863
19807
  */
19864
19808
  export function getSockets(
19865
19809
 
@@ -20021,6 +19965,7 @@ declare namespace chrome {
20021
19965
  * Creates a UDP socket with the given properties.
20022
19966
  *
20023
19967
  * @param properties The socket properties (optional).
19968
+ * @returns Called when the socket has been created.
20024
19969
  */
20025
19970
  export function create(
20026
19971
 
@@ -20031,7 +19976,6 @@ declare namespace chrome {
20031
19976
  * Creates a UDP socket with the given properties.
20032
19977
  *
20033
19978
  * @param properties The socket properties (optional).
20034
- * @param callback Called when the socket has been created.
20035
19979
  */
20036
19980
  export function create(
20037
19981
 
@@ -20050,6 +19994,7 @@ declare namespace chrome {
20050
19994
  *
20051
19995
  * @param socketId The socket ID.
20052
19996
  * @param properties The properties to update.
19997
+ * @returns Called when the properties are updated.
20053
19998
  */
20054
19999
  export function update(
20055
20000
 
@@ -20063,7 +20008,6 @@ declare namespace chrome {
20063
20008
  *
20064
20009
  * @param socketId The socket ID.
20065
20010
  * @param properties The properties to update.
20066
- * @param callback Called when the properties are updated.
20067
20011
  */
20068
20012
  export function update(
20069
20013
 
@@ -20078,6 +20022,7 @@ declare namespace chrome {
20078
20022
  * Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
20079
20023
  *
20080
20024
  * @param paused Flag to indicate whether to pause or unpause.
20025
+ * @returns Called when the socket has been successfully paused or unpaused.
20081
20026
  */
20082
20027
  export function setPaused(
20083
20028
 
@@ -20090,7 +20035,6 @@ declare namespace chrome {
20090
20035
  * Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
20091
20036
  *
20092
20037
  * @param paused Flag to indicate whether to pause or unpause.
20093
- * @param callback Called when the socket has been successfully paused or unpaused.
20094
20038
  */
20095
20039
  export function setPaused(
20096
20040
 
@@ -20188,6 +20132,7 @@ declare namespace chrome {
20188
20132
  * Closes the socket and releases the address/port the socket is bound to. Each socket created should be closed after use. The socket id is no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
20189
20133
  *
20190
20134
  * @param socketId The socket ID.
20135
+ * @returns Called when the `close` operation completes.
20191
20136
  */
20192
20137
  export function close(
20193
20138
 
@@ -20198,7 +20143,6 @@ declare namespace chrome {
20198
20143
  * Closes the socket and releases the address/port the socket is bound to. Each socket created should be closed after use. The socket id is no longer valid as soon at the function is called. However, the socket is guaranteed to be closed only when the callback is invoked.
20199
20144
  *
20200
20145
  * @param socketId The socket ID.
20201
- * @param callback Called when the `close` operation completes.
20202
20146
  */
20203
20147
  export function close(
20204
20148
 
@@ -20211,6 +20155,7 @@ declare namespace chrome {
20211
20155
  * Retrieves the state of the given socket.
20212
20156
  *
20213
20157
  * @param socketId The socket ID.
20158
+ * @returns Called when the socket state is available.
20214
20159
  */
20215
20160
  export function getInfo(
20216
20161
 
@@ -20221,7 +20166,6 @@ declare namespace chrome {
20221
20166
  * Retrieves the state of the given socket.
20222
20167
  *
20223
20168
  * @param socketId The socket ID.
20224
- * @param callback Called when the socket state is available.
20225
20169
  */
20226
20170
  export function getInfo(
20227
20171
 
@@ -20237,13 +20181,13 @@ declare namespace chrome {
20237
20181
 
20238
20182
  /**
20239
20183
  * Retrieves the list of currently opened sockets owned by the application.
20184
+ *
20185
+ * @returns Called when the list of sockets is available.
20240
20186
  */
20241
20187
  export function getSockets(): Promise<SocketInfo[]>;
20242
20188
 
20243
20189
  /**
20244
20190
  * Retrieves the list of currently opened sockets owned by the application.
20245
- *
20246
- * @param callback Called when the list of sockets is available.
20247
20191
  */
20248
20192
  export function getSockets(
20249
20193
 
@@ -20351,6 +20295,7 @@ declare namespace chrome {
20351
20295
  * Gets the multicast group addresses the socket is currently joined to.
20352
20296
  *
20353
20297
  * @param socketId The socket ID.
20298
+ * @returns Called with an array of strings of the result.
20354
20299
  */
20355
20300
  export function getJoinedGroups(
20356
20301
 
@@ -20361,7 +20306,6 @@ declare namespace chrome {
20361
20306
  * Gets the multicast group addresses the socket is currently joined to.
20362
20307
  *
20363
20308
  * @param socketId The socket ID.
20364
- * @param callback Called with an array of strings of the result.
20365
20309
  */
20366
20310
  export function getJoinedGroups(
20367
20311
 
@@ -20442,6 +20386,7 @@ declare namespace chrome {
20442
20386
  *
20443
20387
  * @chrome-returns-extra since Chrome 95
20444
20388
  * @param keys A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in `null` to get the entire contents of storage.
20389
+ * @returns Promise that resolves with storage items, or rejects on failure.
20445
20390
  */
20446
20391
  get(
20447
20392
 
@@ -20452,7 +20397,6 @@ declare namespace chrome {
20452
20397
  * Gets one or more items from storage.
20453
20398
  *
20454
20399
  * @param keys A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in `null` to get the entire contents of storage.
20455
- * @param callback Callback with storage items, or on failure (in which case {@link runtime.lastError} will be set).
20456
20400
  */
20457
20401
  get(
20458
20402
 
@@ -20469,6 +20413,7 @@ declare namespace chrome {
20469
20413
  /**
20470
20414
  * Gets all keys from storage.
20471
20415
  *
20416
+ * @returns Promise that resolves with storage keys, or rejects on failure.
20472
20417
  * @since Chrome 130
20473
20418
  */
20474
20419
  getKeys(): Promise<string[]>;
@@ -20476,7 +20421,6 @@ declare namespace chrome {
20476
20421
  /**
20477
20422
  * Gets all keys from storage.
20478
20423
  *
20479
- * @param callback Callback with storage keys, or on failure (in which case {@link runtime.lastError} will be set).
20480
20424
  * @since Chrome 130
20481
20425
  */
20482
20426
  getKeys(
@@ -20494,6 +20438,7 @@ declare namespace chrome {
20494
20438
  *
20495
20439
  * @chrome-returns-extra since Chrome 95
20496
20440
  * @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
20441
+ * @returns Promise that resolves with the amount of space being used by storage, or rejects on failure.
20497
20442
  */
20498
20443
  getBytesInUse(
20499
20444
 
@@ -20504,7 +20449,6 @@ declare namespace chrome {
20504
20449
  * Gets the amount of space (in bytes) being used by one or more items.
20505
20450
  *
20506
20451
  * @param keys A single key or list of keys to get the total usage for. An empty list will return 0. Pass in `null` to get the total usage of all of storage.
20507
- * @param callback Callback with the amount of space being used by storage, or on failure (in which case {@link runtime.lastError} will be set).
20508
20452
  */
20509
20453
  getBytesInUse(
20510
20454
 
@@ -20527,6 +20471,7 @@ declare namespace chrome {
20527
20471
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
20528
20472
 
20529
20473
  Primitive values such as numbers will serialize as expected. Values with a `typeof` `"object"` and `"function"` will typically serialize to `{}`, with the exception of `Array` (serializes as expected), `Date`, and `Regex` (serialize using their `String` representation).
20474
+ * @returns Promise that resolves on success, or rejects on failure.
20530
20475
  */
20531
20476
  set(
20532
20477
 
@@ -20541,7 +20486,6 @@ declare namespace chrome {
20541
20486
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
20542
20487
 
20543
20488
  Primitive values such as numbers will serialize as expected. Values with a `typeof` `"object"` and `"function"` will typically serialize to `{}`, with the exception of `Array` (serializes as expected), `Date`, and `Regex` (serialize using their `String` representation).
20544
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20545
20489
  */
20546
20490
  set(
20547
20491
 
@@ -20555,6 +20499,7 @@ declare namespace chrome {
20555
20499
  *
20556
20500
  * @chrome-returns-extra since Chrome 95
20557
20501
  * @param keys A single key or a list of keys for items to remove.
20502
+ * @returns Promise that resolves on success, or rejects on failure.
20558
20503
  */
20559
20504
  remove(
20560
20505
 
@@ -20565,7 +20510,6 @@ declare namespace chrome {
20565
20510
  * Removes one or more items from storage.
20566
20511
  *
20567
20512
  * @param keys A single key or a list of keys for items to remove.
20568
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20569
20513
  */
20570
20514
  remove(
20571
20515
 
@@ -20578,13 +20522,12 @@ declare namespace chrome {
20578
20522
  * Removes all items from storage.
20579
20523
  *
20580
20524
  * @chrome-returns-extra since Chrome 95
20525
+ * @returns Promise that resolves on success, or rejects on failure.
20581
20526
  */
20582
20527
  clear(): Promise<void>;
20583
20528
 
20584
20529
  /**
20585
20530
  * Removes all items from storage.
20586
- *
20587
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20588
20531
  */
20589
20532
  clear(
20590
20533
 
@@ -20594,6 +20537,7 @@ declare namespace chrome {
20594
20537
  /**
20595
20538
  * Sets the desired access level for the storage area. By default, `session` storage is restricted to trusted contexts (extension pages and service workers), while `managed`, `local`, and `sync` storage allow access from both trusted and untrusted contexts.
20596
20539
  *
20540
+ * @returns Promise that resolves on success, or rejects on failure.
20597
20541
  * @since Chrome 102
20598
20542
  */
20599
20543
  setAccessLevel(
@@ -20610,7 +20554,6 @@ declare namespace chrome {
20610
20554
  /**
20611
20555
  * Sets the desired access level for the storage area. By default, `session` storage is restricted to trusted contexts (extension pages and service workers), while `managed`, `local`, and `sync` storage allow access from both trusted and untrusted contexts.
20612
20556
  *
20613
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20614
20557
  * @since Chrome 102
20615
20558
  */
20616
20559
  setAccessLevel(
@@ -21261,6 +21204,7 @@ declare namespace chrome {
21261
21204
  *
21262
21205
  * @chrome-returns-extra since Chrome 91
21263
21206
  * @param flags Options affecting how the information is returned.
21207
+ * @returns Promise that resolves with the results.
21264
21208
  */
21265
21209
  export function getInfo(
21266
21210
 
@@ -21274,7 +21218,6 @@ declare namespace chrome {
21274
21218
  * Requests the information for all attached display devices.
21275
21219
  *
21276
21220
  * @param flags Options affecting how the information is returned.
21277
- * @param callback The callback to invoke with the results.
21278
21221
  */
21279
21222
  export function getInfo(
21280
21223
 
@@ -21292,6 +21235,7 @@ declare namespace chrome {
21292
21235
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21293
21236
  *
21294
21237
  * @chrome-returns-extra since Chrome 91
21238
+ * @returns Promise that resolves with the results.
21295
21239
  * @since Chrome 53
21296
21240
  */
21297
21241
  export function getDisplayLayout(): Promise<DisplayLayout[]>;
@@ -21299,7 +21243,6 @@ declare namespace chrome {
21299
21243
  /**
21300
21244
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21301
21245
  *
21302
- * @param callback The callback to invoke with the results.
21303
21246
  * @since Chrome 53
21304
21247
  */
21305
21248
  export function getDisplayLayout(
@@ -21315,6 +21258,7 @@ declare namespace chrome {
21315
21258
  * @chrome-returns-extra since Chrome 91
21316
21259
  * @param id The display's unique identifier.
21317
21260
  * @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`.
21261
+ * @returns Promise that resolves when the function finishes.
21318
21262
  */
21319
21263
  export function setDisplayProperties(
21320
21264
 
@@ -21328,7 +21272,6 @@ declare namespace chrome {
21328
21272
  *
21329
21273
  * @param id The display's unique identifier.
21330
21274
  * @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`.
21331
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
21332
21275
  */
21333
21276
  export function setDisplayProperties(
21334
21277
 
@@ -21344,6 +21287,7 @@ declare namespace chrome {
21344
21287
  *
21345
21288
  * @chrome-returns-extra since Chrome 91
21346
21289
  * @param layouts The layout information, required for all displays except the primary display.
21290
+ * @returns Promise that resolves when the function finishes.
21347
21291
  * @since Chrome 53
21348
21292
  */
21349
21293
  export function setDisplayLayout(
@@ -21355,7 +21299,6 @@ declare namespace chrome {
21355
21299
  * Set the layout for all displays. Any display not included will use the default layout. If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout. After layout is resolved, an onDisplayChanged event will be triggered. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21356
21300
  *
21357
21301
  * @param layouts The layout information, required for all displays except the primary display.
21358
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
21359
21302
  * @since Chrome 53
21360
21303
  */
21361
21304
  export function setDisplayLayout(
@@ -21428,6 +21371,7 @@ declare namespace chrome {
21428
21371
  *
21429
21372
  * @chrome-returns-extra since Chrome 91
21430
21373
  * @param id The display's unique identifier.
21374
+ * @returns Promise that resolves to inform the caller that the touch calibration has ended. The boolean value informs if the calibration was a success or not.
21431
21375
  * @since Chrome 57
21432
21376
  */
21433
21377
  export function showNativeTouchCalibration(
@@ -21439,7 +21383,6 @@ declare namespace chrome {
21439
21383
  * Displays the native touch calibration UX for the display with `id` as display id. This will show an overlay on the screen with required instructions on how to proceed. The callback will be invoked in case of successful calibration only. If the calibration fails, this will throw an error.
21440
21384
  *
21441
21385
  * @param id The display's unique identifier.
21442
- * @param callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not.
21443
21386
  * @since Chrome 57
21444
21387
  */
21445
21388
  export function showNativeTouchCalibration(
@@ -21492,6 +21435,7 @@ declare namespace chrome {
21492
21435
  *
21493
21436
  * @chrome-returns-extra since Chrome 91
21494
21437
  * @param info The information of the mirror mode that should be applied to the display mode.
21438
+ * @returns Promise that resolves when the function finishes.
21495
21439
  * @since Chrome 65
21496
21440
  */
21497
21441
  export function setMirrorMode(
@@ -21503,7 +21447,6 @@ declare namespace chrome {
21503
21447
  * Sets the display mode to the specified mirror mode. Each call resets the state from previous calls. Calling setDisplayProperties() will fail for the mirroring destination displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21504
21448
  *
21505
21449
  * @param info The information of the mirror mode that should be applied to the display mode.
21506
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
21507
21450
  * @since Chrome 65
21508
21451
  */
21509
21452
  export function setMirrorMode(
@@ -21581,13 +21524,13 @@ declare namespace chrome {
21581
21524
 
21582
21525
  /**
21583
21526
  * Retrieves information about local adapters on this system.
21527
+ *
21528
+ * @returns Called when local adapter information is available.
21584
21529
  */
21585
21530
  export function getNetworkInterfaces(): Promise<NetworkInterface[]>;
21586
21531
 
21587
21532
  /**
21588
21533
  * Retrieves information about local adapters on this system.
21589
- *
21590
- * @param callback Called when local adapter information is available.
21591
21534
  */
21592
21535
  export function getNetworkInterfaces(
21593
21536
 
@@ -21761,6 +21704,7 @@ declare namespace chrome {
21761
21704
  * Adds a new log record.
21762
21705
  *
21763
21706
  * @param options The logging options.
21707
+ * @returns Returns a Promise which resolves once the log has been added.
21764
21708
  */
21765
21709
  export function add(
21766
21710
 
@@ -21771,7 +21715,6 @@ declare namespace chrome {
21771
21715
  * Adds a new log record.
21772
21716
  *
21773
21717
  * @param options The logging options.
21774
- * @param callback A callback to invoke once the log has been added.
21775
21718
  */
21776
21719
  export function add(
21777
21720
 
@@ -21869,13 +21812,12 @@ declare namespace chrome {
21869
21812
  * Returns a list of tabs that have requested capture or are being captured, i.e. status != stopped and status != error. This allows extensions to inform the user that there is an existing tab capture that would prevent a new tab capture from succeeding (or to prevent redundant requests for the same tab).
21870
21813
  *
21871
21814
  * @chrome-returns-extra since Chrome 116
21815
+ * @returns Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
21872
21816
  */
21873
21817
  export function getCapturedTabs(): Promise<CaptureInfo[]>;
21874
21818
 
21875
21819
  /**
21876
21820
  * Returns a list of tabs that have requested capture or are being captured, i.e. status != stopped and status != error. This allows extensions to inform the user that there is an existing tab capture that would prevent a new tab capture from succeeding (or to prevent redundant requests for the same tab).
21877
- *
21878
- * @param callback Callback invoked with CaptureInfo\[\] for captured tabs.
21879
21821
  */
21880
21822
  export function getCapturedTabs(
21881
21823
 
@@ -21888,6 +21830,7 @@ declare namespace chrome {
21888
21830
  * Creates a stream ID to capture the target tab. Similar to chrome.tabCapture.capture() method, but returns a media stream ID, instead of a media stream, to the consumer tab.
21889
21831
  *
21890
21832
  * @chrome-returns-extra since Chrome 116
21833
+ * @returns Returns a Promise which resolves with the result. If successful, the result is an opaque string that can be passed to the `getUserMedia()` API to generate a media stream that corresponds to the target tab. The created `streamId` can only be used once and expires after a few seconds if it is not used.
21891
21834
  * @since Chrome 71
21892
21835
  */
21893
21836
  export function getMediaStreamId(
@@ -21898,7 +21841,6 @@ declare namespace chrome {
21898
21841
  /**
21899
21842
  * Creates a stream ID to capture the target tab. Similar to chrome.tabCapture.capture() method, but returns a media stream ID, instead of a media stream, to the consumer tab.
21900
21843
  *
21901
- * @param callback Callback to invoke with the result. If successful, the result is an opaque string that can be passed to the `getUserMedia()` API to generate a media stream that corresponds to the target tab. The created `streamId` can only be used once and expires after a few seconds if it is not used.
21902
21844
  * @since Chrome 71
21903
21845
  */
21904
21846
  export function getMediaStreamId(
@@ -23757,6 +23699,7 @@ declare namespace chrome {
23757
23699
  * @chrome-returns-extra since Chrome 88
23758
23700
  * @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
23759
23701
  * @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
23702
+ * @returns Resolves after the zoom factor has been changed.
23760
23703
  */
23761
23704
  export function setZoom(
23762
23705
 
@@ -23770,6 +23713,7 @@ declare namespace chrome {
23770
23713
  *
23771
23714
  * @chrome-returns-extra since Chrome 88
23772
23715
  * @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
23716
+ * @returns Resolves after the zoom factor has been changed.
23773
23717
  */
23774
23718
  export function setZoom(
23775
23719
 
@@ -23781,7 +23725,6 @@ declare namespace chrome {
23781
23725
  *
23782
23726
  * @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
23783
23727
  * @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
23784
- * @param callback Resolves after the zoom factor has been changed.
23785
23728
  */
23786
23729
  export function setZoom(
23787
23730
 
@@ -23796,7 +23739,6 @@ declare namespace chrome {
23796
23739
  * Zooms a specified tab.
23797
23740
  *
23798
23741
  * @param zoomFactor The new zoom factor. A value of `0` sets the tab to its current default zoom factor. Values greater than `0` specify a (possibly non-default) zoom factor for the tab.
23799
- * @param callback Resolves after the zoom factor has been changed.
23800
23742
  */
23801
23743
  export function setZoom(
23802
23744
 
@@ -23810,6 +23752,7 @@ declare namespace chrome {
23810
23752
  *
23811
23753
  * @chrome-returns-extra since Chrome 88
23812
23754
  * @param tabId The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
23755
+ * @returns Resolves with the tab's current zoom factor after it has been fetched.
23813
23756
  */
23814
23757
  export function getZoom(
23815
23758
 
@@ -23820,7 +23763,6 @@ declare namespace chrome {
23820
23763
  * Gets the current zoom factor of a specified tab.
23821
23764
  *
23822
23765
  * @param tabId The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
23823
- * @param callback Resolves with the tab's current zoom factor after it has been fetched.
23824
23766
  */
23825
23767
  export function getZoom(
23826
23768
 
@@ -23840,6 +23782,7 @@ declare namespace chrome {
23840
23782
  * @chrome-returns-extra since Chrome 88
23841
23783
  * @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
23842
23784
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23785
+ * @returns Resolves after the zoom settings are changed.
23843
23786
  */
23844
23787
  export function setZoomSettings(
23845
23788
 
@@ -23853,6 +23796,7 @@ declare namespace chrome {
23853
23796
  *
23854
23797
  * @chrome-returns-extra since Chrome 88
23855
23798
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23799
+ * @returns Resolves after the zoom settings are changed.
23856
23800
  */
23857
23801
  export function setZoomSettings(
23858
23802
 
@@ -23864,7 +23808,6 @@ declare namespace chrome {
23864
23808
  *
23865
23809
  * @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
23866
23810
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23867
- * @param callback Resolves after the zoom settings are changed.
23868
23811
  */
23869
23812
  export function setZoomSettings(
23870
23813
 
@@ -23879,7 +23822,6 @@ declare namespace chrome {
23879
23822
  * Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
23880
23823
  *
23881
23824
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23882
- * @param callback Resolves after the zoom settings are changed.
23883
23825
  */
23884
23826
  export function setZoomSettings(
23885
23827
 
@@ -23893,6 +23835,7 @@ declare namespace chrome {
23893
23835
  *
23894
23836
  * @chrome-returns-extra since Chrome 88
23895
23837
  * @param tabId The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
23838
+ * @returns Resolves with the tab's current zoom settings.
23896
23839
  */
23897
23840
  export function getZoomSettings(
23898
23841
 
@@ -23903,7 +23846,6 @@ declare namespace chrome {
23903
23846
  * Gets the current zoom settings of a specified tab.
23904
23847
  *
23905
23848
  * @param tabId The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
23906
- * @param callback Resolves with the tab's current zoom settings.
23907
23849
  */
23908
23850
  export function getZoomSettings(
23909
23851
 
@@ -23922,6 +23864,7 @@ declare namespace chrome {
23922
23864
  *
23923
23865
  * @chrome-returns-extra since Chrome 88
23924
23866
  * @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist.
23867
+ * @returns Resolves after the operation is completed.
23925
23868
  * @since Chrome 54
23926
23869
  */
23927
23870
  export function discard(
@@ -23933,7 +23876,6 @@ declare namespace chrome {
23933
23876
  * Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
23934
23877
  *
23935
23878
  * @param tabId The ID of the tab to be discarded. If specified, the tab is discarded unless it is active or already discarded. If omitted, the browser discards the least important tab. This can fail if no discardable tabs exist.
23936
- * @param callback Resolves after the operation is completed.
23937
23879
  * @since Chrome 54
23938
23880
  */
23939
23881
  export function discard(
@@ -24209,6 +24151,7 @@ declare namespace chrome {
24209
24151
  * @chrome-returns-extra since Chrome 101
24210
24152
  * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
24211
24153
  * @param options The speech options.
24154
+ * @returns Resolves right away, before speech finishes. If an error occurs, the promise will be rejected. Use options.onEvent to get more detailed feedback.
24212
24155
  */
24213
24156
  export function speak(
24214
24157
 
@@ -24222,7 +24165,6 @@ declare namespace chrome {
24222
24165
  *
24223
24166
  * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
24224
24167
  * @param options The speech options.
24225
- * @param callback Resolves right away, before speech finishes. If an error occurs, the promise will be rejected. Use options.onEvent to get more detailed feedback.
24226
24168
  */
24227
24169
  export function speak(
24228
24170
 
@@ -24697,6 +24639,7 @@ declare namespace chrome {
24697
24639
  *
24698
24640
  * @chrome-returns-extra since Chrome 96
24699
24641
  * @param details Which setting to change.
24642
+ * @returns Called at the completion of the set operation.
24700
24643
  */
24701
24644
  set(
24702
24645
 
@@ -24719,7 +24662,6 @@ declare namespace chrome {
24719
24662
  * Sets the value of a setting.
24720
24663
  *
24721
24664
  * @param details Which setting to change.
24722
- * @param callback Called at the completion of the set operation.
24723
24665
  */
24724
24666
  set(
24725
24667
 
@@ -24745,6 +24687,7 @@ declare namespace chrome {
24745
24687
  *
24746
24688
  * @chrome-returns-extra since Chrome 96
24747
24689
  * @param details Which setting to clear.
24690
+ * @returns Called at the completion of the clear operation.
24748
24691
  */
24749
24692
  clear(
24750
24693
 
@@ -24761,7 +24704,6 @@ declare namespace chrome {
24761
24704
  * Clears the setting, restoring any default value.
24762
24705
  *
24763
24706
  * @param details Which setting to clear.
24764
- * @param callback Called at the completion of the clear operation.
24765
24707
  */
24766
24708
  clear(
24767
24709
 
@@ -24978,6 +24920,7 @@ declare namespace chrome {
24978
24920
  * Registers one or more user scripts for this extension.
24979
24921
  *
24980
24922
  * @param scripts Contains a list of user scripts to be registered.
24923
+ * @returns Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
24981
24924
  */
24982
24925
  export function register(
24983
24926
 
@@ -24988,7 +24931,6 @@ declare namespace chrome {
24988
24931
  * Registers one or more user scripts for this extension.
24989
24932
  *
24990
24933
  * @param scripts Contains a list of user scripts to be registered.
24991
- * @param callback Called once scripts have been fully registered or if an error has ocurred.
24992
24934
  */
24993
24935
  export function register(
24994
24936
 
@@ -25001,6 +24943,7 @@ declare namespace chrome {
25001
24943
  * Returns all dynamically-registered user scripts for this extension.
25002
24944
  *
25003
24945
  * @param filter If specified, this method returns only the user scripts that match it.
24946
+ * @returns Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
25004
24947
  */
25005
24948
  export function getScripts(
25006
24949
 
@@ -25011,7 +24954,6 @@ declare namespace chrome {
25011
24954
  * Returns all dynamically-registered user scripts for this extension.
25012
24955
  *
25013
24956
  * @param filter If specified, this method returns only the user scripts that match it.
25014
- * @param callback Called once scripts have been fully registered or if an error occurs.
25015
24957
  */
25016
24958
  export function getScripts(
25017
24959
 
@@ -25026,6 +24968,7 @@ declare namespace chrome {
25026
24968
  * Unregisters all dynamically-registered user scripts for this extension.
25027
24969
  *
25028
24970
  * @param filter If specified, this method unregisters only the user scripts that match it.
24971
+ * @returns Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
25029
24972
  */
25030
24973
  export function unregister(
25031
24974
 
@@ -25036,7 +24979,6 @@ declare namespace chrome {
25036
24979
  * Unregisters all dynamically-registered user scripts for this extension.
25037
24980
  *
25038
24981
  * @param filter If specified, this method unregisters only the user scripts that match it.
25039
- * @param callback Called once scripts have been fully unregistered or if an error ocurs
25040
24982
  */
25041
24983
  export function unregister(
25042
24984
 
@@ -25049,6 +24991,7 @@ declare namespace chrome {
25049
24991
  * Updates one or more user scripts for this extension.
25050
24992
  *
25051
24993
  * @param scripts Contains a list of user scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
24994
+ * @returns Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
25052
24995
  */
25053
24996
  export function update(
25054
24997
 
@@ -25059,7 +25002,6 @@ declare namespace chrome {
25059
25002
  * Updates one or more user scripts for this extension.
25060
25003
  *
25061
25004
  * @param scripts Contains a list of user scripts to be updated. A property is only updated for the existing script if it is specified in this object. If there are errors during script parsing/file validation, or if the IDs specified do not correspond to a fully registered script, then no scripts are updated.
25062
- * @param callback Called once scripts have been fully updated or if an error occurs.
25063
25005
  */
25064
25006
  export function update(
25065
25007
 
@@ -25096,6 +25038,7 @@ declare namespace chrome {
25096
25038
  * Configures the `` `USER_SCRIPT` `` execution environment.
25097
25039
  *
25098
25040
  * @param properties Contains the user script world configuration.
25041
+ * @returns Promise that resolves once the world has been configured.
25099
25042
  */
25100
25043
  export function configureWorld(
25101
25044
 
@@ -25106,7 +25049,6 @@ declare namespace chrome {
25106
25049
  * Configures the `` `USER_SCRIPT` `` execution environment.
25107
25050
  *
25108
25051
  * @param properties Contains the user script world configuration.
25109
- * @param callback Called once world hase been configured.
25110
25052
  */
25111
25053
  export function configureWorld(
25112
25054
 
@@ -25118,6 +25060,7 @@ declare namespace chrome {
25118
25060
  /**
25119
25061
  * Retrieves all registered world configurations.
25120
25062
  *
25063
+ * @returns Promise that resolves with the registered world configurations.
25121
25064
  * @since Chrome 133
25122
25065
  */
25123
25066
  export function getWorldConfigurations(): Promise<WorldProperties[]>;
@@ -25125,7 +25068,6 @@ declare namespace chrome {
25125
25068
  /**
25126
25069
  * Retrieves all registered world configurations.
25127
25070
  *
25128
- * @param callback Called with the registered world configurations.
25129
25071
  * @since Chrome 133
25130
25072
  */
25131
25073
  export function getWorldConfigurations(
@@ -25139,6 +25081,7 @@ declare namespace chrome {
25139
25081
  * Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration.
25140
25082
  *
25141
25083
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
25084
+ * @returns Promise that resolves when the configuration is reset.
25142
25085
  * @since Chrome 133
25143
25086
  */
25144
25087
  export function resetWorldConfiguration(
@@ -25150,7 +25093,6 @@ declare namespace chrome {
25150
25093
  * Resets the configuration for a user script world. Any scripts that inject into the world with the specified ID will use the default world configuration.
25151
25094
  *
25152
25095
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
25153
- * @param callback Called when the configuration is reset.
25154
25096
  * @since Chrome 133
25155
25097
  */
25156
25098
  export function resetWorldConfiguration(
@@ -25294,6 +25236,7 @@ declare namespace chrome {
25294
25236
  *
25295
25237
  * @chrome-returns-extra since Chrome 96
25296
25238
  * @param name The name of the VPN configuration.
25239
+ * @returns Returns a Promise which resolves when the configuration is created or rejects if there is an error.
25297
25240
  */
25298
25241
  export function createConfig(
25299
25242
 
@@ -25304,7 +25247,6 @@ declare namespace chrome {
25304
25247
  * Creates a new VPN configuration that persists across multiple login sessions of the user.
25305
25248
  *
25306
25249
  * @param name The name of the VPN configuration.
25307
- * @param callback Called when the configuration is created or if there is an error.
25308
25250
  */
25309
25251
  export function createConfig(
25310
25252
 
@@ -25323,6 +25265,7 @@ declare namespace chrome {
25323
25265
  *
25324
25266
  * @chrome-returns-extra since Chrome 96
25325
25267
  * @param id ID of the VPN configuration to destroy.
25268
+ * @returns Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
25326
25269
  */
25327
25270
  export function destroyConfig(
25328
25271
 
@@ -25333,7 +25276,6 @@ declare namespace chrome {
25333
25276
  * Destroys a VPN configuration created by the extension.
25334
25277
  *
25335
25278
  * @param id ID of the VPN configuration to destroy.
25336
- * @param callback Called when the configuration is destroyed or if there is an error.
25337
25279
  */
25338
25280
  export function destroyConfig(
25339
25281
 
@@ -25347,6 +25289,7 @@ declare namespace chrome {
25347
25289
  *
25348
25290
  * @chrome-returns-extra since Chrome 96
25349
25291
  * @param parameters The parameters for the VPN session.
25292
+ * @returns Returns a Promise which resolves when the parameters are set or rejects if there is an error.
25350
25293
  */
25351
25294
  export function setParameters(
25352
25295
 
@@ -25357,7 +25300,6 @@ declare namespace chrome {
25357
25300
  * Sets the parameters for the VPN session. This should be called immediately after `"connected"` is received from the platform. This will succeed only when the VPN session is owned by the extension.
25358
25301
  *
25359
25302
  * @param parameters The parameters for the VPN session.
25360
- * @param callback Called when the parameters are set or if there is an error.
25361
25303
  */
25362
25304
  export function setParameters(
25363
25305
 
@@ -25371,6 +25313,7 @@ declare namespace chrome {
25371
25313
  *
25372
25314
  * @chrome-returns-extra since Chrome 96
25373
25315
  * @param data The IP packet to be sent to the platform.
25316
+ * @returns Returns a Promise which resolves when the packet is sent or rejects if there is an error.
25374
25317
  */
25375
25318
  export function sendPacket(
25376
25319
 
@@ -25381,7 +25324,6 @@ declare namespace chrome {
25381
25324
  * Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.
25382
25325
  *
25383
25326
  * @param data The IP packet to be sent to the platform.
25384
- * @param callback Called when the packet is sent or if there is an error.
25385
25327
  */
25386
25328
  export function sendPacket(
25387
25329
 
@@ -25395,6 +25337,7 @@ declare namespace chrome {
25395
25337
  *
25396
25338
  * @chrome-returns-extra since Chrome 96
25397
25339
  * @param state The VPN session state of the VPN client.
25340
+ * @returns Returns a Promise which resolves when the notification is complete or rejects if there is an error.
25398
25341
  */
25399
25342
  export function notifyConnectionStateChanged(
25400
25343
 
@@ -25405,7 +25348,6 @@ declare namespace chrome {
25405
25348
  * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
25406
25349
  *
25407
25350
  * @param state The VPN session state of the VPN client.
25408
- * @param callback Called when the notification is complete or if there is an error.
25409
25351
  */
25410
25352
  export function notifyConnectionStateChanged(
25411
25353