chrome-types 0.1.405 → 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 -357
  2. package/index.d.ts +205 -247
  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 Tue Jan 06 2026 22:34:25 GMT+0000 (Coordinated Universal Time)
18
- // Built at 6e48d4846be29f4a9aaed3eb462a776dde83c792
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 Promise that resolves 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 Promise that resolves 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 Promise that resolves with a boolean indicating 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 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).
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 Returns a Promise which resolves when the request to close the PIN dialog is complete.
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 Returns a Promise which resolves 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 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.
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 Promise that resolves with the set of dynamic rules. The Promise may be rejected 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 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.
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 Promise that resolves 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 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.
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 Promise that resolves 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 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.
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 Promise that resolves 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 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.
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 Promise that resolves 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 Promise that resolves 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 Promise that resolves 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 Returns a Promise which resolves with the scan results.
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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves with 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves with the device identifier of the directory API.
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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves with the 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 Returns a Promise which resolves 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 Returns a Promise which resolves when the input method is changed, or rejects 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 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.
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 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.
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 Returns a Promise which resolves 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 Returns a Promise which resolves 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 Returns a Promise which resolves 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,7 +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 Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
14993
14958
  */
14994
14959
  export function create(
14995
14960
 
@@ -15006,7 +14971,6 @@ declare namespace chrome {
15006
14971
  * Creates and displays a notification.
15007
14972
  *
15008
14973
  * @param options Contents of the notification.
15009
- * @param callback Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
15010
14974
  */
15011
14975
  export function create(
15012
14976
 
@@ -15023,6 +14987,7 @@ declare namespace chrome {
15023
14987
  * @chrome-returns-extra since Chrome 116
15024
14988
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
15025
14989
  * @param options Contents of the notification to update to.
14990
+ * @returns Returns a Promise which resolves to indicate whether a matching notification existed.
15026
14991
  */
15027
14992
  export function update(
15028
14993
 
@@ -15036,7 +15001,6 @@ declare namespace chrome {
15036
15001
  *
15037
15002
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
15038
15003
  * @param options Contents of the notification to update to.
15039
- * @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
15040
15004
  */
15041
15005
  export function update(
15042
15006
 
@@ -15054,6 +15018,7 @@ declare namespace chrome {
15054
15018
  *
15055
15019
  * @chrome-returns-extra since Chrome 116
15056
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.
15057
15022
  */
15058
15023
  export function clear(
15059
15024
 
@@ -15064,7 +15029,6 @@ declare namespace chrome {
15064
15029
  * Clears the specified notification.
15065
15030
  *
15066
15031
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
15067
- * @param callback Returns a Promise which resolves to indicate whether a matching notification existed.
15068
15032
  */
15069
15033
  export function clear(
15070
15034
 
@@ -15079,13 +15043,12 @@ declare namespace chrome {
15079
15043
  * Retrieves all the notifications of this app or extension.
15080
15044
  *
15081
15045
  * @chrome-returns-extra since Chrome 116
15046
+ * @returns Returns a Promise which resolves with the set of notification\_ids currently in the system.
15082
15047
  */
15083
15048
  export function getAll(): Promise<{[name: string]: any}>;
15084
15049
 
15085
15050
  /**
15086
15051
  * Retrieves all the notifications of this app or extension.
15087
- *
15088
- * @param callback Returns a Promise which resolves with the set of notification\_ids currently in the system.
15089
15052
  */
15090
15053
  export function getAll(
15091
15054
 
@@ -15098,13 +15061,12 @@ declare namespace chrome {
15098
15061
  * Retrieves whether the user has enabled notifications from this app or extension.
15099
15062
  *
15100
15063
  * @chrome-returns-extra since Chrome 116
15064
+ * @returns Returns a Promise which resolves with the current permission level.
15101
15065
  */
15102
15066
  export function getPermissionLevel(): Promise<PermissionLevel>;
15103
15067
 
15104
15068
  /**
15105
15069
  * Retrieves whether the user has enabled notifications from this app or extension.
15106
- *
15107
- * @param callback Returns a Promise which resolves with the current permission level.
15108
15070
  */
15109
15071
  export function getPermissionLevel(
15110
15072
 
@@ -15185,6 +15147,7 @@ declare namespace chrome {
15185
15147
  * Creates a new offscreen document for the extension.
15186
15148
  *
15187
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.
15188
15151
  */
15189
15152
  export function createDocument(
15190
15153
 
@@ -15195,7 +15158,6 @@ declare namespace chrome {
15195
15158
  * Creates a new offscreen document for the extension.
15196
15159
  *
15197
15160
  * @param parameters The parameters describing the offscreen document to create.
15198
- * @param callback Promise that resolves when the offscreen document is created and has completed its initial page load.
15199
15161
  */
15200
15162
  export function createDocument(
15201
15163
 
@@ -15206,13 +15168,13 @@ declare namespace chrome {
15206
15168
 
15207
15169
  /**
15208
15170
  * Closes the currently-open offscreen document for the extension.
15171
+ *
15172
+ * @returns Promise that resolves when the offscreen document has been closed.
15209
15173
  */
15210
15174
  export function closeDocument(): Promise<void>;
15211
15175
 
15212
15176
  /**
15213
15177
  * Closes the currently-open offscreen document for the extension.
15214
- *
15215
- * @param callback Promise that resolves when the offscreen document has been closed.
15216
15178
  */
15217
15179
  export function closeDocument(
15218
15180
 
@@ -15353,6 +15315,7 @@ declare namespace chrome {
15353
15315
  * Saves the content of the tab with given id as MHTML.
15354
15316
  *
15355
15317
  * @chrome-returns-extra since Chrome 116
15318
+ * @returns Resolves when the MHTML has been generated.
15356
15319
  */
15357
15320
  export function saveAsMHTML(
15358
15321
 
@@ -15367,8 +15330,6 @@ declare namespace chrome {
15367
15330
 
15368
15331
  /**
15369
15332
  * Saves the content of the tab with given id as MHTML.
15370
- *
15371
- * @param callback Resolves when the MHTML has been generated.
15372
15333
  */
15373
15334
  export function saveAsMHTML(
15374
15335
 
@@ -16746,6 +16707,7 @@ declare namespace chrome {
16746
16707
  * Returns the ID of the renderer process for the specified tab.
16747
16708
  *
16748
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.
16749
16711
  */
16750
16712
  export function getProcessIdForTab(
16751
16713
 
@@ -16756,7 +16718,6 @@ declare namespace chrome {
16756
16718
  * Returns the ID of the renderer process for the specified tab.
16757
16719
  *
16758
16720
  * @param tabId The ID of the tab for which the renderer process ID is to be returned.
16759
- * @param callback A callback to return the ID of the renderer process of a tab.
16760
16721
  */
16761
16722
  export function getProcessIdForTab(
16762
16723
 
@@ -16774,6 +16735,7 @@ declare namespace chrome {
16774
16735
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
16775
16736
  *
16776
16737
  * @param processId The ID of the process to be terminated.
16738
+ * @returns A callback to report the status of the termination.
16777
16739
  */
16778
16740
  export function terminate(
16779
16741
 
@@ -16784,7 +16746,6 @@ declare namespace chrome {
16784
16746
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
16785
16747
  *
16786
16748
  * @param processId The ID of the process to be terminated.
16787
- * @param callback A callback to report the status of the termination.
16788
16749
  */
16789
16750
  export function terminate(
16790
16751
 
@@ -16803,6 +16764,7 @@ declare namespace chrome {
16803
16764
  *
16804
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.
16805
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.
16806
16768
  */
16807
16769
  export function getProcessInfo(
16808
16770
 
@@ -16816,7 +16778,6 @@ declare namespace chrome {
16816
16778
  *
16817
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.
16818
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.
16819
- * @param callback A callback called when the processes information is collected.
16820
16781
  */
16821
16782
  export function getProcessInfo(
16822
16783
 
@@ -17132,6 +17093,7 @@ declare namespace chrome {
17132
17093
  * Adds an entry to the reading list if it does not exist.
17133
17094
  *
17134
17095
  * @param entry The entry to add to the reading list.
17096
+ * @returns Resolves once the entry has been added.
17135
17097
  */
17136
17098
  export function addEntry(
17137
17099
 
@@ -17142,7 +17104,6 @@ declare namespace chrome {
17142
17104
  * Adds an entry to the reading list if it does not exist.
17143
17105
  *
17144
17106
  * @param entry The entry to add to the reading list.
17145
- * @param callback Resolves once the entry has been added.
17146
17107
  */
17147
17108
  export function addEntry(
17148
17109
 
@@ -17155,6 +17116,7 @@ declare namespace chrome {
17155
17116
  * Removes an entry from the reading list if it exists.
17156
17117
  *
17157
17118
  * @param info The entry to remove from the reading list.
17119
+ * @returns Resolves once the entry has been removed.
17158
17120
  */
17159
17121
  export function removeEntry(
17160
17122
 
@@ -17165,7 +17127,6 @@ declare namespace chrome {
17165
17127
  * Removes an entry from the reading list if it exists.
17166
17128
  *
17167
17129
  * @param info The entry to remove from the reading list.
17168
- * @param callback Resolves once the entry has been removed.
17169
17130
  */
17170
17131
  export function removeEntry(
17171
17132
 
@@ -17178,6 +17139,7 @@ declare namespace chrome {
17178
17139
  * Updates a reading list entry if it exists.
17179
17140
  *
17180
17141
  * @param info The entry to update.
17142
+ * @returns Resolves once the matched entries have been updated.
17181
17143
  */
17182
17144
  export function updateEntry(
17183
17145
 
@@ -17188,7 +17150,6 @@ declare namespace chrome {
17188
17150
  * Updates a reading list entry if it exists.
17189
17151
  *
17190
17152
  * @param info The entry to update.
17191
- * @param callback Resolves once the matched entries have been updated.
17192
17153
  */
17193
17154
  export function updateEntry(
17194
17155
 
@@ -17201,6 +17162,7 @@ declare namespace chrome {
17201
17162
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
17202
17163
  *
17203
17164
  * @param info The properties to search for.
17165
+ * @returns Resolves once the entries have been matched.
17204
17166
  */
17205
17167
  export function query(
17206
17168
 
@@ -17211,7 +17173,6 @@ declare namespace chrome {
17211
17173
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
17212
17174
  *
17213
17175
  * @param info The properties to search for.
17214
- * @param callback Resolves once the entries have been matched.
17215
17176
  */
17216
17177
  export function query(
17217
17178
 
@@ -17754,6 +17715,7 @@ declare namespace chrome {
17754
17715
  *
17755
17716
  * @chrome-returns-extra since Chrome 99
17756
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.
17757
17719
  */
17758
17720
  export function setUninstallURL(
17759
17721
 
@@ -17764,7 +17726,6 @@ declare namespace chrome {
17764
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.
17765
17727
  *
17766
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.
17767
- * @param callback Called when the uninstall URL is set. If the given URL is invalid, {@link runtime.lastError} will be set.
17768
17729
  */
17769
17730
  export function setUninstallURL(
17770
17731
 
@@ -17848,6 +17809,7 @@ declare namespace chrome {
17848
17809
  *
17849
17810
  * @chrome-returns-extra since Chrome 99
17850
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.
17851
17813
  * @since Chrome 53
17852
17814
  */
17853
17815
  export function restartAfterDelay(
@@ -17859,7 +17821,6 @@ declare namespace chrome {
17859
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.
17860
17822
  *
17861
17823
  * @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
17862
- * @param callback A callback to be invoked when a restart request was successfully rescheduled.
17863
17824
  * @since Chrome 53
17864
17825
  */
17865
17826
  export function restartAfterDelay(
@@ -17911,6 +17872,7 @@ declare namespace chrome {
17911
17872
  * @chrome-returns-extra since Chrome 99
17912
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).
17913
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.
17914
17876
  */
17915
17877
  export function sendMessage(
17916
17878
 
@@ -17932,6 +17894,7 @@ declare namespace chrome {
17932
17894
  *
17933
17895
  * @chrome-returns-extra since Chrome 99
17934
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.
17935
17898
  */
17936
17899
  export function sendMessage(
17937
17900
 
@@ -17951,7 +17914,6 @@ declare namespace chrome {
17951
17914
  *
17952
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).
17953
17916
  * @param message The message to send. This message should be a JSON-ifiable object.
17954
- * @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.
17955
17917
  */
17956
17918
  export function sendMessage(
17957
17919
 
@@ -17980,7 +17942,6 @@ declare namespace chrome {
17980
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}.
17981
17943
  *
17982
17944
  * @param message The message to send. This message should be a JSON-ifiable object.
17983
- * @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.
17984
17945
  */
17985
17946
  export function sendMessage(
17986
17947
 
@@ -18044,13 +18005,12 @@ declare namespace chrome {
18044
18005
  * Returns information about the current platform.
18045
18006
  *
18046
18007
  * @chrome-returns-extra since Chrome 99
18008
+ * @returns Promise that resolves with information about the current platform.
18047
18009
  */
18048
18010
  export function getPlatformInfo(): Promise<PlatformInfo>;
18049
18011
 
18050
18012
  /**
18051
18013
  * Returns information about the current platform.
18052
- *
18053
- * @param callback Called with results
18054
18014
  */
18055
18015
  export function getPlatformInfo(
18056
18016
 
@@ -18083,6 +18043,7 @@ declare namespace chrome {
18083
18043
  * Fetches information about active contexts associated with this extension
18084
18044
  *
18085
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.
18086
18047
  * @since Chrome 116
18087
18048
  * @chrome-min-manifest MV3
18088
18049
  */
@@ -18095,7 +18056,6 @@ declare namespace chrome {
18095
18056
  * Fetches information about active contexts associated with this extension
18096
18057
  *
18097
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.
18098
- * @param callback Invoked with the matching contexts, if any.
18099
18059
  * @since Chrome 116
18100
18060
  * @chrome-min-manifest MV3
18101
18061
  */
@@ -18322,6 +18282,7 @@ declare namespace chrome {
18322
18282
  *
18323
18283
  * @chrome-returns-extra since Chrome 90
18324
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.
18325
18286
  */
18326
18287
  export function executeScript(
18327
18288
 
@@ -18332,7 +18293,6 @@ declare namespace chrome {
18332
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.
18333
18294
  *
18334
18295
  * @param injection The details of the script which to inject.
18335
- * @param callback 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.
18336
18296
  */
18337
18297
  export function executeScript(
18338
18298
 
@@ -18348,6 +18308,7 @@ declare namespace chrome {
18348
18308
  *
18349
18309
  * @chrome-returns-extra since Chrome 90
18350
18310
  * @param injection The details of the styles to insert.
18311
+ * @returns Returns a Promise which resolves upon completion of the insertion.
18351
18312
  */
18352
18313
  export function insertCSS(
18353
18314
 
@@ -18358,7 +18319,6 @@ declare namespace chrome {
18358
18319
  * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
18359
18320
  *
18360
18321
  * @param injection The details of the styles to insert.
18361
- * @param callback Returns a Promise which resolves upon completion of the insertion.
18362
18322
  */
18363
18323
  export function insertCSS(
18364
18324
 
@@ -18371,6 +18331,7 @@ declare namespace chrome {
18371
18331
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
18372
18332
  *
18373
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.
18374
18335
  * @since Chrome 90
18375
18336
  */
18376
18337
  export function removeCSS(
@@ -18382,7 +18343,6 @@ declare namespace chrome {
18382
18343
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
18383
18344
  *
18384
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.
18385
- * @param callback Returns a Promise which resolves upon the completion of the removal.
18386
18346
  * @since Chrome 90
18387
18347
  */
18388
18348
  export function removeCSS(
@@ -18396,6 +18356,7 @@ declare namespace chrome {
18396
18356
  * Registers one or more content scripts for this extension.
18397
18357
  *
18398
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.
18399
18360
  * @since Chrome 96
18400
18361
  */
18401
18362
  export function registerContentScripts(
@@ -18407,7 +18368,6 @@ declare namespace chrome {
18407
18368
  * Registers one or more content scripts for this extension.
18408
18369
  *
18409
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.
18410
- * @param callback Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
18411
18371
  * @since Chrome 96
18412
18372
  */
18413
18373
  export function registerContentScripts(
@@ -18447,6 +18407,7 @@ declare namespace chrome {
18447
18407
  * Unregisters content scripts for this extension.
18448
18408
  *
18449
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.
18450
18411
  * @since Chrome 96
18451
18412
  */
18452
18413
  export function unregisterContentScripts(
@@ -18458,7 +18419,6 @@ declare namespace chrome {
18458
18419
  * Unregisters content scripts for this extension.
18459
18420
  *
18460
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.
18461
- * @param callback Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
18462
18422
  * @since Chrome 96
18463
18423
  */
18464
18424
  export function unregisterContentScripts(
@@ -18472,6 +18432,7 @@ declare namespace chrome {
18472
18432
  * Updates one or more content scripts for this extension.
18473
18433
  *
18474
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.
18475
18436
  * @since Chrome 96
18476
18437
  */
18477
18438
  export function updateContentScripts(
@@ -18483,7 +18444,6 @@ declare namespace chrome {
18483
18444
  * Updates one or more content scripts for this extension.
18484
18445
  *
18485
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.
18486
- * @param callback Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
18487
18447
  * @since Chrome 96
18488
18448
  */
18489
18449
  export function updateContentScripts(
@@ -18878,6 +18838,7 @@ declare namespace chrome {
18878
18838
  * Configures the side panel.
18879
18839
  *
18880
18840
  * @param options The configuration options to apply to the panel.
18841
+ * @returns Returns a Promise which resolves when the options have been set.
18881
18842
  */
18882
18843
  export function setOptions(
18883
18844
 
@@ -18888,7 +18849,6 @@ declare namespace chrome {
18888
18849
  * Configures the side panel.
18889
18850
  *
18890
18851
  * @param options The configuration options to apply to the panel.
18891
- * @param callback Returns a Promise which resolves when the options have been set.
18892
18852
  */
18893
18853
  export function setOptions(
18894
18854
 
@@ -18901,6 +18861,7 @@ declare namespace chrome {
18901
18861
  * Returns the active panel configuration.
18902
18862
  *
18903
18863
  * @param options Specifies the context to return the configuration for.
18864
+ * @returns Returns a Promise which resolves with the active panel configuration.
18904
18865
  */
18905
18866
  export function getOptions(
18906
18867
 
@@ -18911,7 +18872,6 @@ declare namespace chrome {
18911
18872
  * Returns the active panel configuration.
18912
18873
  *
18913
18874
  * @param options Specifies the context to return the configuration for.
18914
- * @param callback Returns a Promise which resolves with the active panel configuration.
18915
18875
  */
18916
18876
  export function getOptions(
18917
18877
 
@@ -18926,6 +18886,7 @@ declare namespace chrome {
18926
18886
  * Configures the extension's side panel behavior. This is an upsert operation.
18927
18887
  *
18928
18888
  * @param behavior The new behavior to be set.
18889
+ * @returns Returns a Promise which resolves when the new behavior has been set.
18929
18890
  */
18930
18891
  export function setPanelBehavior(
18931
18892
 
@@ -18936,7 +18897,6 @@ declare namespace chrome {
18936
18897
  * Configures the extension's side panel behavior. This is an upsert operation.
18937
18898
  *
18938
18899
  * @param behavior The new behavior to be set.
18939
- * @param callback Returns a Promise which resolves when the new behavior has been set.
18940
18900
  */
18941
18901
  export function setPanelBehavior(
18942
18902
 
@@ -18947,13 +18907,13 @@ declare namespace chrome {
18947
18907
 
18948
18908
  /**
18949
18909
  * Returns the extension's current side panel behavior.
18910
+ *
18911
+ * @returns Returns a Promise which resolves with the extension's side panel behavior.
18950
18912
  */
18951
18913
  export function getPanelBehavior(): Promise<PanelBehavior>;
18952
18914
 
18953
18915
  /**
18954
18916
  * Returns the extension's current side panel behavior.
18955
- *
18956
- * @param callback Returns a Promise which resolves with the extension's side panel behavior.
18957
18917
  */
18958
18918
  export function getPanelBehavior(
18959
18919
 
@@ -18966,6 +18926,7 @@ declare namespace chrome {
18966
18926
  * Opens the side panel for the extension. This may only be called in response to a user action.
18967
18927
  *
18968
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.
18969
18930
  * @since Chrome 116
18970
18931
  */
18971
18932
  export function open(
@@ -18977,7 +18938,6 @@ declare namespace chrome {
18977
18938
  * Opens the side panel for the extension. This may only be called in response to a user action.
18978
18939
  *
18979
18940
  * @param options Specifies the context in which to open the side panel.
18980
- * @param callback Returns a Promise which resolves when the side panel has been opened.
18981
18941
  * @since Chrome 116
18982
18942
  */
18983
18943
  export function open(
@@ -18990,6 +18950,7 @@ declare namespace chrome {
18990
18950
  /**
18991
18951
  * Returns the side panel's current layout.
18992
18952
  *
18953
+ * @returns Returns a Promise which resolves with a {@link PanelLayout}.
18993
18954
  * @since Chrome 140
18994
18955
  */
18995
18956
  export function getLayout(): Promise<PanelLayout>;
@@ -18997,7 +18958,6 @@ declare namespace chrome {
18997
18958
  /**
18998
18959
  * Returns the side panel's current layout.
18999
18960
  *
19000
- * @param callback Returns a Promise which resolves with a {@link PanelLayout}.
19001
18961
  * @since Chrome 140
19002
18962
  */
19003
18963
  export function getLayout(
@@ -19179,6 +19139,7 @@ declare namespace chrome {
19179
19139
  * Creates a TCP socket.
19180
19140
  *
19181
19141
  * @param properties The socket properties (optional).
19142
+ * @returns Called when the socket has been created.
19182
19143
  */
19183
19144
  export function create(
19184
19145
 
@@ -19189,7 +19150,6 @@ declare namespace chrome {
19189
19150
  * Creates a TCP socket.
19190
19151
  *
19191
19152
  * @param properties The socket properties (optional).
19192
- * @param callback Called when the socket has been created.
19193
19153
  */
19194
19154
  export function create(
19195
19155
 
@@ -19208,6 +19168,7 @@ declare namespace chrome {
19208
19168
  *
19209
19169
  * @param socketId The socket identifier.
19210
19170
  * @param properties The properties to update.
19171
+ * @returns Called when the properties are updated.
19211
19172
  */
19212
19173
  export function update(
19213
19174
 
@@ -19221,7 +19182,6 @@ declare namespace chrome {
19221
19182
  *
19222
19183
  * @param socketId The socket identifier.
19223
19184
  * @param properties The properties to update.
19224
- * @param callback Called when the properties are updated.
19225
19185
  */
19226
19186
  export function update(
19227
19187
 
@@ -19234,6 +19194,8 @@ declare namespace chrome {
19234
19194
 
19235
19195
  /**
19236
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.
19237
19199
  */
19238
19200
  export function setPaused(
19239
19201
 
@@ -19244,8 +19206,6 @@ declare namespace chrome {
19244
19206
 
19245
19207
  /**
19246
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.
19247
- *
19248
- * @param callback Callback from the `setPaused` method.
19249
19209
  */
19250
19210
  export function setPaused(
19251
19211
 
@@ -19377,6 +19337,7 @@ declare namespace chrome {
19377
19337
  * Disconnects the socket.
19378
19338
  *
19379
19339
  * @param socketId The socket identifier.
19340
+ * @returns Called when the disconnect attempt is complete.
19380
19341
  */
19381
19342
  export function disconnect(
19382
19343
 
@@ -19387,7 +19348,6 @@ declare namespace chrome {
19387
19348
  * Disconnects the socket.
19388
19349
  *
19389
19350
  * @param socketId The socket identifier.
19390
- * @param callback Called when the disconnect attempt is complete.
19391
19351
  */
19392
19352
  export function disconnect(
19393
19353
 
@@ -19454,6 +19414,7 @@ declare namespace chrome {
19454
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.
19455
19415
  *
19456
19416
  * @param socketId The socket identifier.
19417
+ * @returns Called when the `close` operation completes.
19457
19418
  */
19458
19419
  export function close(
19459
19420
 
@@ -19464,7 +19425,6 @@ declare namespace chrome {
19464
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.
19465
19426
  *
19466
19427
  * @param socketId The socket identifier.
19467
- * @param callback Called when the `close` operation completes.
19468
19428
  */
19469
19429
  export function close(
19470
19430
 
@@ -19477,6 +19437,7 @@ declare namespace chrome {
19477
19437
  * Retrieves the state of the given socket.
19478
19438
  *
19479
19439
  * @param socketId The socket identifier.
19440
+ * @returns Called when the socket state is available.
19480
19441
  */
19481
19442
  export function getInfo(
19482
19443
 
@@ -19487,7 +19448,6 @@ declare namespace chrome {
19487
19448
  * Retrieves the state of the given socket.
19488
19449
  *
19489
19450
  * @param socketId The socket identifier.
19490
- * @param callback Called when the socket state is available.
19491
19451
  */
19492
19452
  export function getInfo(
19493
19453
 
@@ -19503,13 +19463,13 @@ declare namespace chrome {
19503
19463
 
19504
19464
  /**
19505
19465
  * Retrieves the list of currently opened sockets owned by the application.
19466
+ *
19467
+ * @returns Called when the list of sockets is available.
19506
19468
  */
19507
19469
  export function getSockets(): Promise<SocketInfo[]>;
19508
19470
 
19509
19471
  /**
19510
19472
  * Retrieves the list of currently opened sockets owned by the application.
19511
- *
19512
- * @param callback Called when the list of sockets is available.
19513
19473
  */
19514
19474
  export function getSockets(
19515
19475
 
@@ -19633,6 +19593,7 @@ declare namespace chrome {
19633
19593
  * Creates a TCP server socket.
19634
19594
  *
19635
19595
  * @param properties The socket properties (optional).
19596
+ * @returns Called when the socket has been created.
19636
19597
  */
19637
19598
  export function create(
19638
19599
 
@@ -19643,7 +19604,6 @@ declare namespace chrome {
19643
19604
  * Creates a TCP server socket.
19644
19605
  *
19645
19606
  * @param properties The socket properties (optional).
19646
- * @param callback Called when the socket has been created.
19647
19607
  */
19648
19608
  export function create(
19649
19609
 
@@ -19662,6 +19622,7 @@ declare namespace chrome {
19662
19622
  *
19663
19623
  * @param socketId The socket identifier.
19664
19624
  * @param properties The properties to update.
19625
+ * @returns Called when the properties are updated.
19665
19626
  */
19666
19627
  export function update(
19667
19628
 
@@ -19675,7 +19636,6 @@ declare namespace chrome {
19675
19636
  *
19676
19637
  * @param socketId The socket identifier.
19677
19638
  * @param properties The properties to update.
19678
- * @param callback Called when the properties are updated.
19679
19639
  */
19680
19640
  export function update(
19681
19641
 
@@ -19688,6 +19648,8 @@ declare namespace chrome {
19688
19648
 
19689
19649
  /**
19690
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.
19691
19653
  */
19692
19654
  export function setPaused(
19693
19655
 
@@ -19698,8 +19660,6 @@ declare namespace chrome {
19698
19660
 
19699
19661
  /**
19700
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.
19701
- *
19702
- * @param callback Callback from the `setPaused` method.
19703
19663
  */
19704
19664
  export function setPaused(
19705
19665
 
@@ -19765,6 +19725,7 @@ declare namespace chrome {
19765
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.
19766
19726
  *
19767
19727
  * @param socketId The socket identifier.
19728
+ * @returns Called when the disconnect attempt is complete.
19768
19729
  */
19769
19730
  export function disconnect(
19770
19731
 
@@ -19775,7 +19736,6 @@ declare namespace chrome {
19775
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.
19776
19737
  *
19777
19738
  * @param socketId The socket identifier.
19778
- * @param callback Called when the disconnect attempt is complete.
19779
19739
  */
19780
19740
  export function disconnect(
19781
19741
 
@@ -19788,6 +19748,7 @@ declare namespace chrome {
19788
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.
19789
19749
  *
19790
19750
  * @param socketId The socket identifier.
19751
+ * @returns Called when the `close` operation completes.
19791
19752
  */
19792
19753
  export function close(
19793
19754
 
@@ -19798,7 +19759,6 @@ declare namespace chrome {
19798
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.
19799
19760
  *
19800
19761
  * @param socketId The socket identifier.
19801
- * @param callback Called when the `close` operation completes.
19802
19762
  */
19803
19763
  export function close(
19804
19764
 
@@ -19811,6 +19771,7 @@ declare namespace chrome {
19811
19771
  * Retrieves the state of the given socket.
19812
19772
  *
19813
19773
  * @param socketId The socket identifier.
19774
+ * @returns Called when the socket state is available.
19814
19775
  */
19815
19776
  export function getInfo(
19816
19777
 
@@ -19821,7 +19782,6 @@ declare namespace chrome {
19821
19782
  * Retrieves the state of the given socket.
19822
19783
  *
19823
19784
  * @param socketId The socket identifier.
19824
- * @param callback Called when the socket state is available.
19825
19785
  */
19826
19786
  export function getInfo(
19827
19787
 
@@ -19837,13 +19797,13 @@ declare namespace chrome {
19837
19797
 
19838
19798
  /**
19839
19799
  * Retrieves the list of currently opened sockets owned by the application.
19800
+ *
19801
+ * @returns Called when the list of sockets is available.
19840
19802
  */
19841
19803
  export function getSockets(): Promise<SocketInfo[]>;
19842
19804
 
19843
19805
  /**
19844
19806
  * Retrieves the list of currently opened sockets owned by the application.
19845
- *
19846
- * @param callback Called when the list of sockets is available.
19847
19807
  */
19848
19808
  export function getSockets(
19849
19809
 
@@ -20005,6 +19965,7 @@ declare namespace chrome {
20005
19965
  * Creates a UDP socket with the given properties.
20006
19966
  *
20007
19967
  * @param properties The socket properties (optional).
19968
+ * @returns Called when the socket has been created.
20008
19969
  */
20009
19970
  export function create(
20010
19971
 
@@ -20015,7 +19976,6 @@ declare namespace chrome {
20015
19976
  * Creates a UDP socket with the given properties.
20016
19977
  *
20017
19978
  * @param properties The socket properties (optional).
20018
- * @param callback Called when the socket has been created.
20019
19979
  */
20020
19980
  export function create(
20021
19981
 
@@ -20034,6 +19994,7 @@ declare namespace chrome {
20034
19994
  *
20035
19995
  * @param socketId The socket ID.
20036
19996
  * @param properties The properties to update.
19997
+ * @returns Called when the properties are updated.
20037
19998
  */
20038
19999
  export function update(
20039
20000
 
@@ -20047,7 +20008,6 @@ declare namespace chrome {
20047
20008
  *
20048
20009
  * @param socketId The socket ID.
20049
20010
  * @param properties The properties to update.
20050
- * @param callback Called when the properties are updated.
20051
20011
  */
20052
20012
  export function update(
20053
20013
 
@@ -20062,6 +20022,7 @@ declare namespace chrome {
20062
20022
  * Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
20063
20023
  *
20064
20024
  * @param paused Flag to indicate whether to pause or unpause.
20025
+ * @returns Called when the socket has been successfully paused or unpaused.
20065
20026
  */
20066
20027
  export function setPaused(
20067
20028
 
@@ -20074,7 +20035,6 @@ declare namespace chrome {
20074
20035
  * Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
20075
20036
  *
20076
20037
  * @param paused Flag to indicate whether to pause or unpause.
20077
- * @param callback Called when the socket has been successfully paused or unpaused.
20078
20038
  */
20079
20039
  export function setPaused(
20080
20040
 
@@ -20172,6 +20132,7 @@ declare namespace chrome {
20172
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.
20173
20133
  *
20174
20134
  * @param socketId The socket ID.
20135
+ * @returns Called when the `close` operation completes.
20175
20136
  */
20176
20137
  export function close(
20177
20138
 
@@ -20182,7 +20143,6 @@ declare namespace chrome {
20182
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.
20183
20144
  *
20184
20145
  * @param socketId The socket ID.
20185
- * @param callback Called when the `close` operation completes.
20186
20146
  */
20187
20147
  export function close(
20188
20148
 
@@ -20195,6 +20155,7 @@ declare namespace chrome {
20195
20155
  * Retrieves the state of the given socket.
20196
20156
  *
20197
20157
  * @param socketId The socket ID.
20158
+ * @returns Called when the socket state is available.
20198
20159
  */
20199
20160
  export function getInfo(
20200
20161
 
@@ -20205,7 +20166,6 @@ declare namespace chrome {
20205
20166
  * Retrieves the state of the given socket.
20206
20167
  *
20207
20168
  * @param socketId The socket ID.
20208
- * @param callback Called when the socket state is available.
20209
20169
  */
20210
20170
  export function getInfo(
20211
20171
 
@@ -20221,13 +20181,13 @@ declare namespace chrome {
20221
20181
 
20222
20182
  /**
20223
20183
  * Retrieves the list of currently opened sockets owned by the application.
20184
+ *
20185
+ * @returns Called when the list of sockets is available.
20224
20186
  */
20225
20187
  export function getSockets(): Promise<SocketInfo[]>;
20226
20188
 
20227
20189
  /**
20228
20190
  * Retrieves the list of currently opened sockets owned by the application.
20229
- *
20230
- * @param callback Called when the list of sockets is available.
20231
20191
  */
20232
20192
  export function getSockets(
20233
20193
 
@@ -20335,6 +20295,7 @@ declare namespace chrome {
20335
20295
  * Gets the multicast group addresses the socket is currently joined to.
20336
20296
  *
20337
20297
  * @param socketId The socket ID.
20298
+ * @returns Called with an array of strings of the result.
20338
20299
  */
20339
20300
  export function getJoinedGroups(
20340
20301
 
@@ -20345,7 +20306,6 @@ declare namespace chrome {
20345
20306
  * Gets the multicast group addresses the socket is currently joined to.
20346
20307
  *
20347
20308
  * @param socketId The socket ID.
20348
- * @param callback Called with an array of strings of the result.
20349
20309
  */
20350
20310
  export function getJoinedGroups(
20351
20311
 
@@ -20426,6 +20386,7 @@ declare namespace chrome {
20426
20386
  *
20427
20387
  * @chrome-returns-extra since Chrome 95
20428
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.
20429
20390
  */
20430
20391
  get(
20431
20392
 
@@ -20436,7 +20397,6 @@ declare namespace chrome {
20436
20397
  * Gets one or more items from storage.
20437
20398
  *
20438
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.
20439
- * @param callback Callback with storage items, or on failure (in which case {@link runtime.lastError} will be set).
20440
20400
  */
20441
20401
  get(
20442
20402
 
@@ -20453,6 +20413,7 @@ declare namespace chrome {
20453
20413
  /**
20454
20414
  * Gets all keys from storage.
20455
20415
  *
20416
+ * @returns Promise that resolves with storage keys, or rejects on failure.
20456
20417
  * @since Chrome 130
20457
20418
  */
20458
20419
  getKeys(): Promise<string[]>;
@@ -20460,7 +20421,6 @@ declare namespace chrome {
20460
20421
  /**
20461
20422
  * Gets all keys from storage.
20462
20423
  *
20463
- * @param callback Callback with storage keys, or on failure (in which case {@link runtime.lastError} will be set).
20464
20424
  * @since Chrome 130
20465
20425
  */
20466
20426
  getKeys(
@@ -20478,6 +20438,7 @@ declare namespace chrome {
20478
20438
  *
20479
20439
  * @chrome-returns-extra since Chrome 95
20480
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.
20481
20442
  */
20482
20443
  getBytesInUse(
20483
20444
 
@@ -20488,7 +20449,6 @@ declare namespace chrome {
20488
20449
  * Gets the amount of space (in bytes) being used by one or more items.
20489
20450
  *
20490
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.
20491
- * @param callback Callback with the amount of space being used by storage, or on failure (in which case {@link runtime.lastError} will be set).
20492
20452
  */
20493
20453
  getBytesInUse(
20494
20454
 
@@ -20511,6 +20471,7 @@ declare namespace chrome {
20511
20471
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
20512
20472
 
20513
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.
20514
20475
  */
20515
20476
  set(
20516
20477
 
@@ -20525,7 +20486,6 @@ declare namespace chrome {
20525
20486
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
20526
20487
 
20527
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).
20528
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20529
20489
  */
20530
20490
  set(
20531
20491
 
@@ -20539,6 +20499,7 @@ declare namespace chrome {
20539
20499
  *
20540
20500
  * @chrome-returns-extra since Chrome 95
20541
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.
20542
20503
  */
20543
20504
  remove(
20544
20505
 
@@ -20549,7 +20510,6 @@ declare namespace chrome {
20549
20510
  * Removes one or more items from storage.
20550
20511
  *
20551
20512
  * @param keys A single key or a list of keys for items to remove.
20552
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20553
20513
  */
20554
20514
  remove(
20555
20515
 
@@ -20562,13 +20522,12 @@ declare namespace chrome {
20562
20522
  * Removes all items from storage.
20563
20523
  *
20564
20524
  * @chrome-returns-extra since Chrome 95
20525
+ * @returns Promise that resolves on success, or rejects on failure.
20565
20526
  */
20566
20527
  clear(): Promise<void>;
20567
20528
 
20568
20529
  /**
20569
20530
  * Removes all items from storage.
20570
- *
20571
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20572
20531
  */
20573
20532
  clear(
20574
20533
 
@@ -20578,6 +20537,7 @@ declare namespace chrome {
20578
20537
  /**
20579
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.
20580
20539
  *
20540
+ * @returns Promise that resolves on success, or rejects on failure.
20581
20541
  * @since Chrome 102
20582
20542
  */
20583
20543
  setAccessLevel(
@@ -20594,7 +20554,6 @@ declare namespace chrome {
20594
20554
  /**
20595
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.
20596
20556
  *
20597
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
20598
20557
  * @since Chrome 102
20599
20558
  */
20600
20559
  setAccessLevel(
@@ -21245,6 +21204,7 @@ declare namespace chrome {
21245
21204
  *
21246
21205
  * @chrome-returns-extra since Chrome 91
21247
21206
  * @param flags Options affecting how the information is returned.
21207
+ * @returns Promise that resolves with the results.
21248
21208
  */
21249
21209
  export function getInfo(
21250
21210
 
@@ -21258,7 +21218,6 @@ declare namespace chrome {
21258
21218
  * Requests the information for all attached display devices.
21259
21219
  *
21260
21220
  * @param flags Options affecting how the information is returned.
21261
- * @param callback Promise that resolves with the results.
21262
21221
  */
21263
21222
  export function getInfo(
21264
21223
 
@@ -21276,6 +21235,7 @@ declare namespace chrome {
21276
21235
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21277
21236
  *
21278
21237
  * @chrome-returns-extra since Chrome 91
21238
+ * @returns Promise that resolves with the results.
21279
21239
  * @since Chrome 53
21280
21240
  */
21281
21241
  export function getDisplayLayout(): Promise<DisplayLayout[]>;
@@ -21283,7 +21243,6 @@ declare namespace chrome {
21283
21243
  /**
21284
21244
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
21285
21245
  *
21286
- * @param callback Promise that resolves with the results.
21287
21246
  * @since Chrome 53
21288
21247
  */
21289
21248
  export function getDisplayLayout(
@@ -21299,6 +21258,7 @@ declare namespace chrome {
21299
21258
  * @chrome-returns-extra since Chrome 91
21300
21259
  * @param id The display's unique identifier.
21301
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.
21302
21262
  */
21303
21263
  export function setDisplayProperties(
21304
21264
 
@@ -21312,7 +21272,6 @@ declare namespace chrome {
21312
21272
  *
21313
21273
  * @param id The display's unique identifier.
21314
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`.
21315
- * @param callback Promise that resolves when the function finishes.
21316
21275
  */
21317
21276
  export function setDisplayProperties(
21318
21277
 
@@ -21328,6 +21287,7 @@ declare namespace chrome {
21328
21287
  *
21329
21288
  * @chrome-returns-extra since Chrome 91
21330
21289
  * @param layouts The layout information, required for all displays except the primary display.
21290
+ * @returns Promise that resolves when the function finishes.
21331
21291
  * @since Chrome 53
21332
21292
  */
21333
21293
  export function setDisplayLayout(
@@ -21339,7 +21299,6 @@ declare namespace chrome {
21339
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.
21340
21300
  *
21341
21301
  * @param layouts The layout information, required for all displays except the primary display.
21342
- * @param callback Promise that resolves when the function finishes.
21343
21302
  * @since Chrome 53
21344
21303
  */
21345
21304
  export function setDisplayLayout(
@@ -21412,6 +21371,7 @@ declare namespace chrome {
21412
21371
  *
21413
21372
  * @chrome-returns-extra since Chrome 91
21414
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.
21415
21375
  * @since Chrome 57
21416
21376
  */
21417
21377
  export function showNativeTouchCalibration(
@@ -21423,7 +21383,6 @@ declare namespace chrome {
21423
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.
21424
21384
  *
21425
21385
  * @param id The display's unique identifier.
21426
- * @param callback 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.
21427
21386
  * @since Chrome 57
21428
21387
  */
21429
21388
  export function showNativeTouchCalibration(
@@ -21476,6 +21435,7 @@ declare namespace chrome {
21476
21435
  *
21477
21436
  * @chrome-returns-extra since Chrome 91
21478
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.
21479
21439
  * @since Chrome 65
21480
21440
  */
21481
21441
  export function setMirrorMode(
@@ -21487,7 +21447,6 @@ declare namespace chrome {
21487
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.
21488
21448
  *
21489
21449
  * @param info The information of the mirror mode that should be applied to the display mode.
21490
- * @param callback Promise that resolves when the function finishes.
21491
21450
  * @since Chrome 65
21492
21451
  */
21493
21452
  export function setMirrorMode(
@@ -21565,13 +21524,13 @@ declare namespace chrome {
21565
21524
 
21566
21525
  /**
21567
21526
  * Retrieves information about local adapters on this system.
21527
+ *
21528
+ * @returns Called when local adapter information is available.
21568
21529
  */
21569
21530
  export function getNetworkInterfaces(): Promise<NetworkInterface[]>;
21570
21531
 
21571
21532
  /**
21572
21533
  * Retrieves information about local adapters on this system.
21573
- *
21574
- * @param callback Called when local adapter information is available.
21575
21534
  */
21576
21535
  export function getNetworkInterfaces(
21577
21536
 
@@ -21745,6 +21704,7 @@ declare namespace chrome {
21745
21704
  * Adds a new log record.
21746
21705
  *
21747
21706
  * @param options The logging options.
21707
+ * @returns Returns a Promise which resolves once the log has been added.
21748
21708
  */
21749
21709
  export function add(
21750
21710
 
@@ -21755,7 +21715,6 @@ declare namespace chrome {
21755
21715
  * Adds a new log record.
21756
21716
  *
21757
21717
  * @param options The logging options.
21758
- * @param callback Returns a Promise which resolves once the log has been added.
21759
21718
  */
21760
21719
  export function add(
21761
21720
 
@@ -21853,13 +21812,12 @@ declare namespace chrome {
21853
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).
21854
21813
  *
21855
21814
  * @chrome-returns-extra since Chrome 116
21815
+ * @returns Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
21856
21816
  */
21857
21817
  export function getCapturedTabs(): Promise<CaptureInfo[]>;
21858
21818
 
21859
21819
  /**
21860
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).
21861
- *
21862
- * @param callback Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
21863
21821
  */
21864
21822
  export function getCapturedTabs(
21865
21823
 
@@ -21872,6 +21830,7 @@ declare namespace chrome {
21872
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.
21873
21831
  *
21874
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.
21875
21834
  * @since Chrome 71
21876
21835
  */
21877
21836
  export function getMediaStreamId(
@@ -21882,7 +21841,6 @@ declare namespace chrome {
21882
21841
  /**
21883
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.
21884
21843
  *
21885
- * @param callback 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.
21886
21844
  * @since Chrome 71
21887
21845
  */
21888
21846
  export function getMediaStreamId(
@@ -23741,6 +23699,7 @@ declare namespace chrome {
23741
23699
  * @chrome-returns-extra since Chrome 88
23742
23700
  * @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
23743
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.
23744
23703
  */
23745
23704
  export function setZoom(
23746
23705
 
@@ -23754,6 +23713,7 @@ declare namespace chrome {
23754
23713
  *
23755
23714
  * @chrome-returns-extra since Chrome 88
23756
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.
23757
23717
  */
23758
23718
  export function setZoom(
23759
23719
 
@@ -23765,7 +23725,6 @@ declare namespace chrome {
23765
23725
  *
23766
23726
  * @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
23767
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.
23768
- * @param callback Resolves after the zoom factor has been changed.
23769
23728
  */
23770
23729
  export function setZoom(
23771
23730
 
@@ -23780,7 +23739,6 @@ declare namespace chrome {
23780
23739
  * Zooms a specified tab.
23781
23740
  *
23782
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.
23783
- * @param callback Resolves after the zoom factor has been changed.
23784
23742
  */
23785
23743
  export function setZoom(
23786
23744
 
@@ -23794,6 +23752,7 @@ declare namespace chrome {
23794
23752
  *
23795
23753
  * @chrome-returns-extra since Chrome 88
23796
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.
23797
23756
  */
23798
23757
  export function getZoom(
23799
23758
 
@@ -23804,7 +23763,6 @@ declare namespace chrome {
23804
23763
  * Gets the current zoom factor of a specified tab.
23805
23764
  *
23806
23765
  * @param tabId The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
23807
- * @param callback Resolves with the tab's current zoom factor after it has been fetched.
23808
23766
  */
23809
23767
  export function getZoom(
23810
23768
 
@@ -23824,6 +23782,7 @@ declare namespace chrome {
23824
23782
  * @chrome-returns-extra since Chrome 88
23825
23783
  * @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
23826
23784
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23785
+ * @returns Resolves after the zoom settings are changed.
23827
23786
  */
23828
23787
  export function setZoomSettings(
23829
23788
 
@@ -23837,6 +23796,7 @@ declare namespace chrome {
23837
23796
  *
23838
23797
  * @chrome-returns-extra since Chrome 88
23839
23798
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23799
+ * @returns Resolves after the zoom settings are changed.
23840
23800
  */
23841
23801
  export function setZoomSettings(
23842
23802
 
@@ -23848,7 +23808,6 @@ declare namespace chrome {
23848
23808
  *
23849
23809
  * @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
23850
23810
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23851
- * @param callback Resolves after the zoom settings are changed.
23852
23811
  */
23853
23812
  export function setZoomSettings(
23854
23813
 
@@ -23863,7 +23822,6 @@ declare namespace chrome {
23863
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.
23864
23823
  *
23865
23824
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
23866
- * @param callback Resolves after the zoom settings are changed.
23867
23825
  */
23868
23826
  export function setZoomSettings(
23869
23827
 
@@ -23877,6 +23835,7 @@ declare namespace chrome {
23877
23835
  *
23878
23836
  * @chrome-returns-extra since Chrome 88
23879
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.
23880
23839
  */
23881
23840
  export function getZoomSettings(
23882
23841
 
@@ -23887,7 +23846,6 @@ declare namespace chrome {
23887
23846
  * Gets the current zoom settings of a specified tab.
23888
23847
  *
23889
23848
  * @param tabId The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
23890
- * @param callback Resolves with the tab's current zoom settings.
23891
23849
  */
23892
23850
  export function getZoomSettings(
23893
23851
 
@@ -23906,6 +23864,7 @@ declare namespace chrome {
23906
23864
  *
23907
23865
  * @chrome-returns-extra since Chrome 88
23908
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.
23909
23868
  * @since Chrome 54
23910
23869
  */
23911
23870
  export function discard(
@@ -23917,7 +23876,6 @@ declare namespace chrome {
23917
23876
  * Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
23918
23877
  *
23919
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.
23920
- * @param callback Resolves after the operation is completed.
23921
23879
  * @since Chrome 54
23922
23880
  */
23923
23881
  export function discard(
@@ -24193,6 +24151,7 @@ declare namespace chrome {
24193
24151
  * @chrome-returns-extra since Chrome 101
24194
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.
24195
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.
24196
24155
  */
24197
24156
  export function speak(
24198
24157
 
@@ -24206,7 +24165,6 @@ declare namespace chrome {
24206
24165
  *
24207
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.
24208
24167
  * @param options The speech options.
24209
- * @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.
24210
24168
  */
24211
24169
  export function speak(
24212
24170
 
@@ -24681,6 +24639,7 @@ declare namespace chrome {
24681
24639
  *
24682
24640
  * @chrome-returns-extra since Chrome 96
24683
24641
  * @param details Which setting to change.
24642
+ * @returns Called at the completion of the set operation.
24684
24643
  */
24685
24644
  set(
24686
24645
 
@@ -24703,7 +24662,6 @@ declare namespace chrome {
24703
24662
  * Sets the value of a setting.
24704
24663
  *
24705
24664
  * @param details Which setting to change.
24706
- * @param callback Called at the completion of the set operation.
24707
24665
  */
24708
24666
  set(
24709
24667
 
@@ -24729,6 +24687,7 @@ declare namespace chrome {
24729
24687
  *
24730
24688
  * @chrome-returns-extra since Chrome 96
24731
24689
  * @param details Which setting to clear.
24690
+ * @returns Called at the completion of the clear operation.
24732
24691
  */
24733
24692
  clear(
24734
24693
 
@@ -24745,7 +24704,6 @@ declare namespace chrome {
24745
24704
  * Clears the setting, restoring any default value.
24746
24705
  *
24747
24706
  * @param details Which setting to clear.
24748
- * @param callback Called at the completion of the clear operation.
24749
24707
  */
24750
24708
  clear(
24751
24709
 
@@ -24962,6 +24920,7 @@ declare namespace chrome {
24962
24920
  * Registers one or more user scripts for this extension.
24963
24921
  *
24964
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.
24965
24924
  */
24966
24925
  export function register(
24967
24926
 
@@ -24972,7 +24931,6 @@ declare namespace chrome {
24972
24931
  * Registers one or more user scripts for this extension.
24973
24932
  *
24974
24933
  * @param scripts Contains a list of user scripts to be registered.
24975
- * @param callback Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
24976
24934
  */
24977
24935
  export function register(
24978
24936
 
@@ -24985,6 +24943,7 @@ declare namespace chrome {
24985
24943
  * Returns all dynamically-registered user scripts for this extension.
24986
24944
  *
24987
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.
24988
24947
  */
24989
24948
  export function getScripts(
24990
24949
 
@@ -24995,7 +24954,6 @@ declare namespace chrome {
24995
24954
  * Returns all dynamically-registered user scripts for this extension.
24996
24955
  *
24997
24956
  * @param filter If specified, this method returns only the user scripts that match it.
24998
- * @param callback Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
24999
24957
  */
25000
24958
  export function getScripts(
25001
24959
 
@@ -25010,6 +24968,7 @@ declare namespace chrome {
25010
24968
  * Unregisters all dynamically-registered user scripts for this extension.
25011
24969
  *
25012
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.
25013
24972
  */
25014
24973
  export function unregister(
25015
24974
 
@@ -25020,7 +24979,6 @@ declare namespace chrome {
25020
24979
  * Unregisters all dynamically-registered user scripts for this extension.
25021
24980
  *
25022
24981
  * @param filter If specified, this method unregisters only the user scripts that match it.
25023
- * @param callback Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
25024
24982
  */
25025
24983
  export function unregister(
25026
24984
 
@@ -25033,6 +24991,7 @@ declare namespace chrome {
25033
24991
  * Updates one or more user scripts for this extension.
25034
24992
  *
25035
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.
25036
24995
  */
25037
24996
  export function update(
25038
24997
 
@@ -25043,7 +25002,6 @@ declare namespace chrome {
25043
25002
  * Updates one or more user scripts for this extension.
25044
25003
  *
25045
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.
25046
- * @param callback Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
25047
25005
  */
25048
25006
  export function update(
25049
25007
 
@@ -25080,6 +25038,7 @@ declare namespace chrome {
25080
25038
  * Configures the `` `USER_SCRIPT` `` execution environment.
25081
25039
  *
25082
25040
  * @param properties Contains the user script world configuration.
25041
+ * @returns Promise that resolves once the world has been configured.
25083
25042
  */
25084
25043
  export function configureWorld(
25085
25044
 
@@ -25090,7 +25049,6 @@ declare namespace chrome {
25090
25049
  * Configures the `` `USER_SCRIPT` `` execution environment.
25091
25050
  *
25092
25051
  * @param properties Contains the user script world configuration.
25093
- * @param callback Promise that resolves once the world has been configured.
25094
25052
  */
25095
25053
  export function configureWorld(
25096
25054
 
@@ -25102,6 +25060,7 @@ declare namespace chrome {
25102
25060
  /**
25103
25061
  * Retrieves all registered world configurations.
25104
25062
  *
25063
+ * @returns Promise that resolves with the registered world configurations.
25105
25064
  * @since Chrome 133
25106
25065
  */
25107
25066
  export function getWorldConfigurations(): Promise<WorldProperties[]>;
@@ -25109,7 +25068,6 @@ declare namespace chrome {
25109
25068
  /**
25110
25069
  * Retrieves all registered world configurations.
25111
25070
  *
25112
- * @param callback Promise that resolves with the registered world configurations.
25113
25071
  * @since Chrome 133
25114
25072
  */
25115
25073
  export function getWorldConfigurations(
@@ -25123,6 +25081,7 @@ declare namespace chrome {
25123
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.
25124
25082
  *
25125
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.
25126
25085
  * @since Chrome 133
25127
25086
  */
25128
25087
  export function resetWorldConfiguration(
@@ -25134,7 +25093,6 @@ declare namespace chrome {
25134
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.
25135
25094
  *
25136
25095
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
25137
- * @param callback Promise that resolves when the configuration is reset.
25138
25096
  * @since Chrome 133
25139
25097
  */
25140
25098
  export function resetWorldConfiguration(
@@ -25278,6 +25236,7 @@ declare namespace chrome {
25278
25236
  *
25279
25237
  * @chrome-returns-extra since Chrome 96
25280
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.
25281
25240
  */
25282
25241
  export function createConfig(
25283
25242
 
@@ -25288,7 +25247,6 @@ declare namespace chrome {
25288
25247
  * Creates a new VPN configuration that persists across multiple login sessions of the user.
25289
25248
  *
25290
25249
  * @param name The name of the VPN configuration.
25291
- * @param callback Returns a Promise which resolves when the configuration is created or rejects if there is an error.
25292
25250
  */
25293
25251
  export function createConfig(
25294
25252
 
@@ -25307,6 +25265,7 @@ declare namespace chrome {
25307
25265
  *
25308
25266
  * @chrome-returns-extra since Chrome 96
25309
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.
25310
25269
  */
25311
25270
  export function destroyConfig(
25312
25271
 
@@ -25317,7 +25276,6 @@ declare namespace chrome {
25317
25276
  * Destroys a VPN configuration created by the extension.
25318
25277
  *
25319
25278
  * @param id ID of the VPN configuration to destroy.
25320
- * @param callback Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
25321
25279
  */
25322
25280
  export function destroyConfig(
25323
25281
 
@@ -25331,6 +25289,7 @@ declare namespace chrome {
25331
25289
  *
25332
25290
  * @chrome-returns-extra since Chrome 96
25333
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.
25334
25293
  */
25335
25294
  export function setParameters(
25336
25295
 
@@ -25341,7 +25300,6 @@ declare namespace chrome {
25341
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.
25342
25301
  *
25343
25302
  * @param parameters The parameters for the VPN session.
25344
- * @param callback Returns a Promise which resolves when the parameters are set or rejects if there is an error.
25345
25303
  */
25346
25304
  export function setParameters(
25347
25305
 
@@ -25355,6 +25313,7 @@ declare namespace chrome {
25355
25313
  *
25356
25314
  * @chrome-returns-extra since Chrome 96
25357
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.
25358
25317
  */
25359
25318
  export function sendPacket(
25360
25319
 
@@ -25365,7 +25324,6 @@ declare namespace chrome {
25365
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.
25366
25325
  *
25367
25326
  * @param data The IP packet to be sent to the platform.
25368
- * @param callback Returns a Promise which resolves when the packet is sent or rejects if there is an error.
25369
25327
  */
25370
25328
  export function sendPacket(
25371
25329
 
@@ -25379,6 +25337,7 @@ declare namespace chrome {
25379
25337
  *
25380
25338
  * @chrome-returns-extra since Chrome 96
25381
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.
25382
25341
  */
25383
25342
  export function notifyConnectionStateChanged(
25384
25343
 
@@ -25389,7 +25348,6 @@ declare namespace chrome {
25389
25348
  * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
25390
25349
  *
25391
25350
  * @param state The VPN session state of the VPN client.
25392
- * @param callback Returns a Promise which resolves when the notification is complete or rejects if there is an error.
25393
25351
  */
25394
25352
  export function notifyConnectionStateChanged(
25395
25353