chrome-types 0.1.404 → 0.1.406

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/_all.d.ts +290 -373
  2. package/index.d.ts +205 -263
  3. package/package.json +2 -2
package/_all.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Thu Jan 01 2026 22:35:03 GMT+0000 (Coordinated Universal Time)
18
- // Built at 5b92a5a0fc3489f88b8d512004010475d4ae484a
17
+ // Generated on Wed Jan 07 2026 11:21:45 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 63430eaeb62bb0431b4e1b9cd67c91c51556da8e
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -786,6 +786,7 @@ declare namespace chrome {
786
786
  * @chrome-returns-extra since Chrome 111
787
787
  * @param name Optional name to identify this alarm. Defaults to the empty string.
788
788
  * @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`.
789
+ * @returns Promise that resolves when the alarm has been created.
789
790
  */
790
791
  export function create(
791
792
 
@@ -803,6 +804,7 @@ declare namespace chrome {
803
804
  *
804
805
  * @chrome-returns-extra since Chrome 111
805
806
  * @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`.
807
+ * @returns Promise that resolves when the alarm has been created.
806
808
  */
807
809
  export function create(
808
810
 
@@ -818,7 +820,6 @@ declare namespace chrome {
818
820
  *
819
821
  * @param name Optional name to identify this alarm. Defaults to the empty string.
820
822
  * @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`.
821
- * @param callback Invoked when the alarm has been created.
822
823
  */
823
824
  export function create(
824
825
 
@@ -840,7 +841,6 @@ declare namespace chrome {
840
841
  * 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.
841
842
  *
842
843
  * @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`.
843
- * @param callback Invoked when the alarm has been created.
844
844
  */
845
845
  export function create(
846
846
 
@@ -1627,6 +1627,13 @@ declare namespace chrome {
1627
1627
  * To automatically remember the positions of windows you can give them ids. If a window has an id, This id is used to remember the size and position of the window whenever it is moved or resized. This size and position is then used instead of the specified bounds on subsequent opening of a window with the same id. If you need to open a window with an id at a location other than the remembered default, you can create it hidden, move it to the desired location, then show it.
1628
1628
  *
1629
1629
  * @chrome-returns-extra since Chrome 117
1630
+ * @returns Called in the creating window (parent) before the load event is called in the created window (child). The parent can set fields or functions on the child usable from onload. E.g. background.js:
1631
+
1632
+ `function(createdWindow) { createdWindow.contentWindow.foo = function () { }; };`
1633
+
1634
+ window.js:
1635
+
1636
+ `window.onload = function () { foo(); }`
1630
1637
  */
1631
1638
  export function create(
1632
1639
 
@@ -1641,16 +1648,6 @@ declare namespace chrome {
1641
1648
  * To set the position, size and constraints of the window, use the `innerBounds` or `outerBounds` properties. Inner bounds do not include window decorations. Outer bounds include the window's title bar and frame. Note that the padding between the inner and outer bounds is determined by the OS. Therefore setting the same property for both inner and outer bounds is considered an error (for example, setting both `innerBounds.left` and `outerBounds.left`).
1642
1649
  *
1643
1650
  * To automatically remember the positions of windows you can give them ids. If a window has an id, This id is used to remember the size and position of the window whenever it is moved or resized. This size and position is then used instead of the specified bounds on subsequent opening of a window with the same id. If you need to open a window with an id at a location other than the remembered default, you can create it hidden, move it to the desired location, then show it.
1644
- *
1645
- * @param callback
1646
-
1647
- Called in the creating window (parent) before the load event is called in the created window (child). The parent can set fields or functions on the child usable from onload. E.g. background.js:
1648
-
1649
- `function(createdWindow) { createdWindow.contentWindow.foo = function () { }; };`
1650
-
1651
- window.js:
1652
-
1653
- `window.onload = function () { foo(); }`
1654
1651
  */
1655
1652
  export function create(
1656
1653
 
@@ -1734,6 +1731,7 @@ declare namespace chrome {
1734
1731
  * @chrome-returns-extra since Chrome 132
1735
1732
  * @param app The extension id of the app to be embedded.
1736
1733
  * @param data Optional developer specified data that the app to be embedded can use when making an embedding decision.
1734
+ * @returns An optional function that's called after the embedding request is completed.
1737
1735
  */
1738
1736
  export function connect(
1739
1737
 
@@ -1747,7 +1745,6 @@ declare namespace chrome {
1747
1745
  *
1748
1746
  * @param app The extension id of the app to be embedded.
1749
1747
  * @param data Optional developer specified data that the app to be embedded can use when making an embedding decision.
1750
- * @param callback An optional function that's called after the embedding request is completed.
1751
1748
  */
1752
1749
  export function connect(
1753
1750
 
@@ -1920,6 +1917,7 @@ declare namespace chrome {
1920
1917
  *
1921
1918
  * @chrome-returns-extra since Chrome 116
1922
1919
  * @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.
1920
+ * @returns Reports the requested list of audio devices.
1923
1921
  */
1924
1922
  export function getDevices(
1925
1923
 
@@ -1930,7 +1928,6 @@ declare namespace chrome {
1930
1928
  * Gets a list of audio devices filtered based on `filter`.
1931
1929
  *
1932
1930
  * @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.
1933
- * @param callback Reports the requested list of audio devices.
1934
1931
  */
1935
1932
  export function getDevices(
1936
1933
 
@@ -2001,6 +1998,7 @@ declare namespace chrome {
2001
1998
  *
2002
1999
  * @chrome-returns-extra since Chrome 116
2003
2000
  * @param streamType Stream type for which mute state should be fetched.
2001
+ * @returns Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
2004
2002
  */
2005
2003
  export function getMute(
2006
2004
 
@@ -2011,7 +2009,6 @@ declare namespace chrome {
2011
2009
  * Gets the system-wide mute state for the specified stream type.
2012
2010
  *
2013
2011
  * @param streamType Stream type for which mute state should be fetched.
2014
- * @param callback Callback reporting whether mute is set or not for specified stream type.
2015
2012
  */
2016
2013
  export function getMute(
2017
2014
 
@@ -2255,13 +2252,12 @@ declare namespace chrome {
2255
2252
  * Get information about the Bluetooth adapter.
2256
2253
  *
2257
2254
  * @chrome-returns-extra since Chrome 91
2255
+ * @returns Called with an AdapterState object describing the adapter state.
2258
2256
  */
2259
2257
  export function getAdapterState(): Promise<AdapterState>;
2260
2258
 
2261
2259
  /**
2262
2260
  * Get information about the Bluetooth adapter.
2263
- *
2264
- * @param callback Called with an AdapterState object describing the adapter state.
2265
2261
  */
2266
2262
  export function getAdapterState(
2267
2263
 
@@ -2278,6 +2274,7 @@ declare namespace chrome {
2278
2274
  *
2279
2275
  * @chrome-returns-extra since Chrome 91
2280
2276
  * @param deviceAddress Address of device to get.
2277
+ * @returns Called with the Device object describing the device.
2281
2278
  */
2282
2279
  export function getDevice(
2283
2280
 
@@ -2288,7 +2285,6 @@ declare namespace chrome {
2288
2285
  * Get information about a Bluetooth device known to the system.
2289
2286
  *
2290
2287
  * @param deviceAddress Address of device to get.
2291
- * @param callback Called with the Device object describing the device.
2292
2288
  */
2293
2289
  export function getDevice(
2294
2290
 
@@ -2307,6 +2303,7 @@ declare namespace chrome {
2307
2303
  *
2308
2304
  * @chrome-returns-extra since Chrome 91
2309
2305
  * @param filter Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to `{}`, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned.
2306
+ * @returns Called when the search is completed.
2310
2307
  */
2311
2308
  export function getDevices(
2312
2309
 
@@ -2320,7 +2317,6 @@ declare namespace chrome {
2320
2317
  * Get a list of Bluetooth devices known to the system, including paired and recently discovered devices.
2321
2318
  *
2322
2319
  * @param filter Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to `{}`, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned.
2323
- * @param callback Called when the search is completed.
2324
2320
  */
2325
2321
  export function getDevices(
2326
2322
 
@@ -2343,6 +2339,7 @@ declare namespace chrome {
2343
2339
  * Discovery will fail to start if this application has already called startDiscovery. Discovery can be resource intensive: stopDiscovery should be called as soon as possible.
2344
2340
  *
2345
2341
  * @chrome-returns-extra since Chrome 91
2342
+ * @returns Called to indicate success or failure.
2346
2343
  */
2347
2344
  export function startDiscovery(): Promise<void>;
2348
2345
 
@@ -2350,8 +2347,6 @@ declare namespace chrome {
2350
2347
  * Start discovery. Newly discovered devices will be returned via the onDeviceAdded event. Previously discovered devices already known to the adapter must be obtained using getDevices and will only be updated using the `onDeviceChanged` event if information about them changes.
2351
2348
  *
2352
2349
  * Discovery will fail to start if this application has already called startDiscovery. Discovery can be resource intensive: stopDiscovery should be called as soon as possible.
2353
- *
2354
- * @param callback Called to indicate success or failure.
2355
2350
  */
2356
2351
  export function startDiscovery(
2357
2352
 
@@ -2362,13 +2357,12 @@ declare namespace chrome {
2362
2357
  * Stop discovery.
2363
2358
  *
2364
2359
  * @chrome-returns-extra since Chrome 91
2360
+ * @returns Called to indicate success or failure.
2365
2361
  */
2366
2362
  export function stopDiscovery(): Promise<void>;
2367
2363
 
2368
2364
  /**
2369
2365
  * Stop discovery.
2370
- *
2371
- * @param callback Called to indicate success or failure.
2372
2366
  */
2373
2367
  export function stopDiscovery(
2374
2368
 
@@ -2715,6 +2709,7 @@ declare namespace chrome {
2715
2709
  * @chrome-returns-extra since Chrome 91
2716
2710
  * @param deviceAddress The Bluetooth address of the remote device to which a GATT connection should be opened.
2717
2711
  * @param properties Connection properties (optional).
2712
+ * @returns Called when the connect request has completed.
2718
2713
  */
2719
2714
  export function connect(
2720
2715
 
@@ -2728,7 +2723,6 @@ declare namespace chrome {
2728
2723
  *
2729
2724
  * @param deviceAddress The Bluetooth address of the remote device to which a GATT connection should be opened.
2730
2725
  * @param properties Connection properties (optional).
2731
- * @param callback Called when the connect request has completed.
2732
2726
  */
2733
2727
  export function connect(
2734
2728
 
@@ -2744,6 +2738,7 @@ declare namespace chrome {
2744
2738
  *
2745
2739
  * @chrome-returns-extra since Chrome 91
2746
2740
  * @param deviceAddress The Bluetooth address of the remote device.
2741
+ * @returns Called when the disconnect request has completed.
2747
2742
  */
2748
2743
  export function disconnect(
2749
2744
 
@@ -2754,7 +2749,6 @@ declare namespace chrome {
2754
2749
  * Closes the app's connection to the device with the given address. Note that this will not always destroy the physical link itself, since there may be other apps with open connections.
2755
2750
  *
2756
2751
  * @param deviceAddress The Bluetooth address of the remote device.
2757
- * @param callback Called when the disconnect request has completed.
2758
2752
  */
2759
2753
  export function disconnect(
2760
2754
 
@@ -2768,6 +2762,7 @@ declare namespace chrome {
2768
2762
  *
2769
2763
  * @chrome-returns-extra since Chrome 91
2770
2764
  * @param serviceId The instance ID of the requested GATT service.
2765
+ * @returns Called with the requested Service object.
2771
2766
  */
2772
2767
  export function getService(
2773
2768
 
@@ -2778,7 +2773,6 @@ declare namespace chrome {
2778
2773
  * Get the GATT service with the given instance ID.
2779
2774
  *
2780
2775
  * @param serviceId The instance ID of the requested GATT service.
2781
- * @param callback Called with the requested Service object.
2782
2776
  */
2783
2777
  export function getService(
2784
2778
 
@@ -2794,6 +2788,7 @@ declare namespace chrome {
2794
2788
  *
2795
2789
  * @chrome-returns-extra since Chrome 91
2796
2790
  * @param service The service to create.
2791
+ * @returns Called with the created services's unique ID.
2797
2792
  * @since Chrome 52
2798
2793
  */
2799
2794
  export function createService(
@@ -2805,7 +2800,6 @@ declare namespace chrome {
2805
2800
  * Create a locally hosted GATT service. This service can be registered to be available on a local GATT server. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
2806
2801
  *
2807
2802
  * @param service The service to create.
2808
- * @param callback Called with the created services's unique ID.
2809
2803
  * @since Chrome 52
2810
2804
  */
2811
2805
  export function createService(
@@ -2824,6 +2818,7 @@ declare namespace chrome {
2824
2818
  *
2825
2819
  * @chrome-returns-extra since Chrome 91
2826
2820
  * @param deviceAddress The Bluetooth address of the remote device whose GATT services should be returned.
2821
+ * @returns Called with the list of requested Service objects.
2827
2822
  */
2828
2823
  export function getServices(
2829
2824
 
@@ -2836,7 +2831,6 @@ declare namespace chrome {
2836
2831
  * _Note:_ If service discovery is not yet complete on the device, this API will return a subset (possibly empty) of services. A work around is to add a time based delay and/or call repeatedly until the expected number of services is returned.
2837
2832
  *
2838
2833
  * @param deviceAddress The Bluetooth address of the remote device whose GATT services should be returned.
2839
- * @param callback Called with the list of requested Service objects.
2840
2834
  */
2841
2835
  export function getServices(
2842
2836
 
@@ -2852,6 +2846,7 @@ declare namespace chrome {
2852
2846
  *
2853
2847
  * @chrome-returns-extra since Chrome 91
2854
2848
  * @param characteristicId The instance ID of the requested GATT characteristic.
2849
+ * @returns Called with the requested Characteristic object.
2855
2850
  */
2856
2851
  export function getCharacteristic(
2857
2852
 
@@ -2862,7 +2857,6 @@ declare namespace chrome {
2862
2857
  * Get the GATT characteristic with the given instance ID that belongs to the given GATT service, if the characteristic exists.
2863
2858
  *
2864
2859
  * @param characteristicId The instance ID of the requested GATT characteristic.
2865
- * @param callback Called with the requested Characteristic object.
2866
2860
  */
2867
2861
  export function getCharacteristic(
2868
2862
 
@@ -2879,6 +2873,7 @@ declare namespace chrome {
2879
2873
  * @chrome-returns-extra since Chrome 91
2880
2874
  * @param characteristic The characteristic to create.
2881
2875
  * @param serviceId ID of the service to create this characteristic for.
2876
+ * @returns Called with the created characteristic's unique ID.
2882
2877
  * @since Chrome 52
2883
2878
  */
2884
2879
  export function createCharacteristic(
@@ -2893,7 +2888,6 @@ declare namespace chrome {
2893
2888
  *
2894
2889
  * @param characteristic The characteristic to create.
2895
2890
  * @param serviceId ID of the service to create this characteristic for.
2896
- * @param callback Called with the created characteristic's unique ID.
2897
2891
  * @since Chrome 52
2898
2892
  */
2899
2893
  export function createCharacteristic(
@@ -2912,6 +2906,7 @@ declare namespace chrome {
2912
2906
  *
2913
2907
  * @chrome-returns-extra since Chrome 91
2914
2908
  * @param serviceId The instance ID of the GATT service whose characteristics should be returned.
2909
+ * @returns Called with the list of characteristics that belong to the given service.
2915
2910
  */
2916
2911
  export function getCharacteristics(
2917
2912
 
@@ -2922,7 +2917,6 @@ declare namespace chrome {
2922
2917
  * Get a list of all discovered GATT characteristics that belong to the given service.
2923
2918
  *
2924
2919
  * @param serviceId The instance ID of the GATT service whose characteristics should be returned.
2925
- * @param callback Called with the list of characteristics that belong to the given service.
2926
2920
  */
2927
2921
  export function getCharacteristics(
2928
2922
 
@@ -2938,6 +2932,7 @@ declare namespace chrome {
2938
2932
  *
2939
2933
  * @chrome-returns-extra since Chrome 91
2940
2934
  * @param serviceId The instance ID of the GATT service whose included services should be returned.
2935
+ * @returns Called with the list of GATT services included from the given service.
2941
2936
  */
2942
2937
  export function getIncludedServices(
2943
2938
 
@@ -2948,7 +2943,6 @@ declare namespace chrome {
2948
2943
  * Get a list of GATT services that are included by the given service.
2949
2944
  *
2950
2945
  * @param serviceId The instance ID of the GATT service whose included services should be returned.
2951
- * @param callback Called with the list of GATT services included from the given service.
2952
2946
  */
2953
2947
  export function getIncludedServices(
2954
2948
 
@@ -2964,6 +2958,7 @@ declare namespace chrome {
2964
2958
  *
2965
2959
  * @chrome-returns-extra since Chrome 91
2966
2960
  * @param descriptorId The instance ID of the requested GATT characteristic descriptor.
2961
+ * @returns Called with the requested Descriptor object.
2967
2962
  */
2968
2963
  export function getDescriptor(
2969
2964
 
@@ -2974,7 +2969,6 @@ declare namespace chrome {
2974
2969
  * Get the GATT characteristic descriptor with the given instance ID.
2975
2970
  *
2976
2971
  * @param descriptorId The instance ID of the requested GATT characteristic descriptor.
2977
- * @param callback Called with the requested Descriptor object.
2978
2972
  */
2979
2973
  export function getDescriptor(
2980
2974
 
@@ -2991,6 +2985,7 @@ declare namespace chrome {
2991
2985
  * @chrome-returns-extra since Chrome 91
2992
2986
  * @param descriptor The descriptor to create.
2993
2987
  * @param characteristicId ID of the characteristic to create this descriptor for.
2988
+ * @returns Called with the created descriptor's unique ID.
2994
2989
  * @since Chrome 52
2995
2990
  */
2996
2991
  export function createDescriptor(
@@ -3005,7 +3000,6 @@ declare namespace chrome {
3005
3000
  *
3006
3001
  * @param descriptor The descriptor to create.
3007
3002
  * @param characteristicId ID of the characteristic to create this descriptor for.
3008
- * @param callback Called with the created descriptor's unique ID.
3009
3003
  * @since Chrome 52
3010
3004
  */
3011
3005
  export function createDescriptor(
@@ -3024,6 +3018,7 @@ declare namespace chrome {
3024
3018
  *
3025
3019
  * @chrome-returns-extra since Chrome 91
3026
3020
  * @param characteristicId The instance ID of the GATT characteristic whose descriptors should be returned.
3021
+ * @returns Called with the list of descriptors that belong to the given characteristic.
3027
3022
  */
3028
3023
  export function getDescriptors(
3029
3024
 
@@ -3034,7 +3029,6 @@ declare namespace chrome {
3034
3029
  * Get a list of GATT characteristic descriptors that belong to the given characteristic.
3035
3030
  *
3036
3031
  * @param characteristicId The instance ID of the GATT characteristic whose descriptors should be returned.
3037
- * @param callback Called with the list of descriptors that belong to the given characteristic.
3038
3032
  */
3039
3033
  export function getDescriptors(
3040
3034
 
@@ -3050,6 +3044,7 @@ declare namespace chrome {
3050
3044
  *
3051
3045
  * @chrome-returns-extra since Chrome 91
3052
3046
  * @param characteristicId The instance ID of the GATT characteristic whose value should be read from the remote device.
3047
+ * @returns Called with the Characteristic object whose value was requested. The `value` field of the returned Characteristic object contains the result of the read request.
3053
3048
  */
3054
3049
  export function readCharacteristicValue(
3055
3050
 
@@ -3060,7 +3055,6 @@ declare namespace chrome {
3060
3055
  * Retrieve the value of a specified characteristic from a remote peripheral.
3061
3056
  *
3062
3057
  * @param characteristicId The instance ID of the GATT characteristic whose value should be read from the remote device.
3063
- * @param callback Called with the Characteristic object whose value was requested. The `value` field of the returned Characteristic object contains the result of the read request.
3064
3058
  */
3065
3059
  export function readCharacteristicValue(
3066
3060
 
@@ -3077,6 +3071,7 @@ declare namespace chrome {
3077
3071
  * @chrome-returns-extra since Chrome 91
3078
3072
  * @param characteristicId The instance ID of the GATT characteristic whose value should be written to.
3079
3073
  * @param value The value that should be sent to the remote characteristic as part of the write request.
3074
+ * @returns Called when the write request has completed.
3080
3075
  */
3081
3076
  export function writeCharacteristicValue(
3082
3077
 
@@ -3090,7 +3085,6 @@ declare namespace chrome {
3090
3085
  *
3091
3086
  * @param characteristicId The instance ID of the GATT characteristic whose value should be written to.
3092
3087
  * @param value The value that should be sent to the remote characteristic as part of the write request.
3093
- * @param callback Called when the write request has completed.
3094
3088
  */
3095
3089
  export function writeCharacteristicValue(
3096
3090
 
@@ -3107,6 +3101,7 @@ declare namespace chrome {
3107
3101
  * @chrome-returns-extra since Chrome 91
3108
3102
  * @param characteristicId The instance ID of the GATT characteristic that notifications should be enabled on.
3109
3103
  * @param properties Notification session properties (optional).
3104
+ * @returns Called when the request has completed.
3110
3105
  */
3111
3106
  export function startCharacteristicNotifications(
3112
3107
 
@@ -3120,7 +3115,6 @@ declare namespace chrome {
3120
3115
  *
3121
3116
  * @param characteristicId The instance ID of the GATT characteristic that notifications should be enabled on.
3122
3117
  * @param properties Notification session properties (optional).
3123
- * @param callback Called when the request has completed.
3124
3118
  */
3125
3119
  export function startCharacteristicNotifications(
3126
3120
 
@@ -3136,6 +3130,7 @@ declare namespace chrome {
3136
3130
  *
3137
3131
  * @chrome-returns-extra since Chrome 91
3138
3132
  * @param characteristicId The instance ID of the GATT characteristic on which this app's notification session should be stopped.
3133
+ * @returns Called when the request has completed (optional).
3139
3134
  */
3140
3135
  export function stopCharacteristicNotifications(
3141
3136
 
@@ -3146,7 +3141,6 @@ declare namespace chrome {
3146
3141
  * Disable value notifications/indications from the specified characteristic. After a successful call, the application will stop receiving notifications/indications from this characteristic.
3147
3142
  *
3148
3143
  * @param characteristicId The instance ID of the GATT characteristic on which this app's notification session should be stopped.
3149
- * @param callback Called when the request has completed (optional).
3150
3144
  */
3151
3145
  export function stopCharacteristicNotifications(
3152
3146
 
@@ -3160,6 +3154,7 @@ declare namespace chrome {
3160
3154
  *
3161
3155
  * @chrome-returns-extra since Chrome 91
3162
3156
  * @param characteristicId The characteristic to send the notication for.
3157
+ * @returns Callback called once the notification or indication has been sent successfully.
3163
3158
  * @since Chrome 52
3164
3159
  */
3165
3160
  export function notifyCharacteristicValueChanged(
@@ -3173,7 +3168,6 @@ declare namespace chrome {
3173
3168
  * Notify a remote device of a new value for a characteristic. If the shouldIndicate flag in the notification object is true, an indication will be sent instead of a notification. Note, the characteristic needs to correctly set the 'notify' or 'indicate' property during creation for this call to succeed. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
3174
3169
  *
3175
3170
  * @param characteristicId The characteristic to send the notication for.
3176
- * @param callback Callback called once the notification or indication has been sent successfully.
3177
3171
  * @since Chrome 52
3178
3172
  */
3179
3173
  export function notifyCharacteristicValueChanged(
@@ -3190,6 +3184,7 @@ declare namespace chrome {
3190
3184
  *
3191
3185
  * @chrome-returns-extra since Chrome 91
3192
3186
  * @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be read from the remote device.
3187
+ * @returns Called with the Descriptor object whose value was requested. The `value` field of the returned Descriptor object contains the result of the read request.
3193
3188
  */
3194
3189
  export function readDescriptorValue(
3195
3190
 
@@ -3200,7 +3195,6 @@ declare namespace chrome {
3200
3195
  * Retrieve the value of a specified characteristic descriptor from a remote peripheral.
3201
3196
  *
3202
3197
  * @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be read from the remote device.
3203
- * @param callback Called with the Descriptor object whose value was requested. The `value` field of the returned Descriptor object contains the result of the read request.
3204
3198
  */
3205
3199
  export function readDescriptorValue(
3206
3200
 
@@ -3217,6 +3211,7 @@ declare namespace chrome {
3217
3211
  * @chrome-returns-extra since Chrome 91
3218
3212
  * @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be written to.
3219
3213
  * @param value The value that should be sent to the remote descriptor as part of the write request.
3214
+ * @returns Called when the write request has completed.
3220
3215
  */
3221
3216
  export function writeDescriptorValue(
3222
3217
 
@@ -3230,7 +3225,6 @@ declare namespace chrome {
3230
3225
  *
3231
3226
  * @param descriptorId The instance ID of the GATT characteristic descriptor whose value should be written to.
3232
3227
  * @param value The value that should be sent to the remote descriptor as part of the write request.
3233
- * @param callback Called when the write request has completed.
3234
3228
  */
3235
3229
  export function writeDescriptorValue(
3236
3230
 
@@ -3246,6 +3240,7 @@ declare namespace chrome {
3246
3240
  *
3247
3241
  * @chrome-returns-extra since Chrome 91
3248
3242
  * @param serviceId Unique ID of a created service.
3243
+ * @returns Callback with the result of the register operation.
3249
3244
  * @since Chrome 52
3250
3245
  */
3251
3246
  export function registerService(
@@ -3257,7 +3252,6 @@ declare namespace chrome {
3257
3252
  * Register the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
3258
3253
  *
3259
3254
  * @param serviceId Unique ID of a created service.
3260
- * @param callback Callback with the result of the register operation.
3261
3255
  * @since Chrome 52
3262
3256
  */
3263
3257
  export function registerService(
@@ -3272,6 +3266,7 @@ declare namespace chrome {
3272
3266
  *
3273
3267
  * @chrome-returns-extra since Chrome 91
3274
3268
  * @param serviceId Unique ID of a current registered service.
3269
+ * @returns Callback with the result of the register operation.
3275
3270
  * @since Chrome 52
3276
3271
  */
3277
3272
  export function unregisterService(
@@ -3283,7 +3278,6 @@ declare namespace chrome {
3283
3278
  * Unregister the given service with the local GATT server. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
3284
3279
  *
3285
3280
  * @param serviceId Unique ID of a current registered service.
3286
- * @param callback Callback with the result of the register operation.
3287
3281
  * @since Chrome 52
3288
3282
  */
3289
3283
  export function unregisterService(
@@ -3298,6 +3292,7 @@ declare namespace chrome {
3298
3292
  *
3299
3293
  * @chrome-returns-extra since Chrome 91
3300
3294
  * @param serviceId Unique ID of a current registered service.
3295
+ * @returns Callback called once the service is removed.
3301
3296
  * @since Chrome 52
3302
3297
  */
3303
3298
  export function removeService(
@@ -3309,7 +3304,6 @@ declare namespace chrome {
3309
3304
  * Remove the specified service, unregistering it if it was registered. If the service ID is invalid, the lastError will be set. This function is only available if the app has both the bluetooth:low\_energy and the bluetooth:peripheral permissions set to true. The peripheral permission may not be available to all apps.
3310
3305
  *
3311
3306
  * @param serviceId Unique ID of a current registered service.
3312
- * @param callback Callback called once the service is removed.
3313
3307
  * @since Chrome 52
3314
3308
  */
3315
3309
  export function removeService(
@@ -3324,6 +3318,7 @@ declare namespace chrome {
3324
3318
  *
3325
3319
  * @chrome-returns-extra since Chrome 91
3326
3320
  * @param advertisement The advertisement to advertise.
3321
+ * @returns Called once the registeration is done and we've started advertising. Returns the id of the created advertisement.
3327
3322
  * @since Chrome 47
3328
3323
  */
3329
3324
  export function registerAdvertisement(
@@ -3335,7 +3330,6 @@ declare namespace chrome {
3335
3330
  * Create an advertisement and register it for advertising. To call this function, the app must have the bluetooth:low\_energy and bluetooth:peripheral permissions set to true. Additionally this API is only available to auto launched apps in Kiosk Mode or by setting the '--enable-ble-advertising-in-apps' command-line switch. See https://developer.chrome.com/apps/manifest/bluetooth Note: On some hardware, central and peripheral modes at the same time is supported but on hardware that doesn't support this, making this call will switch the device to peripheral mode. In the case of hardware which does not support both central and peripheral mode, attempting to use the device in both modes will lead to undefined behavior or prevent other central-role applications from behaving correctly (including the discovery of Bluetooth Low Energy devices).
3336
3331
  *
3337
3332
  * @param advertisement The advertisement to advertise.
3338
- * @param callback Called once the registeration is done and we've started advertising. Returns the id of the created advertisement.
3339
3333
  * @since Chrome 47
3340
3334
  */
3341
3335
  export function registerAdvertisement(
@@ -3352,6 +3346,7 @@ declare namespace chrome {
3352
3346
  *
3353
3347
  * @chrome-returns-extra since Chrome 91
3354
3348
  * @param advertisementId Id of the advertisement to unregister.
3349
+ * @returns Called once the advertisement is unregistered and is no longer being advertised.
3355
3350
  * @since Chrome 47
3356
3351
  */
3357
3352
  export function unregisterAdvertisement(
@@ -3363,7 +3358,6 @@ declare namespace chrome {
3363
3358
  * Unregisters an advertisement and stops its advertising. If the advertisement fails to unregister the only way to stop advertising might be to restart the device.
3364
3359
  *
3365
3360
  * @param advertisementId Id of the advertisement to unregister.
3366
- * @param callback Called once the advertisement is unregistered and is no longer being advertised.
3367
3361
  * @since Chrome 47
3368
3362
  */
3369
3363
  export function unregisterAdvertisement(
@@ -3377,6 +3371,7 @@ declare namespace chrome {
3377
3371
  * Resets advertising on the current device. It will unregister and stop all existing advertisements.
3378
3372
  *
3379
3373
  * @chrome-returns-extra since Chrome 91
3374
+ * @returns Called once the advertisements are reset.
3380
3375
  * @since Chrome 61
3381
3376
  */
3382
3377
  export function resetAdvertising(): Promise<void>;
@@ -3384,7 +3379,6 @@ declare namespace chrome {
3384
3379
  /**
3385
3380
  * Resets advertising on the current device. It will unregister and stop all existing advertisements.
3386
3381
  *
3387
- * @param callback Called once the advertisements are reset.
3388
3382
  * @since Chrome 61
3389
3383
  */
3390
3384
  export function resetAdvertising(
@@ -3398,6 +3392,7 @@ declare namespace chrome {
3398
3392
  * @chrome-returns-extra since Chrome 91
3399
3393
  * @param minInterval Minimum interval between advertisments (in milliseconds). This cannot be lower than 20ms (as per the spec).
3400
3394
  * @param maxInterval Maximum interval between advertisments (in milliseconds). This cannot be more than 10240ms (as per the spec).
3395
+ * @returns Called once the interval has been set.
3401
3396
  * @since Chrome 55
3402
3397
  */
3403
3398
  export function setAdvertisingInterval(
@@ -3412,7 +3407,6 @@ declare namespace chrome {
3412
3407
  *
3413
3408
  * @param minInterval Minimum interval between advertisments (in milliseconds). This cannot be lower than 20ms (as per the spec).
3414
3409
  * @param maxInterval Maximum interval between advertisments (in milliseconds). This cannot be more than 10240ms (as per the spec).
3415
- * @param callback Called once the interval has been set.
3416
3410
  * @since Chrome 55
3417
3411
  */
3418
3412
  export function setAdvertisingInterval(
@@ -3643,6 +3637,7 @@ declare namespace chrome {
3643
3637
  *
3644
3638
  * @chrome-returns-extra since Chrome 91
3645
3639
  * @param properties The socket properties (optional).
3640
+ * @returns Called when the socket has been created.
3646
3641
  */
3647
3642
  export function create(
3648
3643
 
@@ -3653,7 +3648,6 @@ declare namespace chrome {
3653
3648
  * Creates a Bluetooth socket.
3654
3649
  *
3655
3650
  * @param properties The socket properties (optional).
3656
- * @param callback Called when the socket has been created.
3657
3651
  */
3658
3652
  export function create(
3659
3653
 
@@ -3673,6 +3667,7 @@ declare namespace chrome {
3673
3667
  * @chrome-returns-extra since Chrome 91
3674
3668
  * @param socketId The socket identifier.
3675
3669
  * @param properties The properties to update.
3670
+ * @returns Called when the properties are updated.
3676
3671
  */
3677
3672
  export function update(
3678
3673
 
@@ -3686,7 +3681,6 @@ declare namespace chrome {
3686
3681
  *
3687
3682
  * @param socketId The socket identifier.
3688
3683
  * @param properties The properties to update.
3689
- * @param callback Called when the properties are updated.
3690
3684
  */
3691
3685
  export function update(
3692
3686
 
@@ -3701,6 +3695,7 @@ declare namespace chrome {
3701
3695
  * Enables or disables a connected socket from receiving messages from its peer, or a listening socket from accepting new connections. The default value is "false". Pausing a connected socket is typically used by an application to throttle data sent by its peer. When a connected 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. When a listening socket is paused, new connections are accepted until its backlog is full then additional connection requests are refused. `onAccept` events are raised only when the socket is un-paused.
3702
3696
  *
3703
3697
  * @chrome-returns-extra since Chrome 91
3698
+ * @returns Callback from the `setPaused` method.
3704
3699
  */
3705
3700
  export function setPaused(
3706
3701
 
@@ -3711,8 +3706,6 @@ declare namespace chrome {
3711
3706
 
3712
3707
  /**
3713
3708
  * Enables or disables a connected socket from receiving messages from its peer, or a listening socket from accepting new connections. The default value is "false". Pausing a connected socket is typically used by an application to throttle data sent by its peer. When a connected 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. When a listening socket is paused, new connections are accepted until its backlog is full then additional connection requests are refused. `onAccept` events are raised only when the socket is un-paused.
3714
- *
3715
- * @param callback Callback from the `setPaused` method.
3716
3709
  */
3717
3710
  export function setPaused(
3718
3711
 
@@ -3730,6 +3723,7 @@ declare namespace chrome {
3730
3723
  * @param socketId The socket identifier.
3731
3724
  * @param uuid Service UUID to listen on.
3732
3725
  * @param options Optional additional options for the service.
3726
+ * @returns Called when listen operation completes.
3733
3727
  */
3734
3728
  export function listenUsingRfcomm(
3735
3729
 
@@ -3746,7 +3740,6 @@ declare namespace chrome {
3746
3740
  * @param socketId The socket identifier.
3747
3741
  * @param uuid Service UUID to listen on.
3748
3742
  * @param options Optional additional options for the service.
3749
- * @param callback Called when listen operation completes.
3750
3743
  */
3751
3744
  export function listenUsingRfcomm(
3752
3745
 
@@ -3766,6 +3759,7 @@ declare namespace chrome {
3766
3759
  * @param socketId The socket identifier.
3767
3760
  * @param uuid Service UUID to listen on.
3768
3761
  * @param options Optional additional options for the service.
3762
+ * @returns Called when listen operation completes.
3769
3763
  */
3770
3764
  export function listenUsingL2cap(
3771
3765
 
@@ -3782,7 +3776,6 @@ declare namespace chrome {
3782
3776
  * @param socketId The socket identifier.
3783
3777
  * @param uuid Service UUID to listen on.
3784
3778
  * @param options Optional additional options for the service.
3785
- * @param callback Called when listen operation completes.
3786
3779
  */
3787
3780
  export function listenUsingL2cap(
3788
3781
 
@@ -3802,6 +3795,7 @@ declare namespace chrome {
3802
3795
  * @param socketId The socket identifier.
3803
3796
  * @param address The address of the Bluetooth device.
3804
3797
  * @param uuid The UUID of the service to connect to.
3798
+ * @returns Called when the connect attempt is complete.
3805
3799
  */
3806
3800
  export function connect(
3807
3801
 
@@ -3818,7 +3812,6 @@ declare namespace chrome {
3818
3812
  * @param socketId The socket identifier.
3819
3813
  * @param address The address of the Bluetooth device.
3820
3814
  * @param uuid The UUID of the service to connect to.
3821
- * @param callback Called when the connect attempt is complete.
3822
3815
  */
3823
3816
  export function connect(
3824
3817
 
@@ -3836,6 +3829,7 @@ declare namespace chrome {
3836
3829
  *
3837
3830
  * @chrome-returns-extra since Chrome 91
3838
3831
  * @param socketId The socket identifier.
3832
+ * @returns Called when the disconnect attempt is complete.
3839
3833
  */
3840
3834
  export function disconnect(
3841
3835
 
@@ -3846,7 +3840,6 @@ declare namespace chrome {
3846
3840
  * Disconnects the socket. The socket identifier remains valid.
3847
3841
  *
3848
3842
  * @param socketId The socket identifier.
3849
- * @param callback Called when the disconnect attempt is complete.
3850
3843
  */
3851
3844
  export function disconnect(
3852
3845
 
@@ -3860,6 +3853,7 @@ declare namespace chrome {
3860
3853
  *
3861
3854
  * @chrome-returns-extra since Chrome 91
3862
3855
  * @param socketId The socket identifier.
3856
+ * @returns Called when the `close` operation completes.
3863
3857
  */
3864
3858
  export function close(
3865
3859
 
@@ -3870,7 +3864,6 @@ declare namespace chrome {
3870
3864
  * 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.
3871
3865
  *
3872
3866
  * @param socketId The socket identifier.
3873
- * @param callback Called when the `close` operation completes.
3874
3867
  */
3875
3868
  export function close(
3876
3869
 
@@ -3885,6 +3878,7 @@ declare namespace chrome {
3885
3878
  * @chrome-returns-extra since Chrome 91
3886
3879
  * @param socketId The socket identifier.
3887
3880
  * @param data The data to send.
3881
+ * @returns Called with the number of bytes sent.
3888
3882
  */
3889
3883
  export function send(
3890
3884
 
@@ -3898,7 +3892,6 @@ declare namespace chrome {
3898
3892
  *
3899
3893
  * @param socketId The socket identifier.
3900
3894
  * @param data The data to send.
3901
- * @param callback Called with the number of bytes sent.
3902
3895
  */
3903
3896
  export function send(
3904
3897
 
@@ -3919,6 +3912,7 @@ declare namespace chrome {
3919
3912
  *
3920
3913
  * @chrome-returns-extra since Chrome 91
3921
3914
  * @param socketId The socket identifier.
3915
+ * @returns Called when the socket state is available.
3922
3916
  */
3923
3917
  export function getInfo(
3924
3918
 
@@ -3929,7 +3923,6 @@ declare namespace chrome {
3929
3923
  * Retrieves the state of the given socket.
3930
3924
  *
3931
3925
  * @param socketId The socket identifier.
3932
- * @param callback Called when the socket state is available.
3933
3926
  */
3934
3927
  export function getInfo(
3935
3928
 
@@ -3947,13 +3940,12 @@ declare namespace chrome {
3947
3940
  * Retrieves the list of currently opened sockets owned by the application.
3948
3941
  *
3949
3942
  * @chrome-returns-extra since Chrome 91
3943
+ * @returns Called when the list of sockets is available.
3950
3944
  */
3951
3945
  export function getSockets(): Promise<SocketInfo[]>;
3952
3946
 
3953
3947
  /**
3954
3948
  * Retrieves the list of currently opened sockets owned by the application.
3955
- *
3956
- * @param callback Called when the list of sockets is available.
3957
3949
  */
3958
3950
  export function getSockets(
3959
3951
 
@@ -4500,6 +4492,7 @@ declare namespace chrome {
4500
4492
  *
4501
4493
  * @chrome-returns-extra since Chrome 117
4502
4494
  * @param options Configures how the tab should be opened.
4495
+ * @returns Called when the tab was successfully created, or failed to be created. If failed, {@link runtime.lastError} will be set.
4503
4496
  */
4504
4497
  export function openTab(
4505
4498
 
@@ -4510,7 +4503,6 @@ declare namespace chrome {
4510
4503
  * Opens a new tab in a browser window associated with the current application and Chrome profile. If no browser window for the Chrome profile is opened, a new one is opened prior to creating the new tab.
4511
4504
  *
4512
4505
  * @param options Configures how the tab should be opened.
4513
- * @param callback Called when the tab was successfully created, or failed to be created. If failed, {@link runtime.lastError} will be set.
4514
4506
  */
4515
4507
  export function openTab(
4516
4508
 
@@ -5111,6 +5103,7 @@ declare namespace chrome {
5111
5103
  *
5112
5104
  * @chrome-returns-extra since Chrome 96
5113
5105
  * @param dataToRemove The set of data types to remove.
5106
+ * @returns Resolves when deletion has completed.
5114
5107
  */
5115
5108
  export function remove(
5116
5109
 
@@ -5123,7 +5116,6 @@ declare namespace chrome {
5123
5116
  * Clears various types of browsing data stored in a user's profile.
5124
5117
  *
5125
5118
  * @param dataToRemove The set of data types to remove.
5126
- * @param callback Resolves when deletion has completed.
5127
5119
  */
5128
5120
  export function remove(
5129
5121
 
@@ -5138,6 +5130,7 @@ declare namespace chrome {
5138
5130
  * Clears websites' appcache data.
5139
5131
  *
5140
5132
  * @chrome-returns-extra since Chrome 96
5133
+ * @returns Resolves when websites' appcache data has been cleared.
5141
5134
  */
5142
5135
  export function removeAppcache(
5143
5136
 
@@ -5146,8 +5139,6 @@ declare namespace chrome {
5146
5139
 
5147
5140
  /**
5148
5141
  * Clears websites' appcache data.
5149
- *
5150
- * @param callback Resolves when websites' appcache data has been cleared.
5151
5142
  */
5152
5143
  export function removeAppcache(
5153
5144
 
@@ -5160,6 +5151,7 @@ declare namespace chrome {
5160
5151
  * Clears the browser's cache.
5161
5152
  *
5162
5153
  * @chrome-returns-extra since Chrome 96
5154
+ * @returns Resolves when the browser's cache has been cleared.
5163
5155
  */
5164
5156
  export function removeCache(
5165
5157
 
@@ -5168,8 +5160,6 @@ declare namespace chrome {
5168
5160
 
5169
5161
  /**
5170
5162
  * Clears the browser's cache.
5171
- *
5172
- * @param callback Resolves when the browser's cache has been cleared.
5173
5163
  */
5174
5164
  export function removeCache(
5175
5165
 
@@ -5182,6 +5172,7 @@ declare namespace chrome {
5182
5172
  * Clears websites' cache storage data.
5183
5173
  *
5184
5174
  * @chrome-returns-extra since Chrome 96
5175
+ * @returns Resolves when websites' cache storage has been cleared.
5185
5176
  * @since Chrome 72
5186
5177
  */
5187
5178
  export function removeCacheStorage(
@@ -5192,7 +5183,6 @@ declare namespace chrome {
5192
5183
  /**
5193
5184
  * Clears websites' cache storage data.
5194
5185
  *
5195
- * @param callback Resolves when websites' cache storage has been cleared.
5196
5186
  * @since Chrome 72
5197
5187
  */
5198
5188
  export function removeCacheStorage(
@@ -5206,6 +5196,7 @@ declare namespace chrome {
5206
5196
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
5207
5197
  *
5208
5198
  * @chrome-returns-extra since Chrome 96
5199
+ * @returns Resolves when the browser's cookies and server-bound certificates have been cleared.
5209
5200
  */
5210
5201
  export function removeCookies(
5211
5202
 
@@ -5214,8 +5205,6 @@ declare namespace chrome {
5214
5205
 
5215
5206
  /**
5216
5207
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
5217
- *
5218
- * @param callback Resolves when the browser's cookies and server-bound certificates have been cleared.
5219
5208
  */
5220
5209
  export function removeCookies(
5221
5210
 
@@ -5228,6 +5217,7 @@ declare namespace chrome {
5228
5217
  * Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
5229
5218
  *
5230
5219
  * @chrome-returns-extra since Chrome 96
5220
+ * @returns Resolves when the browser's list of downloaded files has been cleared.
5231
5221
  */
5232
5222
  export function removeDownloads(
5233
5223
 
@@ -5236,8 +5226,6 @@ declare namespace chrome {
5236
5226
 
5237
5227
  /**
5238
5228
  * Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
5239
- *
5240
- * @param callback Resolves when the browser's list of downloaded files has been cleared.
5241
5229
  */
5242
5230
  export function removeDownloads(
5243
5231
 
@@ -5250,6 +5238,7 @@ declare namespace chrome {
5250
5238
  * Clears websites' file system data.
5251
5239
  *
5252
5240
  * @chrome-returns-extra since Chrome 96
5241
+ * @returns Resolves when websites' file systems have been cleared.
5253
5242
  */
5254
5243
  export function removeFileSystems(
5255
5244
 
@@ -5258,8 +5247,6 @@ declare namespace chrome {
5258
5247
 
5259
5248
  /**
5260
5249
  * Clears websites' file system data.
5261
- *
5262
- * @param callback Resolves when websites' file systems have been cleared.
5263
5250
  */
5264
5251
  export function removeFileSystems(
5265
5252
 
@@ -5272,6 +5259,7 @@ declare namespace chrome {
5272
5259
  * Clears the browser's stored form data (autofill).
5273
5260
  *
5274
5261
  * @chrome-returns-extra since Chrome 96
5262
+ * @returns Resolves when the browser's form data has been cleared.
5275
5263
  */
5276
5264
  export function removeFormData(
5277
5265
 
@@ -5280,8 +5268,6 @@ declare namespace chrome {
5280
5268
 
5281
5269
  /**
5282
5270
  * Clears the browser's stored form data (autofill).
5283
- *
5284
- * @param callback Resolves when the browser's form data has been cleared.
5285
5271
  */
5286
5272
  export function removeFormData(
5287
5273
 
@@ -5294,6 +5280,7 @@ declare namespace chrome {
5294
5280
  * Clears the browser's history.
5295
5281
  *
5296
5282
  * @chrome-returns-extra since Chrome 96
5283
+ * @returns Resolves when the browser's history has cleared.
5297
5284
  */
5298
5285
  export function removeHistory(
5299
5286
 
@@ -5302,8 +5289,6 @@ declare namespace chrome {
5302
5289
 
5303
5290
  /**
5304
5291
  * Clears the browser's history.
5305
- *
5306
- * @param callback Resolves when the browser's history has cleared.
5307
5292
  */
5308
5293
  export function removeHistory(
5309
5294
 
@@ -5316,6 +5301,7 @@ declare namespace chrome {
5316
5301
  * Clears websites' IndexedDB data.
5317
5302
  *
5318
5303
  * @chrome-returns-extra since Chrome 96
5304
+ * @returns Resolves when websites' IndexedDB data has been cleared.
5319
5305
  */
5320
5306
  export function removeIndexedDB(
5321
5307
 
@@ -5324,8 +5310,6 @@ declare namespace chrome {
5324
5310
 
5325
5311
  /**
5326
5312
  * Clears websites' IndexedDB data.
5327
- *
5328
- * @param callback Resolves when websites' IndexedDB data has been cleared.
5329
5313
  */
5330
5314
  export function removeIndexedDB(
5331
5315
 
@@ -5338,6 +5322,7 @@ declare namespace chrome {
5338
5322
  * Clears websites' local storage data.
5339
5323
  *
5340
5324
  * @chrome-returns-extra since Chrome 96
5325
+ * @returns Resolves when websites' local storage has been cleared.
5341
5326
  */
5342
5327
  export function removeLocalStorage(
5343
5328
 
@@ -5346,8 +5331,6 @@ declare namespace chrome {
5346
5331
 
5347
5332
  /**
5348
5333
  * Clears websites' local storage data.
5349
- *
5350
- * @param callback Resolves when websites' local storage has been cleared.
5351
5334
  */
5352
5335
  export function removeLocalStorage(
5353
5336
 
@@ -5360,6 +5343,7 @@ declare namespace chrome {
5360
5343
  * Clears plugins' data.
5361
5344
  *
5362
5345
  * @chrome-returns-extra since Chrome 96
5346
+ * @returns Resolves when plugins' data has been cleared.
5363
5347
  * @deprecated Support for Flash has been removed. This function has no effect.
5364
5348
  * @chrome-deprecated-since Chrome 88
5365
5349
  */
@@ -5371,7 +5355,6 @@ declare namespace chrome {
5371
5355
  /**
5372
5356
  * Clears plugins' data.
5373
5357
  *
5374
- * @param callback Resolves when plugins' data has been cleared.
5375
5358
  * @deprecated Support for Flash has been removed. This function has no effect.
5376
5359
  * @chrome-deprecated-since Chrome 88
5377
5360
  */
@@ -5386,6 +5369,7 @@ declare namespace chrome {
5386
5369
  * Clears the browser's stored passwords.
5387
5370
  *
5388
5371
  * @chrome-returns-extra since Chrome 96
5372
+ * @returns Resolves when the browser's passwords have been cleared.
5389
5373
  * @deprecated Support for password deletion through extensions has been removed. This function has no effect.
5390
5374
  */
5391
5375
  export function removePasswords(
@@ -5396,7 +5380,6 @@ declare namespace chrome {
5396
5380
  /**
5397
5381
  * Clears the browser's stored passwords.
5398
5382
  *
5399
- * @param callback Resolves when the browser's passwords have been cleared.
5400
5383
  * @deprecated Support for password deletion through extensions has been removed. This function has no effect.
5401
5384
  */
5402
5385
  export function removePasswords(
@@ -5410,6 +5393,7 @@ declare namespace chrome {
5410
5393
  * Clears websites' service workers.
5411
5394
  *
5412
5395
  * @chrome-returns-extra since Chrome 96
5396
+ * @returns Resolves when websites' service workers have been cleared.
5413
5397
  * @since Chrome 72
5414
5398
  */
5415
5399
  export function removeServiceWorkers(
@@ -5420,7 +5404,6 @@ declare namespace chrome {
5420
5404
  /**
5421
5405
  * Clears websites' service workers.
5422
5406
  *
5423
- * @param callback Resolves when websites' service workers have been cleared.
5424
5407
  * @since Chrome 72
5425
5408
  */
5426
5409
  export function removeServiceWorkers(
@@ -5434,6 +5417,7 @@ declare namespace chrome {
5434
5417
  * Clears websites' WebSQL data.
5435
5418
  *
5436
5419
  * @chrome-returns-extra since Chrome 96
5420
+ * @returns Resolves when websites' WebSQL databases have been cleared.
5437
5421
  */
5438
5422
  export function removeWebSQL(
5439
5423
 
@@ -5442,8 +5426,6 @@ declare namespace chrome {
5442
5426
 
5443
5427
  /**
5444
5428
  * Clears websites' WebSQL data.
5445
- *
5446
- * @param callback Resolves when websites' WebSQL databases have been cleared.
5447
5429
  */
5448
5430
  export function removeWebSQL(
5449
5431
 
@@ -5766,6 +5748,7 @@ declare namespace chrome {
5766
5748
  *
5767
5749
  * @chrome-returns-extra since Chrome 96
5768
5750
  * @param details Contains the details about the requested dialog.
5751
+ * @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).
5769
5752
  * @since Chrome 57
5770
5753
  */
5771
5754
  export function requestPin(
@@ -5777,7 +5760,6 @@ declare namespace chrome {
5777
5760
  * 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.
5778
5761
  *
5779
5762
  * @param details Contains the details about the requested dialog.
5780
- * @param callback Is called when the dialog is resolved with the user input, or when the dialog request finishes unsuccessfully (e.g. the dialog was canceled by the user or was not allowed to be shown).
5781
5763
  * @since Chrome 57
5782
5764
  */
5783
5765
  export function requestPin(
@@ -5794,6 +5776,7 @@ declare namespace chrome {
5794
5776
  *
5795
5777
  * @chrome-returns-extra since Chrome 96
5796
5778
  * @param details Contains the details about the reason for stopping the request flow.
5779
+ * @returns Returns a Promise which resolves when the request to close the PIN dialog is complete.
5797
5780
  * @since Chrome 57
5798
5781
  */
5799
5782
  export function stopPinRequest(
@@ -5805,7 +5788,6 @@ declare namespace chrome {
5805
5788
  * Stops the pin request started by the {@link requestPin} function.
5806
5789
  *
5807
5790
  * @param details Contains the details about the reason for stopping the request flow.
5808
- * @param callback To be used by Chrome to send to the extension the status from their request to close PIN dialog for user.
5809
5791
  * @since Chrome 57
5810
5792
  */
5811
5793
  export function stopPinRequest(
@@ -5822,6 +5804,7 @@ declare namespace chrome {
5822
5804
  *
5823
5805
  * @chrome-returns-extra since Chrome 96
5824
5806
  * @param details The certificates to set. Invalid certificates will be ignored.
5807
+ * @returns Returns a Promise which resolves upon completion.
5825
5808
  * @since Chrome 86
5826
5809
  */
5827
5810
  export function setCertificates(
@@ -5835,7 +5818,6 @@ declare namespace chrome {
5835
5818
  * 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.
5836
5819
  *
5837
5820
  * @param details The certificates to set. Invalid certificates will be ignored.
5838
- * @param callback Called upon completion.
5839
5821
  * @since Chrome 86
5840
5822
  */
5841
5823
  export function setCertificates(
@@ -6030,13 +6012,12 @@ declare namespace chrome {
6030
6012
  * Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
6031
6013
  *
6032
6014
  * @chrome-returns-extra since Chrome 96
6015
+ * @returns Resolves with a list of the registered commands.
6033
6016
  */
6034
6017
  export function getAll(): Promise<Command[]>;
6035
6018
 
6036
6019
  /**
6037
6020
  * Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
6038
- *
6039
- * @param callback Resolves with a list of the registered commands.
6040
6021
  */
6041
6022
  export function getAll(
6042
6023
 
@@ -6757,6 +6738,7 @@ declare namespace chrome {
6757
6738
  * @chrome-returns-extra since Chrome 123
6758
6739
  * @param id The ID of the item to update.
6759
6740
  * @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
6741
+ * @returns Resolves when the context menu has been updated.
6760
6742
  */
6761
6743
  export function update(
6762
6744
 
@@ -6811,7 +6793,6 @@ declare namespace chrome {
6811
6793
  *
6812
6794
  * @param id The ID of the item to update.
6813
6795
  * @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
6814
- * @param callback Resolves when the context menu has been updated.
6815
6796
  */
6816
6797
  export function update(
6817
6798
 
@@ -6868,6 +6849,7 @@ declare namespace chrome {
6868
6849
  *
6869
6850
  * @chrome-returns-extra since Chrome 123
6870
6851
  * @param menuItemId The ID of the context menu item to remove.
6852
+ * @returns Resolves when the context menu has been removed.
6871
6853
  */
6872
6854
  export function remove(
6873
6855
 
@@ -6878,7 +6860,6 @@ declare namespace chrome {
6878
6860
  * Removes a context menu item.
6879
6861
  *
6880
6862
  * @param menuItemId The ID of the context menu item to remove.
6881
- * @param callback Resolves when the context menu has been removed.
6882
6863
  */
6883
6864
  export function remove(
6884
6865
 
@@ -6891,13 +6872,12 @@ declare namespace chrome {
6891
6872
  * Removes all context menu items added by this extension.
6892
6873
  *
6893
6874
  * @chrome-returns-extra since Chrome 123
6875
+ * @returns Resolves when removal is complete.
6894
6876
  */
6895
6877
  export function removeAll(): Promise<void>;
6896
6878
 
6897
6879
  /**
6898
6880
  * Removes all context menu items added by this extension.
6899
- *
6900
- * @param callback Resolves when removal is complete.
6901
6881
  */
6902
6882
  export function removeAll(
6903
6883
 
@@ -7678,6 +7658,7 @@ declare namespace chrome {
7678
7658
  * @chrome-returns-extra since Chrome 96
7679
7659
  * @param target Debugging target to which you want to attach.
7680
7660
  * @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).
7661
+ * @returns Resolves once the attach operation succeeds or fails. The promise resolves with no value. If the attach fails, the promise will be rejected.
7681
7662
  */
7682
7663
  export function attach(
7683
7664
 
@@ -7691,7 +7672,6 @@ declare namespace chrome {
7691
7672
  *
7692
7673
  * @param target Debugging target to which you want to attach.
7693
7674
  * @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).
7694
- * @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.
7695
7675
  */
7696
7676
  export function attach(
7697
7677
 
@@ -7707,6 +7687,7 @@ declare namespace chrome {
7707
7687
  *
7708
7688
  * @chrome-returns-extra since Chrome 96
7709
7689
  * @param target Debugging target from which you want to detach.
7690
+ * @returns Resolves once the detach operation succeeds or fails. The promise resolves with no value. If the detach fails, the promise will be rejected.
7710
7691
  */
7711
7692
  export function detach(
7712
7693
 
@@ -7717,7 +7698,6 @@ declare namespace chrome {
7717
7698
  * Detaches debugger from the given target.
7718
7699
  *
7719
7700
  * @param target Debugging target from which you want to detach.
7720
- * @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.
7721
7701
  */
7722
7702
  export function detach(
7723
7703
 
@@ -7733,6 +7713,7 @@ declare namespace chrome {
7733
7713
  * @param target Debugging target to which you want to send the command.
7734
7714
  * @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
7735
7715
  * @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
7716
+ * @returns Response body. If an error occurs while posting the message, the promise will be rejected.
7736
7717
  */
7737
7718
  export function sendCommand(
7738
7719
 
@@ -7749,7 +7730,6 @@ declare namespace chrome {
7749
7730
  * @param target Debugging target to which you want to send the command.
7750
7731
  * @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
7751
7732
  * @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
7752
- * @param callback Response body. If an error occurs while posting the message, the promise will be rejected.
7753
7733
  */
7754
7734
  export function sendCommand(
7755
7735
 
@@ -8800,6 +8780,7 @@ declare namespace chrome {
8800
8780
  * * {@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}.
8801
8781
  *
8802
8782
  * @chrome-returns-extra since Chrome 91
8783
+ * @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.
8803
8784
  */
8804
8785
  export function updateDynamicRules(
8805
8786
 
@@ -8816,8 +8797,6 @@ declare namespace chrome {
8816
8797
  * * These rules are persisted across browser sessions and across extension updates.
8817
8798
  * * Static rules specified as part of the extension package can not be removed using this function.
8818
8799
  * * {@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}.
8819
- *
8820
- * @param callback Called once the update is complete or has failed. In case of an error, {@link runtime.lastError} will be set and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
8821
8800
  */
8822
8801
  export function updateDynamicRules(
8823
8802
 
@@ -8834,6 +8813,7 @@ declare namespace chrome {
8834
8813
  *
8835
8814
  * @chrome-returns-extra since Chrome 91
8836
8815
  * @param filter An object to filter the list of fetched rules.
8816
+ * @returns Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
8837
8817
  */
8838
8818
  export function getDynamicRules(
8839
8819
 
@@ -8847,7 +8827,6 @@ declare namespace chrome {
8847
8827
  * Returns the current set of dynamic rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
8848
8828
  *
8849
8829
  * @param filter An object to filter the list of fetched rules.
8850
- * @param callback Called with the set of dynamic rules. An error might be raised in case of transient internal errors.
8851
8830
  */
8852
8831
  export function getDynamicRules(
8853
8832
 
@@ -8869,6 +8848,7 @@ declare namespace chrome {
8869
8848
  * * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
8870
8849
  *
8871
8850
  * @chrome-returns-extra since Chrome 91
8851
+ * @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.
8872
8852
  * @since Chrome 90
8873
8853
  */
8874
8854
  export function updateSessionRules(
@@ -8883,7 +8863,6 @@ declare namespace chrome {
8883
8863
  * * These rules are not persisted across sessions and are backed in memory.
8884
8864
  * * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
8885
8865
  *
8886
- * @param callback Called once the update is complete or has failed. In case of an error, {@link runtime.lastError} will be set and no change will be made to the rule set. This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
8887
8866
  * @since Chrome 90
8888
8867
  */
8889
8868
  export function updateSessionRules(
@@ -8898,6 +8877,7 @@ declare namespace chrome {
8898
8877
  *
8899
8878
  * @chrome-returns-extra since Chrome 91
8900
8879
  * @param filter An object to filter the list of fetched rules.
8880
+ * @returns Promise that resolves with the set of session scoped rules.
8901
8881
  * @since Chrome 90
8902
8882
  */
8903
8883
  export function getSessionRules(
@@ -8912,7 +8892,6 @@ declare namespace chrome {
8912
8892
  * Returns the current set of session scoped rules for the extension. Callers can optionally filter the list of fetched rules by specifying a `filter`.
8913
8893
  *
8914
8894
  * @param filter An object to filter the list of fetched rules.
8915
- * @param callback Called with the set of session scoped rules.
8916
8895
  * @since Chrome 90
8917
8896
  */
8918
8897
  export function getSessionRules(
@@ -8932,6 +8911,7 @@ declare namespace chrome {
8932
8911
  * 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.
8933
8912
  *
8934
8913
  * @chrome-returns-extra since Chrome 91
8914
+ * @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.
8935
8915
  */
8936
8916
  export function updateEnabledRulesets(
8937
8917
 
@@ -8944,8 +8924,6 @@ declare namespace chrome {
8944
8924
  /**
8945
8925
  * 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.
8946
8926
  * 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.
8947
- *
8948
- * @param callback Called once the update is complete. In case of an error, {@link runtime.lastError} will be set and no change will be made to set of enabled rulesets. This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
8949
8927
  */
8950
8928
  export function updateEnabledRulesets(
8951
8929
 
@@ -8961,13 +8939,12 @@ declare namespace chrome {
8961
8939
  * Returns the ids for the current set of enabled static rulesets.
8962
8940
  *
8963
8941
  * @chrome-returns-extra since Chrome 91
8942
+ * @returns Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
8964
8943
  */
8965
8944
  export function getEnabledRulesets(): Promise<string[]>;
8966
8945
 
8967
8946
  /**
8968
8947
  * Returns the ids for the current set of enabled static rulesets.
8969
- *
8970
- * @param callback Called with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
8971
8948
  */
8972
8949
  export function getEnabledRulesets(
8973
8950
 
@@ -8979,6 +8956,7 @@ declare namespace chrome {
8979
8956
  /**
8980
8957
  * 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.
8981
8958
  *
8959
+ * @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.
8982
8960
  * @since Chrome 111
8983
8961
  */
8984
8962
  export function updateStaticRules(
@@ -8989,7 +8967,6 @@ declare namespace chrome {
8989
8967
  /**
8990
8968
  * 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.
8991
8969
  *
8992
- * @param callback Called once the update is complete. In case of an error, {@link runtime.lastError} will be set and no change will be made to the enabled static rules.
8993
8970
  * @since Chrome 111
8994
8971
  */
8995
8972
  export function updateStaticRules(
@@ -9003,6 +8980,7 @@ declare namespace chrome {
9003
8980
  * Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
9004
8981
  *
9005
8982
  * @param options Specifies the ruleset to query.
8983
+ * @returns Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
9006
8984
  * @since Chrome 111
9007
8985
  */
9008
8986
  export function getDisabledRuleIds(
@@ -9014,7 +8992,6 @@ declare namespace chrome {
9014
8992
  * Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
9015
8993
  *
9016
8994
  * @param options Specifies the ruleset to query.
9017
- * @param callback Called with a list of ids that correspond to the disabled rules in that ruleset.
9018
8995
  * @since Chrome 111
9019
8996
  */
9020
8997
  export function getDisabledRuleIds(
@@ -9031,6 +9008,7 @@ declare namespace chrome {
9031
9008
  *
9032
9009
  * @chrome-returns-extra since Chrome 91
9033
9010
  * @param filter An object to filter the list of matched rules.
9011
+ * @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.
9034
9012
  */
9035
9013
  export function getMatchedRules(
9036
9014
 
@@ -9041,7 +9019,6 @@ declare namespace chrome {
9041
9019
  * 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.
9042
9020
  *
9043
9021
  * @param filter An object to filter the list of matched rules.
9044
- * @param callback Called once the list of matched rules has been fetched. In case of an error, {@link runtime.lastError} will be set and no rules will be returned. This can happen for multiple reasons, such as insufficient permissions, or exceeding the quota.
9045
9022
  */
9046
9023
  export function getMatchedRules(
9047
9024
 
@@ -9083,6 +9060,7 @@ declare namespace chrome {
9083
9060
  *
9084
9061
  * @chrome-returns-extra since Chrome 91
9085
9062
  * @param regexOptions The regular expression to check.
9063
+ * @returns Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
9086
9064
  * @since Chrome 87
9087
9065
  */
9088
9066
  export function isRegexSupported(
@@ -9094,7 +9072,6 @@ declare namespace chrome {
9094
9072
  * Checks if the given regular expression will be supported as a `regexFilter` rule condition.
9095
9073
  *
9096
9074
  * @param regexOptions The regular expression to check.
9097
- * @param callback Called with details consisting of whether the regular expression is supported and the reason if not.
9098
9075
  * @since Chrome 87
9099
9076
  */
9100
9077
  export function isRegexSupported(
@@ -9129,6 +9106,7 @@ declare namespace chrome {
9129
9106
  /**
9130
9107
  * 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.
9131
9108
  *
9109
+ * @returns Promise that resolves with the details of matched rules.
9132
9110
  * @since Chrome 103
9133
9111
  */
9134
9112
  export function testMatchOutcome(
@@ -9139,7 +9117,6 @@ declare namespace chrome {
9139
9117
  /**
9140
9118
  * 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.
9141
9119
  *
9142
- * @param callback Called with the details of matched rules.
9143
9120
  * @since Chrome 103
9144
9121
  */
9145
9122
  export function testMatchOutcome(
@@ -10586,6 +10563,7 @@ declare namespace chrome {
10586
10563
  * Resolves the given hostname or IP address literal.
10587
10564
  *
10588
10565
  * @param hostname The hostname to resolve.
10566
+ * @returns Promise that resolves when the resolution operation completes.
10589
10567
  */
10590
10568
  export function resolve(
10591
10569
 
@@ -10596,7 +10574,6 @@ declare namespace chrome {
10596
10574
  * Resolves the given hostname or IP address literal.
10597
10575
  *
10598
10576
  * @param hostname The hostname to resolve.
10599
- * @param callback Called when the resolution operation completes.
10600
10577
  */
10601
10578
  export function resolve(
10602
10579
 
@@ -11117,6 +11094,7 @@ declare namespace chrome {
11117
11094
  *
11118
11095
  * @chrome-returns-extra since Chrome 96
11119
11096
  * @param options An object containing scan parameters.
11097
+ * @returns Returns a Promise which resolves with the scan results.
11120
11098
  */
11121
11099
  export function scan(
11122
11100
 
@@ -11127,7 +11105,6 @@ declare namespace chrome {
11127
11105
  * 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.
11128
11106
  *
11129
11107
  * @param options An object containing scan parameters.
11130
- * @param callback Called with the result and data from the scan.
11131
11108
  */
11132
11109
  export function scan(
11133
11110
 
@@ -11142,6 +11119,7 @@ declare namespace chrome {
11142
11119
  * 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.
11143
11120
  *
11144
11121
  * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
11122
+ * @returns Returns a Promise which resolves with the result and list of scanners.
11145
11123
  * @since Chrome 125
11146
11124
  */
11147
11125
  export function getScannerList(
@@ -11153,7 +11131,6 @@ declare namespace chrome {
11153
11131
  * 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.
11154
11132
  *
11155
11133
  * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
11156
- * @param callback Called with the result and list of scanners.
11157
11134
  * @since Chrome 125
11158
11135
  */
11159
11136
  export function getScannerList(
@@ -11169,6 +11146,7 @@ declare namespace chrome {
11169
11146
  * 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.
11170
11147
  *
11171
11148
  * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
11149
+ * @returns Returns a Promise which resolves with the result.
11172
11150
  * @since Chrome 125
11173
11151
  */
11174
11152
  export function openScanner(
@@ -11180,7 +11158,6 @@ declare namespace chrome {
11180
11158
  * 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.
11181
11159
  *
11182
11160
  * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
11183
- * @param callback Called with the result.
11184
11161
  * @since Chrome 125
11185
11162
  */
11186
11163
  export function openScanner(
@@ -11196,6 +11173,7 @@ declare namespace chrome {
11196
11173
  * 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.
11197
11174
  *
11198
11175
  * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
11176
+ * @returns Returns a Promise which resolves with the result.
11199
11177
  * @since Chrome 125
11200
11178
  */
11201
11179
  export function getOptionGroups(
@@ -11207,7 +11185,6 @@ declare namespace chrome {
11207
11185
  * 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.
11208
11186
  *
11209
11187
  * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
11210
- * @param callback Called with the result.
11211
11188
  * @since Chrome 125
11212
11189
  */
11213
11190
  export function getOptionGroups(
@@ -11223,6 +11200,7 @@ declare namespace chrome {
11223
11200
  * 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.
11224
11201
  *
11225
11202
  * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
11203
+ * @returns Returns a Promise which resolves with the result.
11226
11204
  * @since Chrome 125
11227
11205
  */
11228
11206
  export function closeScanner(
@@ -11234,7 +11212,6 @@ declare namespace chrome {
11234
11212
  * 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.
11235
11213
  *
11236
11214
  * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
11237
- * @param callback Called with the result.
11238
11215
  * @since Chrome 125
11239
11216
  */
11240
11217
  export function closeScanner(
@@ -11251,6 +11228,7 @@ declare namespace chrome {
11251
11228
  *
11252
11229
  * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
11253
11230
  * @param options A list of `OptionSetting` objects to be applied to the scanner.
11231
+ * @returns Returns a Promise which resolves with the result.
11254
11232
  * @since Chrome 125
11255
11233
  */
11256
11234
  export function setOptions(
@@ -11265,7 +11243,6 @@ declare namespace chrome {
11265
11243
  *
11266
11244
  * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
11267
11245
  * @param options A list of `OptionSetting` objects to be applied to the scanner.
11268
- * @param callback Called with the result.
11269
11246
  * @since Chrome 125
11270
11247
  */
11271
11248
  export function setOptions(
@@ -11284,6 +11261,7 @@ declare namespace chrome {
11284
11261
  *
11285
11262
  * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
11286
11263
  * @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`.
11264
+ * @returns Returns a Promise which resolves with the result.
11287
11265
  * @since Chrome 125
11288
11266
  */
11289
11267
  export function startScan(
@@ -11298,7 +11276,6 @@ declare namespace chrome {
11298
11276
  *
11299
11277
  * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
11300
11278
  * @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`.
11301
- * @param callback Called with the result.
11302
11279
  * @since Chrome 125
11303
11280
  */
11304
11281
  export function startScan(
@@ -11316,6 +11293,7 @@ declare namespace chrome {
11316
11293
  * 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.
11317
11294
  *
11318
11295
  * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
11296
+ * @returns Returns a Promise which resolves with the result.
11319
11297
  * @since Chrome 125
11320
11298
  */
11321
11299
  export function cancelScan(
@@ -11327,7 +11305,6 @@ declare namespace chrome {
11327
11305
  * 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.
11328
11306
  *
11329
11307
  * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
11330
- * @param callback Called with the result.
11331
11308
  * @since Chrome 125
11332
11309
  */
11333
11310
  export function cancelScan(
@@ -11347,6 +11324,7 @@ declare namespace chrome {
11347
11324
  * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
11348
11325
  *
11349
11326
  * @param job Active job handle previously returned from {@link startScan}.
11327
+ * @returns Returns a Promise which resolves with the result.
11350
11328
  * @since Chrome 125
11351
11329
  */
11352
11330
  export function readScanData(
@@ -11362,7 +11340,6 @@ declare namespace chrome {
11362
11340
  * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
11363
11341
  *
11364
11342
  * @param job Active job handle previously returned from {@link startScan}.
11365
- * @param callback Called with the result.
11366
11343
  * @since Chrome 125
11367
11344
  */
11368
11345
  export function readScanData(
@@ -11920,6 +11897,7 @@ declare namespace chrome {
11920
11897
  *
11921
11898
  * @chrome-returns-extra since Chrome 96
11922
11899
  * @param options What to download and how.
11900
+ * @returns Returns a Promise which resolves with the id of the new {@link DownloadItem}.
11923
11901
  */
11924
11902
  export function download(
11925
11903
 
@@ -11930,7 +11908,6 @@ declare namespace chrome {
11930
11908
  * 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.
11931
11909
  *
11932
11910
  * @param options What to download and how.
11933
- * @param callback Called with the id of the new {@link DownloadItem}.
11934
11911
  */
11935
11912
  export function download(
11936
11913
 
@@ -11968,6 +11945,7 @@ declare namespace chrome {
11968
11945
  *
11969
11946
  * @chrome-returns-extra since Chrome 96
11970
11947
  * @param downloadId The id of the download to pause.
11948
+ * @returns Returns a Promise which resolves when the pause request is completed.
11971
11949
  */
11972
11950
  export function pause(
11973
11951
 
@@ -11978,7 +11956,6 @@ declare namespace chrome {
11978
11956
  * 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.
11979
11957
  *
11980
11958
  * @param downloadId The id of the download to pause.
11981
- * @param callback Called when the pause request is completed.
11982
11959
  */
11983
11960
  export function pause(
11984
11961
 
@@ -11992,6 +11969,7 @@ declare namespace chrome {
11992
11969
  *
11993
11970
  * @chrome-returns-extra since Chrome 96
11994
11971
  * @param downloadId The id of the download to resume.
11972
+ * @returns Returns a Promise which resolves when the resume request is completed.
11995
11973
  */
11996
11974
  export function resume(
11997
11975
 
@@ -12002,7 +11980,6 @@ declare namespace chrome {
12002
11980
  * 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.
12003
11981
  *
12004
11982
  * @param downloadId The id of the download to resume.
12005
- * @param callback Called when the resume request is completed.
12006
11983
  */
12007
11984
  export function resume(
12008
11985
 
@@ -12016,6 +11993,7 @@ declare namespace chrome {
12016
11993
  *
12017
11994
  * @chrome-returns-extra since Chrome 96
12018
11995
  * @param downloadId The id of the download to cancel.
11996
+ * @returns Returns a Promise which resolves when the cancel request is completed.
12019
11997
  */
12020
11998
  export function cancel(
12021
11999
 
@@ -12026,7 +12004,6 @@ declare namespace chrome {
12026
12004
  * Cancel a download. When `callback` is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
12027
12005
  *
12028
12006
  * @param downloadId The id of the download to cancel.
12029
- * @param callback Called when the cancel request is completed.
12030
12007
  */
12031
12008
  export function cancel(
12032
12009
 
@@ -12040,6 +12017,7 @@ declare namespace chrome {
12040
12017
  *
12041
12018
  * @chrome-returns-extra since Chrome 96
12042
12019
  * @param downloadId The identifier for the download.
12020
+ * @returns Returns a Promise which resolves with a URL to an image that represents the download.
12043
12021
  */
12044
12022
  export function getFileIcon(
12045
12023
 
@@ -12052,7 +12030,6 @@ declare namespace chrome {
12052
12030
  * 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.
12053
12031
  *
12054
12032
  * @param downloadId The identifier for the download.
12055
- * @param callback A URL to an image that represents the download.
12056
12033
  */
12057
12034
  export function getFileIcon(
12058
12035
 
@@ -12153,6 +12130,7 @@ declare namespace chrome {
12153
12130
  *
12154
12131
  * @chrome-returns-extra since Chrome 96
12155
12132
  * @param downloadId The identifier for the {@link DownloadItem}.
12133
+ * @returns Returns a Promise which resolves when the danger prompt dialog closes.
12156
12134
  */
12157
12135
  export function acceptDanger(
12158
12136
 
@@ -12163,7 +12141,6 @@ declare namespace chrome {
12163
12141
  * 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.
12164
12142
  *
12165
12143
  * @param downloadId The identifier for the {@link DownloadItem}.
12166
- * @param callback Called when the danger prompt dialog closes.
12167
12144
  */
12168
12145
  export function acceptDanger(
12169
12146
 
@@ -12187,6 +12164,7 @@ declare namespace chrome {
12187
12164
  * 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.
12188
12165
  *
12189
12166
  * @param options Encapsulate a change to the download UI.
12167
+ * @returns Returns a Promise which resolves when the UI update is completed.
12190
12168
  * @since Chrome 105
12191
12169
  */
12192
12170
  export function setUiOptions(
@@ -12198,7 +12176,6 @@ declare namespace chrome {
12198
12176
  * 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.
12199
12177
  *
12200
12178
  * @param options Encapsulate a change to the download UI.
12201
- * @param callback Called when the UI update is completed.
12202
12179
  * @since Chrome 105
12203
12180
  */
12204
12181
  export function setUiOptions(
@@ -12223,13 +12200,12 @@ declare namespace chrome {
12223
12200
  * 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.
12224
12201
  *
12225
12202
  * @chrome-returns-extra since Chrome 96
12203
+ * @returns Returns a Promise which resolves with the device identifier of the directory API.
12226
12204
  */
12227
12205
  export function getDirectoryDeviceId(): Promise<string>;
12228
12206
 
12229
12207
  /**
12230
12208
  * 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.
12231
- *
12232
- * @param callback Called with the device identifier of the directory API when received.
12233
12209
  */
12234
12210
  export function getDirectoryDeviceId(
12235
12211
 
@@ -12242,6 +12218,7 @@ declare namespace chrome {
12242
12218
  * 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.
12243
12219
  *
12244
12220
  * @chrome-returns-extra since Chrome 96
12221
+ * @returns Returns a Promise which resolves with the serial number of the device.
12245
12222
  * @since Chrome 66
12246
12223
  */
12247
12224
  export function getDeviceSerialNumber(): Promise<string>;
@@ -12249,7 +12226,6 @@ declare namespace chrome {
12249
12226
  /**
12250
12227
  * 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.
12251
12228
  *
12252
- * @param callback Called with the serial number of the device.
12253
12229
  * @since Chrome 66
12254
12230
  */
12255
12231
  export function getDeviceSerialNumber(
@@ -12263,6 +12239,7 @@ declare namespace chrome {
12263
12239
  * 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.
12264
12240
  *
12265
12241
  * @chrome-returns-extra since Chrome 96
12242
+ * @returns Returns a Promise which resolves with the Asset ID of the device.
12266
12243
  * @since Chrome 66
12267
12244
  */
12268
12245
  export function getDeviceAssetId(): Promise<string>;
@@ -12270,7 +12247,6 @@ declare namespace chrome {
12270
12247
  /**
12271
12248
  * 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.
12272
12249
  *
12273
- * @param callback Called with the Asset ID of the device.
12274
12250
  * @since Chrome 66
12275
12251
  */
12276
12252
  export function getDeviceAssetId(
@@ -12284,6 +12260,7 @@ declare namespace chrome {
12284
12260
  * 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.
12285
12261
  *
12286
12262
  * @chrome-returns-extra since Chrome 96
12263
+ * @returns Returns a Promise which resolves with the Annotated Location of the device.
12287
12264
  * @since Chrome 66
12288
12265
  */
12289
12266
  export function getDeviceAnnotatedLocation(): Promise<string>;
@@ -12291,7 +12268,6 @@ declare namespace chrome {
12291
12268
  /**
12292
12269
  * 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.
12293
12270
  *
12294
- * @param callback Called with the Annotated Location of the device.
12295
12271
  * @since Chrome 66
12296
12272
  */
12297
12273
  export function getDeviceAnnotatedLocation(
@@ -12305,6 +12281,7 @@ declare namespace chrome {
12305
12281
  * 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.
12306
12282
  *
12307
12283
  * @chrome-returns-extra since Chrome 96
12284
+ * @returns Returns a Promise which resolves with the hostname of the device.
12308
12285
  * @since Chrome 82
12309
12286
  */
12310
12287
  export function getDeviceHostname(): Promise<string>;
@@ -12312,7 +12289,6 @@ declare namespace chrome {
12312
12289
  /**
12313
12290
  * 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.
12314
12291
  *
12315
- * @param callback Called with hostname of the device.
12316
12292
  * @since Chrome 82
12317
12293
  */
12318
12294
  export function getDeviceHostname(
@@ -12343,13 +12319,12 @@ declare namespace chrome {
12343
12319
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
12344
12320
  *
12345
12321
  * @chrome-returns-extra since Chrome 96
12322
+ * @returns Returns a Promise which resolves with the hardware platform info.
12346
12323
  */
12347
12324
  export function getHardwarePlatformInfo(): Promise<HardwarePlatformInfo>;
12348
12325
 
12349
12326
  /**
12350
12327
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
12351
- *
12352
- * @param callback Called with the hardware platform info.
12353
12328
  */
12354
12329
  export function getHardwarePlatformInfo(
12355
12330
 
@@ -12381,6 +12356,7 @@ declare namespace chrome {
12381
12356
  * 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.
12382
12357
  *
12383
12358
  * @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
12359
+ * @returns Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
12384
12360
  */
12385
12361
  export function setCurrentInputMethod(
12386
12362
 
@@ -12391,7 +12367,6 @@ declare namespace chrome {
12391
12367
  * 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.
12392
12368
  *
12393
12369
  * @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
12394
- * @param callback Called when the input method is changed or if there is an error.
12395
12370
  */
12396
12371
  export function setCurrentInputMethod(
12397
12372
 
@@ -12457,13 +12432,12 @@ declare namespace chrome {
12457
12432
  * 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.
12458
12433
  *
12459
12434
  * @chrome-returns-extra since Chrome 96
12435
+ * @returns Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
12460
12436
  */
12461
12437
  export function getNetworkDetails(): Promise<NetworkDetails>;
12462
12438
 
12463
12439
  /**
12464
12440
  * 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.
12465
- *
12466
- * @param callback Called with the device's default network's {@link NetworkDetails}.
12467
12441
  */
12468
12442
  export function getNetworkDetails(
12469
12443
 
@@ -12562,13 +12536,12 @@ declare namespace chrome {
12562
12536
  * 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).
12563
12537
  *
12564
12538
  * @chrome-returns-extra since Chrome 131
12539
+ * @returns Invoked by `getTokens` with the list of available Tokens.
12565
12540
  */
12566
12541
  export function getTokens(): Promise<Token[]>;
12567
12542
 
12568
12543
  /**
12569
12544
  * 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).
12570
- *
12571
- * @param callback Invoked by `getTokens` with the list of available Tokens.
12572
12545
  */
12573
12546
  export function getTokens(
12574
12547
 
@@ -12585,6 +12558,7 @@ declare namespace chrome {
12585
12558
  *
12586
12559
  * @chrome-returns-extra since Chrome 131
12587
12560
  * @param tokenId The id of a Token returned by `getTokens`.
12561
+ * @returns Returns a Promise which resolves with the list of the available certificates.
12588
12562
  */
12589
12563
  export function getCertificates(
12590
12564
 
@@ -12595,7 +12569,6 @@ declare namespace chrome {
12595
12569
  * 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.
12596
12570
  *
12597
12571
  * @param tokenId The id of a Token returned by `getTokens`.
12598
- * @param callback Called back with the list of the available certificates.
12599
12572
  */
12600
12573
  export function getCertificates(
12601
12574
 
@@ -12615,6 +12588,7 @@ declare namespace chrome {
12615
12588
  * @chrome-returns-extra since Chrome 131
12616
12589
  * @param tokenId The id of a Token returned by `getTokens`.
12617
12590
  * @param certificate The DER encoding of a X.509 certificate.
12591
+ * @returns Returns a Promise which resolves when this operation is finished.
12618
12592
  */
12619
12593
  export function importCertificate(
12620
12594
 
@@ -12628,7 +12602,6 @@ declare namespace chrome {
12628
12602
  *
12629
12603
  * @param tokenId The id of a Token returned by `getTokens`.
12630
12604
  * @param certificate The DER encoding of a X.509 certificate.
12631
- * @param callback Called back when this operation is finished.
12632
12605
  */
12633
12606
  export function importCertificate(
12634
12607
 
@@ -12645,6 +12618,7 @@ declare namespace chrome {
12645
12618
  * @chrome-returns-extra since Chrome 131
12646
12619
  * @param tokenId The id of a Token returned by `getTokens`.
12647
12620
  * @param certificate The DER encoding of a X.509 certificate.
12621
+ * @returns Returns a Promise which resolves when this operation is finished.
12648
12622
  */
12649
12623
  export function removeCertificate(
12650
12624
 
@@ -12658,7 +12632,6 @@ declare namespace chrome {
12658
12632
  *
12659
12633
  * @param tokenId The id of a Token returned by `getTokens`.
12660
12634
  * @param certificate The DER encoding of a X.509 certificate.
12661
- * @param callback Called back when this operation is finished.
12662
12635
  */
12663
12636
  export function removeCertificate(
12664
12637
 
@@ -12678,6 +12651,7 @@ declare namespace chrome {
12678
12651
  *
12679
12652
  * @chrome-returns-extra since Chrome 131
12680
12653
  * @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
12654
+ * @returns Returns a Promise which resolves with the challenge response.
12681
12655
  * @since Chrome 110
12682
12656
  */
12683
12657
  export function challengeKey(
@@ -12693,7 +12667,6 @@ declare namespace chrome {
12693
12667
  * 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.
12694
12668
  *
12695
12669
  * @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
12696
- * @param callback Called back with the challenge response.
12697
12670
  * @since Chrome 110
12698
12671
  */
12699
12672
  export function challengeKey(
@@ -12714,6 +12687,7 @@ declare namespace chrome {
12714
12687
  * @chrome-returns-extra since Chrome 131
12715
12688
  * @param challenge A challenge as emitted by the Verified Access Web API.
12716
12689
  * @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.
12690
+ * @returns Returns a Promise which resolves with the challenge response.
12717
12691
  * @deprecated Use {@link challengeKey} instead.
12718
12692
  * @since Chrome 50
12719
12693
  * @chrome-deprecated-since Chrome 110
@@ -12733,7 +12707,6 @@ declare namespace chrome {
12733
12707
  *
12734
12708
  * @param challenge A challenge as emitted by the Verified Access Web API.
12735
12709
  * @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.
12736
- * @param callback Called back with the challenge response.
12737
12710
  * @deprecated Use {@link challengeKey} instead.
12738
12711
  * @since Chrome 50
12739
12712
  * @chrome-deprecated-since Chrome 110
@@ -12761,6 +12734,7 @@ declare namespace chrome {
12761
12734
  * @chrome-returns-extra since Chrome 131
12762
12735
  * @param challenge A challenge as emitted by the Verified Access Web API.
12763
12736
  * @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.
12737
+ * @returns Returns a Promise which resolves with the challenge response.
12764
12738
  * @deprecated Use {@link challengeKey} instead.
12765
12739
  * @since Chrome 50
12766
12740
  * @chrome-deprecated-since Chrome 110
@@ -12777,7 +12751,6 @@ declare namespace chrome {
12777
12751
  *
12778
12752
  * @param challenge A challenge as emitted by the Verified Access Web API.
12779
12753
  * @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.
12780
- * @param callback Called back with the challenge response.
12781
12754
  * @deprecated Use {@link challengeKey} instead.
12782
12755
  * @since Chrome 50
12783
12756
  * @chrome-deprecated-since Chrome 110
@@ -15097,6 +15070,7 @@ declare namespace chrome {
15097
15070
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15098
15071
  *
15099
15072
  * @chrome-returns-extra since Chrome 96
15073
+ * @returns A generic result callback to indicate success or failure.
15100
15074
  */
15101
15075
  export function mount(
15102
15076
 
@@ -15109,8 +15083,6 @@ declare namespace chrome {
15109
15083
  * Depending on the type of the file system being mounted, the `source` option must be set appropriately.
15110
15084
  *
15111
15085
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15112
- *
15113
- * @param callback A generic result callback to indicate success or failure.
15114
15086
  */
15115
15087
  export function mount(
15116
15088
 
@@ -15125,6 +15097,7 @@ declare namespace chrome {
15125
15097
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15126
15098
  *
15127
15099
  * @chrome-returns-extra since Chrome 96
15100
+ * @returns A generic result callback to indicate success or failure.
15128
15101
  */
15129
15102
  export function unmount(
15130
15103
 
@@ -15135,8 +15108,6 @@ declare namespace chrome {
15135
15108
  * 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).
15136
15109
  *
15137
15110
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
15138
- *
15139
- * @param callback A generic result callback to indicate success or failure.
15140
15111
  */
15141
15112
  export function unmount(
15142
15113
 
@@ -15149,13 +15120,12 @@ declare namespace chrome {
15149
15120
  * Returns all file systems mounted by the extension.
15150
15121
  *
15151
15122
  * @chrome-returns-extra since Chrome 96
15123
+ * @returns Callback to receive the result of {@link getAll} function.
15152
15124
  */
15153
15125
  export function getAll(): Promise<FileSystemInfo[]>;
15154
15126
 
15155
15127
  /**
15156
15128
  * Returns all file systems mounted by the extension.
15157
- *
15158
- * @param callback Callback to receive the result of {@link getAll} function.
15159
15129
  */
15160
15130
  export function getAll(
15161
15131
 
@@ -15168,6 +15138,7 @@ declare namespace chrome {
15168
15138
  * Returns information about a file system with the passed `fileSystemId`.
15169
15139
  *
15170
15140
  * @chrome-returns-extra since Chrome 96
15141
+ * @returns Callback to receive the result of {@link get} function.
15171
15142
  */
15172
15143
  export function get(
15173
15144
 
@@ -15176,8 +15147,6 @@ declare namespace chrome {
15176
15147
 
15177
15148
  /**
15178
15149
  * Returns information about a file system with the passed `fileSystemId`.
15179
- *
15180
- * @param callback Callback to receive the result of {@link get} function.
15181
15150
  */
15182
15151
  export function get(
15183
15152
 
@@ -15202,6 +15171,7 @@ declare namespace chrome {
15202
15171
  * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
15203
15172
  *
15204
15173
  * @chrome-returns-extra since Chrome 96
15174
+ * @returns A generic result callback to indicate success or failure.
15205
15175
  * @since Chrome 45
15206
15176
  */
15207
15177
  export function notify(
@@ -15222,7 +15192,6 @@ declare namespace chrome {
15222
15192
  *
15223
15193
  * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
15224
15194
  *
15225
- * @param callback A generic result callback to indicate success or failure.
15226
15195
  * @since Chrome 45
15227
15196
  */
15228
15197
  export function notify(
@@ -15909,6 +15878,7 @@ declare namespace chrome {
15909
15878
  *
15910
15879
  * @chrome-returns-extra since Chrome 116
15911
15880
  * @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.
15881
+ * @returns Resolves when registration completes.
15912
15882
  */
15913
15883
  export function register(
15914
15884
 
@@ -15919,7 +15889,6 @@ declare namespace chrome {
15919
15889
  * 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.
15920
15890
  *
15921
15891
  * @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.
15922
- * @param callback Resolves when registration completes.
15923
15892
  */
15924
15893
  export function register(
15925
15894
 
@@ -15937,13 +15906,12 @@ declare namespace chrome {
15937
15906
  * Unregisters the application from FCM.
15938
15907
  *
15939
15908
  * @chrome-returns-extra since Chrome 116
15909
+ * @returns Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
15940
15910
  */
15941
15911
  export function unregister(): Promise<void>;
15942
15912
 
15943
15913
  /**
15944
15914
  * Unregisters the application from FCM.
15945
- *
15946
- * @param callback Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
15947
15915
  */
15948
15916
  export function unregister(
15949
15917
 
@@ -15955,6 +15923,7 @@ declare namespace chrome {
15955
15923
  *
15956
15924
  * @chrome-returns-extra since Chrome 116
15957
15925
  * @param message A message to send to the other party via FCM.
15926
+ * @returns Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
15958
15927
  */
15959
15928
  export function send(
15960
15929
 
@@ -15986,7 +15955,6 @@ declare namespace chrome {
15986
15955
  * Sends a message according to its contents.
15987
15956
  *
15988
15957
  * @param message A message to send to the other party via FCM.
15989
- * @param callback Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
15990
15958
  */
15991
15959
  export function send(
15992
15960
 
@@ -17002,6 +16970,7 @@ declare namespace chrome {
17002
16970
  *
17003
16971
  * @chrome-returns-extra since Chrome 105
17004
16972
  * @param details Token options.
16973
+ * @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.
17005
16974
  */
17006
16975
  export function getAuthToken(
17007
16976
 
@@ -17018,7 +16987,6 @@ declare namespace chrome {
17018
16987
  * 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.
17019
16988
  *
17020
16989
  * @param details Token options.
17021
- * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error. The `grantedScopes` parameter is populated since Chrome 87. When available, this parameter contains the list of granted scopes corresponding with the returned token.
17022
16990
  */
17023
16991
  export function getAuthToken(
17024
16992
 
@@ -17041,6 +17009,7 @@ declare namespace chrome {
17041
17009
  *
17042
17010
  * @chrome-returns-extra since Chrome 106
17043
17011
  * @param details Profile options.
17012
+ * @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.
17044
17013
  */
17045
17014
  export function getProfileUserInfo(
17046
17015
 
@@ -17058,7 +17027,6 @@ declare namespace chrome {
17058
17027
  * 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.
17059
17028
  *
17060
17029
  * @param details Profile options.
17061
- * @param callback Called with the `ProfileUserInfo` of the primary Chrome account, of an empty `ProfileUserInfo` if the account with given `details` doesn't exist.
17062
17030
  */
17063
17031
  export function getProfileUserInfo(
17064
17032
 
@@ -17079,6 +17047,7 @@ declare namespace chrome {
17079
17047
  *
17080
17048
  * @chrome-returns-extra since Chrome 106
17081
17049
  * @param details Token information.
17050
+ * @returns Returns a Promise which resolves when the token has been removed from the cache.
17082
17051
  */
17083
17052
  export function removeCachedAuthToken(
17084
17053
 
@@ -17091,7 +17060,6 @@ declare namespace chrome {
17091
17060
  * 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`.
17092
17061
  *
17093
17062
  * @param details Token information.
17094
- * @param callback Called when the token has been removed from the cache.
17095
17063
  */
17096
17064
  export function removeCachedAuthToken(
17097
17065
 
@@ -17108,6 +17076,7 @@ declare namespace chrome {
17108
17076
  * * De-authorizes the user from all auth flows
17109
17077
  *
17110
17078
  * @chrome-returns-extra since Chrome 106
17079
+ * @returns Returns a Promise which resolves when the state has been cleared.
17111
17080
  * @since Chrome 87
17112
17081
  */
17113
17082
  export function clearAllCachedAuthTokens(): Promise<void>;
@@ -17119,7 +17088,6 @@ declare namespace chrome {
17119
17088
  * * Removes user's account preferences
17120
17089
  * * De-authorizes the user from all auth flows
17121
17090
  *
17122
- * @param callback Called when the state has been cleared.
17123
17091
  * @since Chrome 87
17124
17092
  */
17125
17093
  export function clearAllCachedAuthTokens(
@@ -17136,6 +17104,7 @@ declare namespace chrome {
17136
17104
  *
17137
17105
  * @chrome-returns-extra since Chrome 106
17138
17106
  * @param details WebAuth flow options.
17107
+ * @returns Returns a Promise which resolves with the URL redirected back to your application.
17139
17108
  */
17140
17109
  export function launchWebAuthFlow(
17141
17110
 
@@ -17150,7 +17119,6 @@ declare namespace chrome {
17150
17119
  * 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.
17151
17120
  *
17152
17121
  * @param details WebAuth flow options.
17153
- * @param callback Called with the URL redirected back to your application.
17154
17122
  */
17155
17123
  export function launchWebAuthFlow(
17156
17124
 
@@ -17653,6 +17621,7 @@ declare namespace chrome {
17653
17621
  * Set the current composition. If this extension does not own the active IME, this fails.
17654
17622
  *
17655
17623
  * @chrome-returns-extra since Chrome 111
17624
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
17656
17625
  */
17657
17626
  export function setComposition(
17658
17627
 
@@ -17708,8 +17677,6 @@ declare namespace chrome {
17708
17677
 
17709
17678
  /**
17710
17679
  * Set the current composition. If this extension does not own the active IME, this fails.
17711
- *
17712
- * @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.
17713
17680
  */
17714
17681
  export function setComposition(
17715
17682
 
@@ -17771,6 +17738,7 @@ declare namespace chrome {
17771
17738
  * Clear the current composition. If this extension does not own the active IME, this fails.
17772
17739
  *
17773
17740
  * @chrome-returns-extra since Chrome 111
17741
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
17774
17742
  */
17775
17743
  export function clearComposition(
17776
17744
 
@@ -17785,8 +17753,6 @@ declare namespace chrome {
17785
17753
 
17786
17754
  /**
17787
17755
  * Clear the current composition. If this extension does not own the active IME, this fails.
17788
- *
17789
- * @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.
17790
17756
  */
17791
17757
  export function clearComposition(
17792
17758
 
@@ -17807,6 +17773,7 @@ declare namespace chrome {
17807
17773
  * Commits the provided text to the current input.
17808
17774
  *
17809
17775
  * @chrome-returns-extra since Chrome 111
17776
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
17810
17777
  */
17811
17778
  export function commitText(
17812
17779
 
@@ -17826,8 +17793,6 @@ declare namespace chrome {
17826
17793
 
17827
17794
  /**
17828
17795
  * Commits the provided text to the current input.
17829
- *
17830
- * @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.
17831
17796
  */
17832
17797
  export function commitText(
17833
17798
 
@@ -17853,6 +17818,7 @@ declare namespace chrome {
17853
17818
  * 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.
17854
17819
  *
17855
17820
  * @chrome-returns-extra since Chrome 111
17821
+ * @returns Resolves when the operation completes.
17856
17822
  */
17857
17823
  export function sendKeyEvents(
17858
17824
 
@@ -17872,8 +17838,6 @@ declare namespace chrome {
17872
17838
 
17873
17839
  /**
17874
17840
  * 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.
17875
- *
17876
- * @param callback Resolves when the operation completes.
17877
17841
  */
17878
17842
  export function sendKeyEvents(
17879
17843
 
@@ -17902,6 +17866,7 @@ declare namespace chrome {
17902
17866
  * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
17903
17867
  *
17904
17868
  * @chrome-returns-extra since Chrome 111
17869
+ * @returns Resolves when the operation completes.
17905
17870
  */
17906
17871
  export function setCandidateWindowProperties(
17907
17872
 
@@ -17968,8 +17933,6 @@ declare namespace chrome {
17968
17933
 
17969
17934
  /**
17970
17935
  * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
17971
- *
17972
- * @param callback Resolves when the operation completes.
17973
17936
  */
17974
17937
  export function setCandidateWindowProperties(
17975
17938
 
@@ -18042,6 +18005,7 @@ declare namespace chrome {
18042
18005
  * Sets the current candidate list. This fails if this extension doesn't own the active IME
18043
18006
  *
18044
18007
  * @chrome-returns-extra since Chrome 111
18008
+ * @returns Resolves when the operation completes.
18045
18009
  */
18046
18010
  export function setCandidates(
18047
18011
 
@@ -18103,8 +18067,6 @@ declare namespace chrome {
18103
18067
 
18104
18068
  /**
18105
18069
  * Sets the current candidate list. This fails if this extension doesn't own the active IME
18106
- *
18107
- * @param callback Resolves when the operation completes.
18108
18070
  */
18109
18071
  export function setCandidates(
18110
18072
 
@@ -18172,6 +18134,7 @@ declare namespace chrome {
18172
18134
  * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
18173
18135
  *
18174
18136
  * @chrome-returns-extra since Chrome 111
18137
+ * @returns Resolves when the operation completes
18175
18138
  */
18176
18139
  export function setCursorPosition(
18177
18140
 
@@ -18191,8 +18154,6 @@ declare namespace chrome {
18191
18154
 
18192
18155
  /**
18193
18156
  * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
18194
- *
18195
- * @param callback Resolves when the operation completes
18196
18157
  */
18197
18158
  export function setCursorPosition(
18198
18159
 
@@ -18218,6 +18179,7 @@ declare namespace chrome {
18218
18179
  * Shows/Hides an assistive window with the given properties.
18219
18180
  *
18220
18181
  * @chrome-returns-extra since Chrome 111
18182
+ * @returns Resolves when the operation completes.
18221
18183
  * @since Chrome 85
18222
18184
  */
18223
18185
  export function setAssistiveWindowProperties(
@@ -18239,7 +18201,6 @@ declare namespace chrome {
18239
18201
  /**
18240
18202
  * Shows/Hides an assistive window with the given properties.
18241
18203
  *
18242
- * @param callback Resolves when the operation completes.
18243
18204
  * @since Chrome 85
18244
18205
  */
18245
18206
  export function setAssistiveWindowProperties(
@@ -18266,6 +18227,7 @@ declare namespace chrome {
18266
18227
  * Highlights/Unhighlights a button in an assistive window.
18267
18228
  *
18268
18229
  * @chrome-returns-extra since Chrome 111
18230
+ * @returns Resolves when the operation completes. On failure, the promise will be rejected.
18269
18231
  * @since Chrome 86
18270
18232
  */
18271
18233
  export function setAssistiveWindowButtonHighlighted(
@@ -18302,7 +18264,6 @@ declare namespace chrome {
18302
18264
  /**
18303
18265
  * Highlights/Unhighlights a button in an assistive window.
18304
18266
  *
18305
- * @param callback Resolves when the operation completes. On failure, the promise will be rejected.
18306
18267
  * @since Chrome 86
18307
18268
  */
18308
18269
  export function setAssistiveWindowButtonHighlighted(
@@ -18362,6 +18323,7 @@ declare namespace chrome {
18362
18323
  * Updates the state of the MenuItems specified
18363
18324
  *
18364
18325
  * @chrome-returns-extra since Chrome 111
18326
+ * @returns Resolves when the operation completes
18365
18327
  */
18366
18328
  export function updateMenuItems(
18367
18329
 
@@ -18370,8 +18332,6 @@ declare namespace chrome {
18370
18332
 
18371
18333
  /**
18372
18334
  * Updates the state of the MenuItems specified
18373
- *
18374
- * @param callback Resolves when the operation completes
18375
18335
  */
18376
18336
  export function updateMenuItems(
18377
18337
 
@@ -18384,6 +18344,7 @@ declare namespace chrome {
18384
18344
  * Deletes the text around the caret.
18385
18345
  *
18386
18346
  * @chrome-returns-extra since Chrome 111
18347
+ * @returns Resolves when the operation completes.
18387
18348
  */
18388
18349
  export function deleteSurroundingText(
18389
18350
 
@@ -18413,8 +18374,6 @@ declare namespace chrome {
18413
18374
 
18414
18375
  /**
18415
18376
  * Deletes the text around the caret.
18416
- *
18417
- * @param callback Resolves when the operation completes.
18418
18377
  */
18419
18378
  export function deleteSurroundingText(
18420
18379
 
@@ -18475,13 +18434,12 @@ declare namespace chrome {
18475
18434
  * 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.
18476
18435
  *
18477
18436
  * @chrome-returns-extra since Chrome 96
18437
+ * @returns Resolves when the retrieval completes.
18478
18438
  */
18479
18439
  export function getID(): Promise<string>;
18480
18440
 
18481
18441
  /**
18482
18442
  * 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.
18483
- *
18484
- * @param callback Resolves when the retrieval completes.
18485
18443
  */
18486
18444
  export function getID(
18487
18445
 
@@ -18497,13 +18455,12 @@ declare namespace chrome {
18497
18455
  * Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
18498
18456
  *
18499
18457
  * @chrome-returns-extra since Chrome 96
18458
+ * @returns Resolves when the retrieval completes.
18500
18459
  */
18501
18460
  export function getCreationTime(): Promise<number>;
18502
18461
 
18503
18462
  /**
18504
18463
  * Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
18505
- *
18506
- * @param callback Resolves when the retrieval completes.
18507
18464
  */
18508
18465
  export function getCreationTime(
18509
18466
 
@@ -18520,6 +18477,7 @@ declare namespace chrome {
18520
18477
  *
18521
18478
  * @chrome-returns-extra since Chrome 96
18522
18479
  * @param getTokenParams Parameters for getToken.
18480
+ * @returns Resolves when the retrieval completes.
18523
18481
  */
18524
18482
  export function getToken(
18525
18483
 
@@ -18554,7 +18512,6 @@ declare namespace chrome {
18554
18512
  * Return a token that allows the authorized entity to access the service defined by scope.
18555
18513
  *
18556
18514
  * @param getTokenParams Parameters for getToken.
18557
- * @param callback Resolves when the retrieval completes.
18558
18515
  */
18559
18516
  export function getToken(
18560
18517
 
@@ -18597,6 +18554,7 @@ declare namespace chrome {
18597
18554
  *
18598
18555
  * @chrome-returns-extra since Chrome 96
18599
18556
  * @param deleteTokenParams Parameters for deleteToken.
18557
+ * @returns Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
18600
18558
  */
18601
18559
  export function deleteToken(
18602
18560
 
@@ -18622,7 +18580,6 @@ declare namespace chrome {
18622
18580
  * Revokes a granted token.
18623
18581
  *
18624
18582
  * @param deleteTokenParams Parameters for deleteToken.
18625
- * @param callback Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
18626
18583
  */
18627
18584
  export function deleteToken(
18628
18585
 
@@ -18650,13 +18607,12 @@ declare namespace chrome {
18650
18607
  * Resets the app instance identifier and revokes all tokens associated with it.
18651
18608
  *
18652
18609
  * @chrome-returns-extra since Chrome 96
18610
+ * @returns Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
18653
18611
  */
18654
18612
  export function deleteID(): Promise<void>;
18655
18613
 
18656
18614
  /**
18657
18615
  * Resets the app instance identifier and revokes all tokens associated with it.
18658
- *
18659
- * @param callback Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
18660
18616
  */
18661
18617
  export function deleteID(
18662
18618
 
@@ -19458,6 +19414,7 @@ declare namespace chrome {
19458
19414
  * Immediately issues a multicast DNS query for all service types. `callback` is invoked immediately. At a later time, queries will be sent, and any service events will be fired.
19459
19415
  *
19460
19416
  * @chrome-returns-extra since Chrome 96
19417
+ * @returns Callback invoked after ForceDiscovery() has started.
19461
19418
  * @since Chrome 45
19462
19419
  */
19463
19420
  export function forceDiscovery(): Promise<void>;
@@ -19465,7 +19422,6 @@ declare namespace chrome {
19465
19422
  /**
19466
19423
  * Immediately issues a multicast DNS query for all service types. `callback` is invoked immediately. At a later time, queries will be sent, and any service events will be fired.
19467
19424
  *
19468
- * @param callback Callback invoked after ForceDiscovery() has started.
19469
19425
  * @since Chrome 45
19470
19426
  */
19471
19427
  export function forceDiscovery(
@@ -21424,6 +21380,7 @@ declare namespace chrome {
21424
21380
  *
21425
21381
  * @chrome-returns-extra since Chrome 125
21426
21382
  * @param networkGuid The GUID of the network to get properties for.
21383
+ * @returns Called with the network properties when received.
21427
21384
  */
21428
21385
  export function getProperties(
21429
21386
 
@@ -21434,7 +21391,6 @@ declare namespace chrome {
21434
21391
  * Gets all the properties of the network with id networkGuid. Includes all properties of the network (read-only and read/write values).
21435
21392
  *
21436
21393
  * @param networkGuid The GUID of the network to get properties for.
21437
- * @param callback Called with the network properties when received.
21438
21394
  */
21439
21395
  export function getProperties(
21440
21396
 
@@ -21450,6 +21406,7 @@ declare namespace chrome {
21450
21406
  *
21451
21407
  * @chrome-returns-extra since Chrome 125
21452
21408
  * @param networkGuid The GUID of the network to get properties for.
21409
+ * @returns Called with the managed network properties when received.
21453
21410
  */
21454
21411
  export function getManagedProperties(
21455
21412
 
@@ -21460,7 +21417,6 @@ declare namespace chrome {
21460
21417
  * Gets the merged properties of the network with id networkGuid from the sources: User settings, shared settings, user policy, device policy and the currently active settings.
21461
21418
  *
21462
21419
  * @param networkGuid The GUID of the network to get properties for.
21463
- * @param callback Called with the managed network properties when received.
21464
21420
  */
21465
21421
  export function getManagedProperties(
21466
21422
 
@@ -21476,6 +21432,7 @@ declare namespace chrome {
21476
21432
  *
21477
21433
  * @chrome-returns-extra since Chrome 125
21478
21434
  * @param networkGuid The GUID of the network to get properties for.
21435
+ * @returns Called immediately with the network state properties.
21479
21436
  */
21480
21437
  export function getState(
21481
21438
 
@@ -21486,7 +21443,6 @@ declare namespace chrome {
21486
21443
  * Gets the cached read-only properties of the network with id networkGuid. This is meant to be a higher performance function than {@link getProperties}, which requires a round trip to query the networking subsystem. The following properties are returned for all networks: GUID, Type, Name, WiFi.Security. Additional properties are provided for visible networks: ConnectionState, ErrorState, WiFi.SignalStrength, Cellular.NetworkTechnology, Cellular.ActivationState, Cellular.RoamingState.
21487
21444
  *
21488
21445
  * @param networkGuid The GUID of the network to get properties for.
21489
- * @param callback Called immediately with the network state properties.
21490
21446
  */
21491
21447
  export function getState(
21492
21448
 
@@ -21503,6 +21459,7 @@ declare namespace chrome {
21503
21459
  * @chrome-returns-extra since Chrome 125
21504
21460
  * @param networkGuid The GUID of the network to set properties for.
21505
21461
  * @param properties The properties to set.
21462
+ * @returns Called when the operation has completed.
21506
21463
  */
21507
21464
  export function setProperties(
21508
21465
 
@@ -21516,7 +21473,6 @@ declare namespace chrome {
21516
21473
  *
21517
21474
  * @param networkGuid The GUID of the network to set properties for.
21518
21475
  * @param properties The properties to set.
21519
- * @param callback Called when the operation has completed.
21520
21476
  */
21521
21477
  export function setProperties(
21522
21478
 
@@ -21537,6 +21493,7 @@ declare namespace chrome {
21537
21493
 
21538
21494
  **This option is exposed only to Chrome's Web UI.** When called by apps, `false` is the only allowed value.
21539
21495
  * @param properties The properties to configure the new network with.
21496
+ * @returns Called with the GUID for the new network configuration once the network has been created.
21540
21497
  */
21541
21498
  export function createNetwork(
21542
21499
 
@@ -21554,7 +21511,6 @@ declare namespace chrome {
21554
21511
 
21555
21512
  **This option is exposed only to Chrome's Web UI.** When called by apps, `false` is the only allowed value.
21556
21513
  * @param properties The properties to configure the new network with.
21557
- * @param callback Called with the GUID for the new network configuration once the network has been created.
21558
21514
  */
21559
21515
  export function createNetwork(
21560
21516
 
@@ -21574,6 +21530,7 @@ declare namespace chrome {
21574
21530
  *
21575
21531
  * @chrome-returns-extra since Chrome 125
21576
21532
  * @param networkGuid The GUID of the network to forget.
21533
+ * @returns Called when the operation has completed.
21577
21534
  */
21578
21535
  export function forgetNetwork(
21579
21536
 
@@ -21586,7 +21543,6 @@ declare namespace chrome {
21586
21543
  * **In kiosk sessions, this method will not be able to forget shared network configurations.**
21587
21544
  *
21588
21545
  * @param networkGuid The GUID of the network to forget.
21589
- * @param callback Called when the operation has completed.
21590
21546
  */
21591
21547
  export function forgetNetwork(
21592
21548
 
@@ -21600,6 +21556,7 @@ declare namespace chrome {
21600
21556
  *
21601
21557
  * @chrome-returns-extra since Chrome 125
21602
21558
  * @param filter Describes which networks to return.
21559
+ * @returns Called with a dictionary of networks and their state properties when received.
21603
21560
  */
21604
21561
  export function getNetworks(
21605
21562
 
@@ -21610,7 +21567,6 @@ declare namespace chrome {
21610
21567
  * Returns a list of network objects with the same properties provided by {@link getState}. A filter is provided to specify the type of networks returned and to limit the number of networks. Networks are ordered by the system based on their priority, with connected or connecting networks listed first.
21611
21568
  *
21612
21569
  * @param filter Describes which networks to return.
21613
- * @param callback Called with a dictionary of networks and their state properties when received.
21614
21570
  */
21615
21571
  export function getNetworks(
21616
21572
 
@@ -21625,13 +21581,12 @@ declare namespace chrome {
21625
21581
  * Returns states of available networking devices.
21626
21582
  *
21627
21583
  * @chrome-returns-extra since Chrome 125
21584
+ * @returns Called with a list of devices and their state.
21628
21585
  */
21629
21586
  export function getDeviceStates(): Promise<DeviceStateProperties[]>;
21630
21587
 
21631
21588
  /**
21632
21589
  * Returns states of available networking devices.
21633
- *
21634
- * @param callback Called with a list of devices and their state.
21635
21590
  */
21636
21591
  export function getDeviceStates(
21637
21592
 
@@ -21678,6 +21633,7 @@ declare namespace chrome {
21678
21633
  *
21679
21634
  * @chrome-returns-extra since Chrome 125
21680
21635
  * @param networkGuid The GUID of the network to connect to.
21636
+ * @returns Called when the connect request has been sent. Note: the connection may not have completed. Observe {@link onNetworksChanged} to be notified when a network state changes. If the connect request immediately failed (e.g. the network is unconfigured), {@link runtime.lastError} will be set with a failure reason.
21681
21637
  */
21682
21638
  export function startConnect(
21683
21639
 
@@ -21688,7 +21644,6 @@ declare namespace chrome {
21688
21644
  * Starts a connection to the network with networkGuid.
21689
21645
  *
21690
21646
  * @param networkGuid The GUID of the network to connect to.
21691
- * @param callback Called when the connect request has been sent. Note: the connection may not have completed. Observe {@link onNetworksChanged} to be notified when a network state changes. If the connect request immediately failed (e.g. the network is unconfigured), {@link runtime.lastError} will be set with a failure reason.
21692
21647
  */
21693
21648
  export function startConnect(
21694
21649
 
@@ -21702,6 +21657,7 @@ declare namespace chrome {
21702
21657
  *
21703
21658
  * @chrome-returns-extra since Chrome 125
21704
21659
  * @param networkGuid The GUID of the network to disconnect from.
21660
+ * @returns Called when the disconnect request has been sent. See note for {@link startConnect}.
21705
21661
  */
21706
21662
  export function startDisconnect(
21707
21663
 
@@ -21712,7 +21668,6 @@ declare namespace chrome {
21712
21668
  * Starts a disconnect from the network with networkGuid.
21713
21669
  *
21714
21670
  * @param networkGuid The GUID of the network to disconnect from.
21715
- * @param callback Called when the disconnect request has been sent. See note for {@link startConnect}.
21716
21671
  */
21717
21672
  export function startDisconnect(
21718
21673
 
@@ -21726,6 +21681,7 @@ declare namespace chrome {
21726
21681
  *
21727
21682
  * @chrome-returns-extra since Chrome 125
21728
21683
  * @param networkGuid The GUID of the network to get captive portal status for.
21684
+ * @returns A callback function that returns the results of the query for network captive portal status.
21729
21685
  */
21730
21686
  export function getCaptivePortalStatus(
21731
21687
 
@@ -21736,7 +21692,6 @@ declare namespace chrome {
21736
21692
  * Returns captive portal status for the network matching 'networkGuid'.
21737
21693
  *
21738
21694
  * @param networkGuid The GUID of the network to get captive portal status for.
21739
- * @param callback A callback function that returns the results of the query for network captive portal status.
21740
21695
  */
21741
21696
  export function getCaptivePortalStatus(
21742
21697
 
@@ -21960,6 +21915,7 @@ declare namespace chrome {
21960
21915
 
21961
21916
  The `notificationId` parameter is required before Chrome 42.
21962
21917
  * @param options Contents of the notification.
21918
+ * @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
21963
21919
  */
21964
21920
  export function create(
21965
21921
 
@@ -21973,6 +21929,7 @@ declare namespace chrome {
21973
21929
  *
21974
21930
  * @chrome-returns-extra since Chrome 116
21975
21931
  * @param options Contents of the notification.
21932
+ * @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
21976
21933
  */
21977
21934
  export function create(
21978
21935
 
@@ -21988,11 +21945,6 @@ declare namespace chrome {
21988
21945
 
21989
21946
  The `notificationId` parameter is required before Chrome 42.
21990
21947
  * @param options Contents of the notification.
21991
- * @param callback
21992
-
21993
- Returns the notification id (either supplied or generated) that represents the created notification.
21994
-
21995
- The callback is required before Chrome 42.
21996
21948
  */
21997
21949
  export function create(
21998
21950
 
@@ -22009,11 +21961,6 @@ declare namespace chrome {
22009
21961
  * Creates and displays a notification.
22010
21962
  *
22011
21963
  * @param options Contents of the notification.
22012
- * @param callback
22013
-
22014
- Returns the notification id (either supplied or generated) that represents the created notification.
22015
-
22016
- The callback is required before Chrome 42.
22017
21964
  */
22018
21965
  export function create(
22019
21966
 
@@ -22030,6 +21977,7 @@ declare namespace chrome {
22030
21977
  * @chrome-returns-extra since Chrome 116
22031
21978
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
22032
21979
  * @param options Contents of the notification to update to.
21980
+ * @returns Returns a Promise which resolves to indicate whether a matching notification existed.
22033
21981
  */
22034
21982
  export function update(
22035
21983
 
@@ -22043,11 +21991,6 @@ declare namespace chrome {
22043
21991
  *
22044
21992
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
22045
21993
  * @param options Contents of the notification to update to.
22046
- * @param callback
22047
-
22048
- Called to indicate whether a matching notification existed.
22049
-
22050
- The callback is required before Chrome 42.
22051
21994
  */
22052
21995
  export function update(
22053
21996
 
@@ -22065,6 +22008,7 @@ declare namespace chrome {
22065
22008
  *
22066
22009
  * @chrome-returns-extra since Chrome 116
22067
22010
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
22011
+ * @returns Returns a Promise which resolves to indicate whether a matching notification existed.
22068
22012
  */
22069
22013
  export function clear(
22070
22014
 
@@ -22075,11 +22019,6 @@ declare namespace chrome {
22075
22019
  * Clears the specified notification.
22076
22020
  *
22077
22021
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
22078
- * @param callback
22079
-
22080
- Called to indicate whether a matching notification existed.
22081
-
22082
- The callback is required before Chrome 42.
22083
22022
  */
22084
22023
  export function clear(
22085
22024
 
@@ -22094,13 +22033,12 @@ declare namespace chrome {
22094
22033
  * Retrieves all the notifications of this app or extension.
22095
22034
  *
22096
22035
  * @chrome-returns-extra since Chrome 116
22036
+ * @returns Returns a Promise which resolves with the set of notification\_ids currently in the system.
22097
22037
  */
22098
22038
  export function getAll(): Promise<{[name: string]: any}>;
22099
22039
 
22100
22040
  /**
22101
22041
  * Retrieves all the notifications of this app or extension.
22102
- *
22103
- * @param callback Returns the set of notification\_ids currently in the system.
22104
22042
  */
22105
22043
  export function getAll(
22106
22044
 
@@ -22113,13 +22051,12 @@ declare namespace chrome {
22113
22051
  * Retrieves whether the user has enabled notifications from this app or extension.
22114
22052
  *
22115
22053
  * @chrome-returns-extra since Chrome 116
22054
+ * @returns Returns a Promise which resolves with the current permission level.
22116
22055
  */
22117
22056
  export function getPermissionLevel(): Promise<PermissionLevel>;
22118
22057
 
22119
22058
  /**
22120
22059
  * Retrieves whether the user has enabled notifications from this app or extension.
22121
- *
22122
- * @param callback Returns the current permission level.
22123
22060
  */
22124
22061
  export function getPermissionLevel(
22125
22062
 
@@ -22200,6 +22137,7 @@ declare namespace chrome {
22200
22137
  * Creates a new offscreen document for the extension.
22201
22138
  *
22202
22139
  * @param parameters The parameters describing the offscreen document to create.
22140
+ * @returns Promise that resolves when the offscreen document is created and has completed its initial page load.
22203
22141
  */
22204
22142
  export function createDocument(
22205
22143
 
@@ -22210,7 +22148,6 @@ declare namespace chrome {
22210
22148
  * Creates a new offscreen document for the extension.
22211
22149
  *
22212
22150
  * @param parameters The parameters describing the offscreen document to create.
22213
- * @param callback Invoked when the offscreen document is created and has completed its initial page load.
22214
22151
  */
22215
22152
  export function createDocument(
22216
22153
 
@@ -22221,13 +22158,13 @@ declare namespace chrome {
22221
22158
 
22222
22159
  /**
22223
22160
  * Closes the currently-open offscreen document for the extension.
22161
+ *
22162
+ * @returns Promise that resolves when the offscreen document has been closed.
22224
22163
  */
22225
22164
  export function closeDocument(): Promise<void>;
22226
22165
 
22227
22166
  /**
22228
22167
  * Closes the currently-open offscreen document for the extension.
22229
- *
22230
- * @param callback Invoked when the offscreen document has been closed.
22231
22168
  */
22232
22169
  export function closeDocument(
22233
22170
 
@@ -22648,6 +22585,7 @@ declare namespace chrome {
22648
22585
  * Saves the content of the tab with given id as MHTML.
22649
22586
  *
22650
22587
  * @chrome-returns-extra since Chrome 116
22588
+ * @returns Resolves when the MHTML has been generated.
22651
22589
  */
22652
22590
  export function saveAsMHTML(
22653
22591
 
@@ -22662,8 +22600,6 @@ declare namespace chrome {
22662
22600
 
22663
22601
  /**
22664
22602
  * Saves the content of the tab with given id as MHTML.
22665
- *
22666
- * @param callback Resolves when the MHTML has been generated.
22667
22603
  */
22668
22604
  export function saveAsMHTML(
22669
22605
 
@@ -24041,6 +23977,7 @@ declare namespace chrome {
24041
23977
  * Returns the ID of the renderer process for the specified tab.
24042
23978
  *
24043
23979
  * @param tabId The ID of the tab for which the renderer process ID is to be returned.
23980
+ * @returns A callback to return the ID of the renderer process of a tab.
24044
23981
  */
24045
23982
  export function getProcessIdForTab(
24046
23983
 
@@ -24051,7 +23988,6 @@ declare namespace chrome {
24051
23988
  * Returns the ID of the renderer process for the specified tab.
24052
23989
  *
24053
23990
  * @param tabId The ID of the tab for which the renderer process ID is to be returned.
24054
- * @param callback A callback to return the ID of the renderer process of a tab.
24055
23991
  */
24056
23992
  export function getProcessIdForTab(
24057
23993
 
@@ -24069,6 +24005,7 @@ declare namespace chrome {
24069
24005
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
24070
24006
  *
24071
24007
  * @param processId The ID of the process to be terminated.
24008
+ * @returns A callback to report the status of the termination.
24072
24009
  */
24073
24010
  export function terminate(
24074
24011
 
@@ -24079,7 +24016,6 @@ declare namespace chrome {
24079
24016
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
24080
24017
  *
24081
24018
  * @param processId The ID of the process to be terminated.
24082
- * @param callback A callback to report the status of the termination.
24083
24019
  */
24084
24020
  export function terminate(
24085
24021
 
@@ -24098,6 +24034,7 @@ declare namespace chrome {
24098
24034
  *
24099
24035
  * @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.
24100
24036
  * @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.
24037
+ * @returns A callback called when the processes information is collected.
24101
24038
  */
24102
24039
  export function getProcessInfo(
24103
24040
 
@@ -24111,7 +24048,6 @@ declare namespace chrome {
24111
24048
  *
24112
24049
  * @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.
24113
24050
  * @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.
24114
- * @param callback A callback called when the processes information is collected.
24115
24051
  */
24116
24052
  export function getProcessInfo(
24117
24053
 
@@ -24427,6 +24363,7 @@ declare namespace chrome {
24427
24363
  * Adds an entry to the reading list if it does not exist.
24428
24364
  *
24429
24365
  * @param entry The entry to add to the reading list.
24366
+ * @returns Resolves once the entry has been added.
24430
24367
  */
24431
24368
  export function addEntry(
24432
24369
 
@@ -24437,7 +24374,6 @@ declare namespace chrome {
24437
24374
  * Adds an entry to the reading list if it does not exist.
24438
24375
  *
24439
24376
  * @param entry The entry to add to the reading list.
24440
- * @param callback Invoked once the entry has been added.
24441
24377
  */
24442
24378
  export function addEntry(
24443
24379
 
@@ -24450,6 +24386,7 @@ declare namespace chrome {
24450
24386
  * Removes an entry from the reading list if it exists.
24451
24387
  *
24452
24388
  * @param info The entry to remove from the reading list.
24389
+ * @returns Resolves once the entry has been removed.
24453
24390
  */
24454
24391
  export function removeEntry(
24455
24392
 
@@ -24460,7 +24397,6 @@ declare namespace chrome {
24460
24397
  * Removes an entry from the reading list if it exists.
24461
24398
  *
24462
24399
  * @param info The entry to remove from the reading list.
24463
- * @param callback Invoked once the entry has been removed.
24464
24400
  */
24465
24401
  export function removeEntry(
24466
24402
 
@@ -24473,6 +24409,7 @@ declare namespace chrome {
24473
24409
  * Updates a reading list entry if it exists.
24474
24410
  *
24475
24411
  * @param info The entry to update.
24412
+ * @returns Resolves once the matched entries have been updated.
24476
24413
  */
24477
24414
  export function updateEntry(
24478
24415
 
@@ -24483,7 +24420,6 @@ declare namespace chrome {
24483
24420
  * Updates a reading list entry if it exists.
24484
24421
  *
24485
24422
  * @param info The entry to update.
24486
- * @param callback Invoked once the matched entries have been updated.
24487
24423
  */
24488
24424
  export function updateEntry(
24489
24425
 
@@ -24496,6 +24432,7 @@ declare namespace chrome {
24496
24432
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
24497
24433
  *
24498
24434
  * @param info The properties to search for.
24435
+ * @returns Resolves once the entries have been matched.
24499
24436
  */
24500
24437
  export function query(
24501
24438
 
@@ -24506,7 +24443,6 @@ declare namespace chrome {
24506
24443
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
24507
24444
  *
24508
24445
  * @param info The properties to search for.
24509
- * @param callback Invoked once the entries have been matched.
24510
24446
  */
24511
24447
  export function query(
24512
24448
 
@@ -25060,6 +24996,7 @@ declare namespace chrome {
25060
24996
  *
25061
24997
  * @chrome-returns-extra since Chrome 99
25062
24998
  * @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.
24999
+ * @returns Promise that resolves when the uninstall URL is set. If the given URL is invalid, the promise will be rejected.
25063
25000
  */
25064
25001
  export function setUninstallURL(
25065
25002
 
@@ -25070,7 +25007,6 @@ declare namespace chrome {
25070
25007
  * 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.
25071
25008
  *
25072
25009
  * @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.
25073
- * @param callback Called when the uninstall URL is set. If the given URL is invalid, {@link runtime.lastError} will be set.
25074
25010
  */
25075
25011
  export function setUninstallURL(
25076
25012
 
@@ -25154,6 +25090,7 @@ declare namespace chrome {
25154
25090
  *
25155
25091
  * @chrome-returns-extra since Chrome 99
25156
25092
  * @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
25093
+ * @returns Promise that resolves when a restart request was successfully rescheduled.
25157
25094
  * @since Chrome 53
25158
25095
  */
25159
25096
  export function restartAfterDelay(
@@ -25165,7 +25102,6 @@ declare namespace chrome {
25165
25102
  * 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.
25166
25103
  *
25167
25104
  * @param seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot.
25168
- * @param callback A callback to be invoked when a restart request was successfully rescheduled.
25169
25105
  * @since Chrome 53
25170
25106
  */
25171
25107
  export function restartAfterDelay(
@@ -25217,6 +25153,7 @@ declare namespace chrome {
25217
25153
  * @chrome-returns-extra since Chrome 99
25218
25154
  * @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).
25219
25155
  * @param message The message to send. This message should be a JSON-ifiable object.
25156
+ * @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.
25220
25157
  */
25221
25158
  export function sendMessage(
25222
25159
 
@@ -25238,6 +25175,7 @@ declare namespace chrome {
25238
25175
  *
25239
25176
  * @chrome-returns-extra since Chrome 99
25240
25177
  * @param message The message to send. This message should be a JSON-ifiable object.
25178
+ * @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.
25241
25179
  */
25242
25180
  export function sendMessage(
25243
25181
 
@@ -25257,7 +25195,6 @@ declare namespace chrome {
25257
25195
  *
25258
25196
  * @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).
25259
25197
  * @param message The message to send. This message should be a JSON-ifiable object.
25260
- * @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.
25261
25198
  */
25262
25199
  export function sendMessage(
25263
25200
 
@@ -25286,7 +25223,6 @@ declare namespace chrome {
25286
25223
  * 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}.
25287
25224
  *
25288
25225
  * @param message The message to send. This message should be a JSON-ifiable object.
25289
- * @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.
25290
25226
  */
25291
25227
  export function sendMessage(
25292
25228
 
@@ -25350,13 +25286,12 @@ declare namespace chrome {
25350
25286
  * Returns information about the current platform.
25351
25287
  *
25352
25288
  * @chrome-returns-extra since Chrome 99
25289
+ * @returns Promise that resolves with information about the current platform.
25353
25290
  */
25354
25291
  export function getPlatformInfo(): Promise<PlatformInfo>;
25355
25292
 
25356
25293
  /**
25357
25294
  * Returns information about the current platform.
25358
- *
25359
- * @param callback Called with results
25360
25295
  */
25361
25296
  export function getPlatformInfo(
25362
25297
 
@@ -25389,6 +25324,7 @@ declare namespace chrome {
25389
25324
  * Fetches information about active contexts associated with this extension
25390
25325
  *
25391
25326
  * @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.
25327
+ * @returns Promise that resolves with the matching contexts, if any.
25392
25328
  * @since Chrome 116
25393
25329
  * @chrome-min-manifest MV3
25394
25330
  */
@@ -25401,7 +25337,6 @@ declare namespace chrome {
25401
25337
  * Fetches information about active contexts associated with this extension
25402
25338
  *
25403
25339
  * @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.
25404
- * @param callback Invoked with the matching contexts, if any.
25405
25340
  * @since Chrome 116
25406
25341
  * @chrome-min-manifest MV3
25407
25342
  */
@@ -25628,6 +25563,7 @@ declare namespace chrome {
25628
25563
  *
25629
25564
  * @chrome-returns-extra since Chrome 90
25630
25565
  * @param injection The details of the script which to inject.
25566
+ * @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.
25631
25567
  */
25632
25568
  export function executeScript(
25633
25569
 
@@ -25638,7 +25574,6 @@ declare namespace chrome {
25638
25574
  * 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.
25639
25575
  *
25640
25576
  * @param injection The details of the script which to inject.
25641
- * @param callback Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
25642
25577
  */
25643
25578
  export function executeScript(
25644
25579
 
@@ -25654,6 +25589,7 @@ declare namespace chrome {
25654
25589
  *
25655
25590
  * @chrome-returns-extra since Chrome 90
25656
25591
  * @param injection The details of the styles to insert.
25592
+ * @returns Returns a Promise which resolves upon completion of the insertion.
25657
25593
  */
25658
25594
  export function insertCSS(
25659
25595
 
@@ -25664,7 +25600,6 @@ declare namespace chrome {
25664
25600
  * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
25665
25601
  *
25666
25602
  * @param injection The details of the styles to insert.
25667
- * @param callback Invoked upon completion of the insertion.
25668
25603
  */
25669
25604
  export function insertCSS(
25670
25605
 
@@ -25677,6 +25612,7 @@ declare namespace chrome {
25677
25612
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
25678
25613
  *
25679
25614
  * @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.
25615
+ * @returns Returns a Promise which resolves upon the completion of the removal.
25680
25616
  * @since Chrome 90
25681
25617
  */
25682
25618
  export function removeCSS(
@@ -25688,7 +25624,6 @@ declare namespace chrome {
25688
25624
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
25689
25625
  *
25690
25626
  * @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.
25691
- * @param callback A callback to be invoked upon the completion of the removal.
25692
25627
  * @since Chrome 90
25693
25628
  */
25694
25629
  export function removeCSS(
@@ -25702,6 +25637,7 @@ declare namespace chrome {
25702
25637
  * Registers one or more content scripts for this extension.
25703
25638
  *
25704
25639
  * @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.
25640
+ * @returns Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
25705
25641
  * @since Chrome 96
25706
25642
  */
25707
25643
  export function registerContentScripts(
@@ -25713,7 +25649,6 @@ declare namespace chrome {
25713
25649
  * Registers one or more content scripts for this extension.
25714
25650
  *
25715
25651
  * @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.
25716
- * @param callback A callback to be invoked once scripts have been fully registered or if an error has occurred.
25717
25652
  * @since Chrome 96
25718
25653
  */
25719
25654
  export function registerContentScripts(
@@ -25753,6 +25688,7 @@ declare namespace chrome {
25753
25688
  * Unregisters content scripts for this extension.
25754
25689
  *
25755
25690
  * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
25691
+ * @returns Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
25756
25692
  * @since Chrome 96
25757
25693
  */
25758
25694
  export function unregisterContentScripts(
@@ -25764,7 +25700,6 @@ declare namespace chrome {
25764
25700
  * Unregisters content scripts for this extension.
25765
25701
  *
25766
25702
  * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
25767
- * @param callback A callback to be invoked once scripts have been unregistered or if an error has occurred.
25768
25703
  * @since Chrome 96
25769
25704
  */
25770
25705
  export function unregisterContentScripts(
@@ -25778,6 +25713,7 @@ declare namespace chrome {
25778
25713
  * Updates one or more content scripts for this extension.
25779
25714
  *
25780
25715
  * @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.
25716
+ * @returns Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
25781
25717
  * @since Chrome 96
25782
25718
  */
25783
25719
  export function updateContentScripts(
@@ -25789,7 +25725,6 @@ declare namespace chrome {
25789
25725
  * Updates one or more content scripts for this extension.
25790
25726
  *
25791
25727
  * @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.
25792
- * @param callback A callback to be invoked once scripts have been updated or if an error has occurred.
25793
25728
  * @since Chrome 96
25794
25729
  */
25795
25730
  export function updateContentScripts(
@@ -26125,13 +26060,12 @@ declare namespace chrome {
26125
26060
  * Returns information about available serial devices on the system. The list is regenerated each time this method is called.
26126
26061
  *
26127
26062
  * @chrome-returns-extra since Chrome 117
26063
+ * @returns Called with the list of `DeviceInfo` objects.
26128
26064
  */
26129
26065
  export function getDevices(): Promise<DeviceInfo[]>;
26130
26066
 
26131
26067
  /**
26132
26068
  * Returns information about available serial devices on the system. The list is regenerated each time this method is called.
26133
- *
26134
- * @param callback Called with the list of `DeviceInfo` objects.
26135
26069
  */
26136
26070
  export function getDevices(
26137
26071
 
@@ -26146,6 +26080,7 @@ declare namespace chrome {
26146
26080
  * @chrome-returns-extra since Chrome 117
26147
26081
  * @param path The system path of the serial port to open.
26148
26082
  * @param options Port configuration options.
26083
+ * @returns Called when the connection has been opened.
26149
26084
  */
26150
26085
  export function connect(
26151
26086
 
@@ -26159,7 +26094,6 @@ declare namespace chrome {
26159
26094
  *
26160
26095
  * @param path The system path of the serial port to open.
26161
26096
  * @param options Port configuration options.
26162
- * @param callback Called when the connection has been opened.
26163
26097
  */
26164
26098
  export function connect(
26165
26099
 
@@ -26178,6 +26112,7 @@ declare namespace chrome {
26178
26112
  * @chrome-returns-extra since Chrome 117
26179
26113
  * @param connectionId The id of the opened connection.
26180
26114
  * @param options Port configuration options.
26115
+ * @returns Called when the configuation has completed.
26181
26116
  */
26182
26117
  export function update(
26183
26118
 
@@ -26191,7 +26126,6 @@ declare namespace chrome {
26191
26126
  *
26192
26127
  * @param connectionId The id of the opened connection.
26193
26128
  * @param options Port configuration options.
26194
- * @param callback Called when the configuation has completed.
26195
26129
  */
26196
26130
  export function update(
26197
26131
 
@@ -26209,6 +26143,7 @@ declare namespace chrome {
26209
26143
  *
26210
26144
  * @chrome-returns-extra since Chrome 117
26211
26145
  * @param connectionId The id of the opened connection.
26146
+ * @returns Called when the connection has been closed.
26212
26147
  */
26213
26148
  export function disconnect(
26214
26149
 
@@ -26219,7 +26154,6 @@ declare namespace chrome {
26219
26154
  * Disconnects from a serial port.
26220
26155
  *
26221
26156
  * @param connectionId The id of the opened connection.
26222
- * @param callback Called when the connection has been closed.
26223
26157
  */
26224
26158
  export function disconnect(
26225
26159
 
@@ -26236,6 +26170,7 @@ declare namespace chrome {
26236
26170
  * @chrome-returns-extra since Chrome 117
26237
26171
  * @param connectionId The id of the opened connection.
26238
26172
  * @param paused Flag to indicate whether to pause or unpause.
26173
+ * @returns Called when the connection has been successfully paused or unpaused.
26239
26174
  */
26240
26175
  export function setPaused(
26241
26176
 
@@ -26249,7 +26184,6 @@ declare namespace chrome {
26249
26184
  *
26250
26185
  * @param connectionId The id of the opened connection.
26251
26186
  * @param paused Flag to indicate whether to pause or unpause.
26252
- * @param callback Called when the connection has been successfully paused or unpaused.
26253
26187
  */
26254
26188
  export function setPaused(
26255
26189
 
@@ -26265,6 +26199,7 @@ declare namespace chrome {
26265
26199
  *
26266
26200
  * @chrome-returns-extra since Chrome 117
26267
26201
  * @param connectionId The id of the opened connection.
26202
+ * @returns Called with connection state information when available.
26268
26203
  */
26269
26204
  export function getInfo(
26270
26205
 
@@ -26275,7 +26210,6 @@ declare namespace chrome {
26275
26210
  * Retrieves the state of a given connection.
26276
26211
  *
26277
26212
  * @param connectionId The id of the opened connection.
26278
- * @param callback Called with connection state information when available.
26279
26213
  */
26280
26214
  export function getInfo(
26281
26215
 
@@ -26290,13 +26224,12 @@ declare namespace chrome {
26290
26224
  * Retrieves the list of currently opened serial port connections owned by the application.
26291
26225
  *
26292
26226
  * @chrome-returns-extra since Chrome 117
26227
+ * @returns Called with the list of connections when available.
26293
26228
  */
26294
26229
  export function getConnections(): Promise<ConnectionInfo[]>;
26295
26230
 
26296
26231
  /**
26297
26232
  * Retrieves the list of currently opened serial port connections owned by the application.
26298
- *
26299
- * @param callback Called with the list of connections when available.
26300
26233
  */
26301
26234
  export function getConnections(
26302
26235
 
@@ -26311,6 +26244,7 @@ declare namespace chrome {
26311
26244
  * @chrome-returns-extra since Chrome 117
26312
26245
  * @param connectionId The id of the connection.
26313
26246
  * @param data The data to send.
26247
+ * @returns Called when the operation has completed.
26314
26248
  */
26315
26249
  export function send(
26316
26250
 
@@ -26324,7 +26258,6 @@ declare namespace chrome {
26324
26258
  *
26325
26259
  * @param connectionId The id of the connection.
26326
26260
  * @param data The data to send.
26327
- * @param callback Called when the operation has completed.
26328
26261
  */
26329
26262
  export function send(
26330
26263
 
@@ -26364,6 +26297,7 @@ declare namespace chrome {
26364
26297
  *
26365
26298
  * @chrome-returns-extra since Chrome 117
26366
26299
  * @param connectionId The id of the connection.
26300
+ * @returns Called when the control signals are available.
26367
26301
  */
26368
26302
  export function getControlSignals(
26369
26303
 
@@ -26374,7 +26308,6 @@ declare namespace chrome {
26374
26308
  * Retrieves the state of control signals on a given connection.
26375
26309
  *
26376
26310
  * @param connectionId The id of the connection.
26377
- * @param callback Called when the control signals are available.
26378
26311
  */
26379
26312
  export function getControlSignals(
26380
26313
 
@@ -26391,6 +26324,7 @@ declare namespace chrome {
26391
26324
  * @chrome-returns-extra since Chrome 117
26392
26325
  * @param connectionId The id of the connection.
26393
26326
  * @param signals The set of signal changes to send to the device.
26327
+ * @returns Called once the control signals have been set.
26394
26328
  */
26395
26329
  export function setControlSignals(
26396
26330
 
@@ -26404,7 +26338,6 @@ declare namespace chrome {
26404
26338
  *
26405
26339
  * @param connectionId The id of the connection.
26406
26340
  * @param signals The set of signal changes to send to the device.
26407
- * @param callback Called once the control signals have been set.
26408
26341
  */
26409
26342
  export function setControlSignals(
26410
26343
 
@@ -26802,6 +26735,7 @@ declare namespace chrome {
26802
26735
  * Configures the side panel.
26803
26736
  *
26804
26737
  * @param options The configuration options to apply to the panel.
26738
+ * @returns Returns a Promise which resolves when the options have been set.
26805
26739
  */
26806
26740
  export function setOptions(
26807
26741
 
@@ -26812,7 +26746,6 @@ declare namespace chrome {
26812
26746
  * Configures the side panel.
26813
26747
  *
26814
26748
  * @param options The configuration options to apply to the panel.
26815
- * @param callback Invoked when the options have been set.
26816
26749
  */
26817
26750
  export function setOptions(
26818
26751
 
@@ -26825,6 +26758,7 @@ declare namespace chrome {
26825
26758
  * Returns the active panel configuration.
26826
26759
  *
26827
26760
  * @param options Specifies the context to return the configuration for.
26761
+ * @returns Returns a Promise which resolves with the active panel configuration.
26828
26762
  */
26829
26763
  export function getOptions(
26830
26764
 
@@ -26835,7 +26769,6 @@ declare namespace chrome {
26835
26769
  * Returns the active panel configuration.
26836
26770
  *
26837
26771
  * @param options Specifies the context to return the configuration for.
26838
- * @param callback Called with the active panel configuration.
26839
26772
  */
26840
26773
  export function getOptions(
26841
26774
 
@@ -26850,6 +26783,7 @@ declare namespace chrome {
26850
26783
  * Configures the extension's side panel behavior. This is an upsert operation.
26851
26784
  *
26852
26785
  * @param behavior The new behavior to be set.
26786
+ * @returns Returns a Promise which resolves when the new behavior has been set.
26853
26787
  */
26854
26788
  export function setPanelBehavior(
26855
26789
 
@@ -26860,7 +26794,6 @@ declare namespace chrome {
26860
26794
  * Configures the extension's side panel behavior. This is an upsert operation.
26861
26795
  *
26862
26796
  * @param behavior The new behavior to be set.
26863
- * @param callback Called when the new behavior has been set.
26864
26797
  */
26865
26798
  export function setPanelBehavior(
26866
26799
 
@@ -26871,13 +26804,13 @@ declare namespace chrome {
26871
26804
 
26872
26805
  /**
26873
26806
  * Returns the extension's current side panel behavior.
26807
+ *
26808
+ * @returns Returns a Promise which resolves with the extension's side panel behavior.
26874
26809
  */
26875
26810
  export function getPanelBehavior(): Promise<PanelBehavior>;
26876
26811
 
26877
26812
  /**
26878
26813
  * Returns the extension's current side panel behavior.
26879
- *
26880
- * @param callback Called with the extension's side panel behavior.
26881
26814
  */
26882
26815
  export function getPanelBehavior(
26883
26816
 
@@ -26890,6 +26823,7 @@ declare namespace chrome {
26890
26823
  * Opens the side panel for the extension. This may only be called in response to a user action.
26891
26824
  *
26892
26825
  * @param options Specifies the context in which to open the side panel.
26826
+ * @returns Returns a Promise which resolves when the side panel has been opened.
26893
26827
  * @since Chrome 116
26894
26828
  */
26895
26829
  export function open(
@@ -26901,7 +26835,6 @@ declare namespace chrome {
26901
26835
  * Opens the side panel for the extension. This may only be called in response to a user action.
26902
26836
  *
26903
26837
  * @param options Specifies the context in which to open the side panel.
26904
- * @param callback Called when the side panel has been opened.
26905
26838
  * @since Chrome 116
26906
26839
  */
26907
26840
  export function open(
@@ -26914,6 +26847,7 @@ declare namespace chrome {
26914
26847
  /**
26915
26848
  * Returns the side panel's current layout.
26916
26849
  *
26850
+ * @returns Returns a Promise which resolves with a {@link PanelLayout}.
26917
26851
  * @since Chrome 140
26918
26852
  */
26919
26853
  export function getLayout(): Promise<PanelLayout>;
@@ -26921,7 +26855,6 @@ declare namespace chrome {
26921
26855
  /**
26922
26856
  * Returns the side panel's current layout.
26923
26857
  *
26924
- * @param callback Called with a {@link PanelLayout} containing the side value.
26925
26858
  * @since Chrome 140
26926
26859
  */
26927
26860
  export function getLayout(
@@ -27080,6 +27013,7 @@ declare namespace chrome {
27080
27013
  * @chrome-returns-extra since Chrome 121
27081
27014
  * @param type The type of socket to create. Must be `tcp` or `udp`.
27082
27015
  * @param options The socket options.
27016
+ * @returns Called when the socket has been created.
27083
27017
  */
27084
27018
  export function create(
27085
27019
 
@@ -27093,7 +27027,6 @@ declare namespace chrome {
27093
27027
  *
27094
27028
  * @param type The type of socket to create. Must be `tcp` or `udp`.
27095
27029
  * @param options The socket options.
27096
- * @param callback Called when the socket has been created.
27097
27030
  */
27098
27031
  export function create(
27099
27032
 
@@ -27398,6 +27331,7 @@ declare namespace chrome {
27398
27331
  *
27399
27332
  * @chrome-returns-extra since Chrome 121
27400
27333
  * @param socketId The socketId.
27334
+ * @returns Called when the state is available.
27401
27335
  */
27402
27336
  export function getInfo(
27403
27337
 
@@ -27408,7 +27342,6 @@ declare namespace chrome {
27408
27342
  * Retrieves the state of the given socket.
27409
27343
  *
27410
27344
  * @param socketId The socketId.
27411
- * @param callback Called when the state is available.
27412
27345
  */
27413
27346
  export function getInfo(
27414
27347
 
@@ -27423,13 +27356,12 @@ declare namespace chrome {
27423
27356
  * Retrieves information about local adapters on this system.
27424
27357
  *
27425
27358
  * @chrome-returns-extra since Chrome 121
27359
+ * @returns Called when local adapter information is available.
27426
27360
  */
27427
27361
  export function getNetworkList(): Promise<NetworkInterface[]>;
27428
27362
 
27429
27363
  /**
27430
27364
  * Retrieves information about local adapters on this system.
27431
- *
27432
- * @param callback Called when local adapter information is available.
27433
27365
  */
27434
27366
  export function getNetworkList(
27435
27367
 
@@ -27740,6 +27672,7 @@ declare namespace chrome {
27740
27672
  *
27741
27673
  * @chrome-returns-extra since Chrome 121
27742
27674
  * @param properties The socket properties (optional).
27675
+ * @returns Called when the socket has been created.
27743
27676
  */
27744
27677
  export function create(
27745
27678
 
@@ -27750,7 +27683,6 @@ declare namespace chrome {
27750
27683
  * Creates a TCP socket.
27751
27684
  *
27752
27685
  * @param properties The socket properties (optional).
27753
- * @param callback Called when the socket has been created.
27754
27686
  */
27755
27687
  export function create(
27756
27688
 
@@ -27770,6 +27702,7 @@ declare namespace chrome {
27770
27702
  * @chrome-returns-extra since Chrome 121
27771
27703
  * @param socketId The socket identifier.
27772
27704
  * @param properties The properties to update.
27705
+ * @returns Called when the properties are updated.
27773
27706
  */
27774
27707
  export function update(
27775
27708
 
@@ -27783,7 +27716,6 @@ declare namespace chrome {
27783
27716
  *
27784
27717
  * @param socketId The socket identifier.
27785
27718
  * @param properties The properties to update.
27786
- * @param callback Called when the properties are updated.
27787
27719
  */
27788
27720
  export function update(
27789
27721
 
@@ -27798,6 +27730,7 @@ declare namespace chrome {
27798
27730
  * 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.
27799
27731
  *
27800
27732
  * @chrome-returns-extra since Chrome 121
27733
+ * @returns Callback from the `setPaused` method.
27801
27734
  */
27802
27735
  export function setPaused(
27803
27736
 
@@ -27808,8 +27741,6 @@ declare namespace chrome {
27808
27741
 
27809
27742
  /**
27810
27743
  * 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.
27811
- *
27812
- * @param callback Callback from the `setPaused` method.
27813
27744
  */
27814
27745
  export function setPaused(
27815
27746
 
@@ -27945,6 +27876,7 @@ declare namespace chrome {
27945
27876
  *
27946
27877
  * @chrome-returns-extra since Chrome 121
27947
27878
  * @param socketId The socket identifier.
27879
+ * @returns Called when the disconnect attempt is complete.
27948
27880
  */
27949
27881
  export function disconnect(
27950
27882
 
@@ -27955,7 +27887,6 @@ declare namespace chrome {
27955
27887
  * Disconnects the socket.
27956
27888
  *
27957
27889
  * @param socketId The socket identifier.
27958
- * @param callback Called when the disconnect attempt is complete.
27959
27890
  */
27960
27891
  export function disconnect(
27961
27892
 
@@ -28023,6 +27954,7 @@ declare namespace chrome {
28023
27954
  *
28024
27955
  * @chrome-returns-extra since Chrome 121
28025
27956
  * @param socketId The socket identifier.
27957
+ * @returns Called when the `close` operation completes.
28026
27958
  */
28027
27959
  export function close(
28028
27960
 
@@ -28033,7 +27965,6 @@ declare namespace chrome {
28033
27965
  * 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.
28034
27966
  *
28035
27967
  * @param socketId The socket identifier.
28036
- * @param callback Called when the `close` operation completes.
28037
27968
  */
28038
27969
  export function close(
28039
27970
 
@@ -28047,6 +27978,7 @@ declare namespace chrome {
28047
27978
  *
28048
27979
  * @chrome-returns-extra since Chrome 121
28049
27980
  * @param socketId The socket identifier.
27981
+ * @returns Called when the socket state is available.
28050
27982
  */
28051
27983
  export function getInfo(
28052
27984
 
@@ -28057,7 +27989,6 @@ declare namespace chrome {
28057
27989
  * Retrieves the state of the given socket.
28058
27990
  *
28059
27991
  * @param socketId The socket identifier.
28060
- * @param callback Called when the socket state is available.
28061
27992
  */
28062
27993
  export function getInfo(
28063
27994
 
@@ -28075,13 +28006,12 @@ declare namespace chrome {
28075
28006
  * Retrieves the list of currently opened sockets owned by the application.
28076
28007
  *
28077
28008
  * @chrome-returns-extra since Chrome 121
28009
+ * @returns Called when the list of sockets is available.
28078
28010
  */
28079
28011
  export function getSockets(): Promise<SocketInfo[]>;
28080
28012
 
28081
28013
  /**
28082
28014
  * Retrieves the list of currently opened sockets owned by the application.
28083
- *
28084
- * @param callback Called when the list of sockets is available.
28085
28015
  */
28086
28016
  export function getSockets(
28087
28017
 
@@ -28205,6 +28135,7 @@ declare namespace chrome {
28205
28135
  *
28206
28136
  * @chrome-returns-extra since Chrome 121
28207
28137
  * @param properties The socket properties (optional).
28138
+ * @returns Called when the socket has been created.
28208
28139
  */
28209
28140
  export function create(
28210
28141
 
@@ -28215,7 +28146,6 @@ declare namespace chrome {
28215
28146
  * Creates a TCP server socket.
28216
28147
  *
28217
28148
  * @param properties The socket properties (optional).
28218
- * @param callback Called when the socket has been created.
28219
28149
  */
28220
28150
  export function create(
28221
28151
 
@@ -28235,6 +28165,7 @@ declare namespace chrome {
28235
28165
  * @chrome-returns-extra since Chrome 121
28236
28166
  * @param socketId The socket identifier.
28237
28167
  * @param properties The properties to update.
28168
+ * @returns Called when the properties are updated.
28238
28169
  */
28239
28170
  export function update(
28240
28171
 
@@ -28248,7 +28179,6 @@ declare namespace chrome {
28248
28179
  *
28249
28180
  * @param socketId The socket identifier.
28250
28181
  * @param properties The properties to update.
28251
- * @param callback Called when the properties are updated.
28252
28182
  */
28253
28183
  export function update(
28254
28184
 
@@ -28263,6 +28193,7 @@ declare namespace chrome {
28263
28193
  * 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.
28264
28194
  *
28265
28195
  * @chrome-returns-extra since Chrome 121
28196
+ * @returns Callback from the `setPaused` method.
28266
28197
  */
28267
28198
  export function setPaused(
28268
28199
 
@@ -28273,8 +28204,6 @@ declare namespace chrome {
28273
28204
 
28274
28205
  /**
28275
28206
  * 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.
28276
- *
28277
- * @param callback Callback from the `setPaused` method.
28278
28207
  */
28279
28208
  export function setPaused(
28280
28209
 
@@ -28341,6 +28270,7 @@ declare namespace chrome {
28341
28270
  *
28342
28271
  * @chrome-returns-extra since Chrome 121
28343
28272
  * @param socketId The socket identifier.
28273
+ * @returns Called when the disconnect attempt is complete.
28344
28274
  */
28345
28275
  export function disconnect(
28346
28276
 
@@ -28351,7 +28281,6 @@ declare namespace chrome {
28351
28281
  * 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.
28352
28282
  *
28353
28283
  * @param socketId The socket identifier.
28354
- * @param callback Called when the disconnect attempt is complete.
28355
28284
  */
28356
28285
  export function disconnect(
28357
28286
 
@@ -28365,6 +28294,7 @@ declare namespace chrome {
28365
28294
  *
28366
28295
  * @chrome-returns-extra since Chrome 121
28367
28296
  * @param socketId The socket identifier.
28297
+ * @returns Called when the `close` operation completes.
28368
28298
  */
28369
28299
  export function close(
28370
28300
 
@@ -28375,7 +28305,6 @@ declare namespace chrome {
28375
28305
  * 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.
28376
28306
  *
28377
28307
  * @param socketId The socket identifier.
28378
- * @param callback Called when the `close` operation completes.
28379
28308
  */
28380
28309
  export function close(
28381
28310
 
@@ -28389,6 +28318,7 @@ declare namespace chrome {
28389
28318
  *
28390
28319
  * @chrome-returns-extra since Chrome 121
28391
28320
  * @param socketId The socket identifier.
28321
+ * @returns Called when the socket state is available.
28392
28322
  */
28393
28323
  export function getInfo(
28394
28324
 
@@ -28399,7 +28329,6 @@ declare namespace chrome {
28399
28329
  * Retrieves the state of the given socket.
28400
28330
  *
28401
28331
  * @param socketId The socket identifier.
28402
- * @param callback Called when the socket state is available.
28403
28332
  */
28404
28333
  export function getInfo(
28405
28334
 
@@ -28417,13 +28346,12 @@ declare namespace chrome {
28417
28346
  * Retrieves the list of currently opened sockets owned by the application.
28418
28347
  *
28419
28348
  * @chrome-returns-extra since Chrome 121
28349
+ * @returns Called when the list of sockets is available.
28420
28350
  */
28421
28351
  export function getSockets(): Promise<SocketInfo[]>;
28422
28352
 
28423
28353
  /**
28424
28354
  * Retrieves the list of currently opened sockets owned by the application.
28425
- *
28426
- * @param callback Called when the list of sockets is available.
28427
28355
  */
28428
28356
  export function getSockets(
28429
28357
 
@@ -28587,6 +28515,7 @@ declare namespace chrome {
28587
28515
  *
28588
28516
  * @chrome-returns-extra since Chrome 121
28589
28517
  * @param properties The socket properties (optional).
28518
+ * @returns Called when the socket has been created.
28590
28519
  */
28591
28520
  export function create(
28592
28521
 
@@ -28597,7 +28526,6 @@ declare namespace chrome {
28597
28526
  * Creates a UDP socket with the given properties.
28598
28527
  *
28599
28528
  * @param properties The socket properties (optional).
28600
- * @param callback Called when the socket has been created.
28601
28529
  */
28602
28530
  export function create(
28603
28531
 
@@ -28617,6 +28545,7 @@ declare namespace chrome {
28617
28545
  * @chrome-returns-extra since Chrome 121
28618
28546
  * @param socketId The socket ID.
28619
28547
  * @param properties The properties to update.
28548
+ * @returns Called when the properties are updated.
28620
28549
  */
28621
28550
  export function update(
28622
28551
 
@@ -28630,7 +28559,6 @@ declare namespace chrome {
28630
28559
  *
28631
28560
  * @param socketId The socket ID.
28632
28561
  * @param properties The properties to update.
28633
- * @param callback Called when the properties are updated.
28634
28562
  */
28635
28563
  export function update(
28636
28564
 
@@ -28646,6 +28574,7 @@ declare namespace chrome {
28646
28574
  *
28647
28575
  * @chrome-returns-extra since Chrome 121
28648
28576
  * @param paused Flag to indicate whether to pause or unpause.
28577
+ * @returns Called when the socket has been successfully paused or unpaused.
28649
28578
  */
28650
28579
  export function setPaused(
28651
28580
 
@@ -28658,7 +28587,6 @@ declare namespace chrome {
28658
28587
  * Pauses or unpauses a socket. A paused socket is blocked from firing `onReceive` events.
28659
28588
  *
28660
28589
  * @param paused Flag to indicate whether to pause or unpause.
28661
- * @param callback Called when the socket has been successfully paused or unpaused.
28662
28590
  */
28663
28591
  export function setPaused(
28664
28592
 
@@ -28760,6 +28688,7 @@ declare namespace chrome {
28760
28688
  *
28761
28689
  * @chrome-returns-extra since Chrome 121
28762
28690
  * @param socketId The socket ID.
28691
+ * @returns Called when the `close` operation completes.
28763
28692
  */
28764
28693
  export function close(
28765
28694
 
@@ -28770,7 +28699,6 @@ declare namespace chrome {
28770
28699
  * 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.
28771
28700
  *
28772
28701
  * @param socketId The socket ID.
28773
- * @param callback Called when the `close` operation completes.
28774
28702
  */
28775
28703
  export function close(
28776
28704
 
@@ -28784,6 +28712,7 @@ declare namespace chrome {
28784
28712
  *
28785
28713
  * @chrome-returns-extra since Chrome 121
28786
28714
  * @param socketId The socket ID.
28715
+ * @returns Called when the socket state is available.
28787
28716
  */
28788
28717
  export function getInfo(
28789
28718
 
@@ -28794,7 +28723,6 @@ declare namespace chrome {
28794
28723
  * Retrieves the state of the given socket.
28795
28724
  *
28796
28725
  * @param socketId The socket ID.
28797
- * @param callback Called when the socket state is available.
28798
28726
  */
28799
28727
  export function getInfo(
28800
28728
 
@@ -28812,13 +28740,12 @@ declare namespace chrome {
28812
28740
  * Retrieves the list of currently opened sockets owned by the application.
28813
28741
  *
28814
28742
  * @chrome-returns-extra since Chrome 121
28743
+ * @returns Called when the list of sockets is available.
28815
28744
  */
28816
28745
  export function getSockets(): Promise<SocketInfo[]>;
28817
28746
 
28818
28747
  /**
28819
28748
  * Retrieves the list of currently opened sockets owned by the application.
28820
- *
28821
- * @param callback Called when the list of sockets is available.
28822
28749
  */
28823
28750
  export function getSockets(
28824
28751
 
@@ -28927,6 +28854,7 @@ declare namespace chrome {
28927
28854
  *
28928
28855
  * @chrome-returns-extra since Chrome 121
28929
28856
  * @param socketId The socket ID.
28857
+ * @returns Called with an array of strings of the result.
28930
28858
  */
28931
28859
  export function getJoinedGroups(
28932
28860
 
@@ -28937,7 +28865,6 @@ declare namespace chrome {
28937
28865
  * Gets the multicast group addresses the socket is currently joined to.
28938
28866
  *
28939
28867
  * @param socketId The socket ID.
28940
- * @param callback Called with an array of strings of the result.
28941
28868
  */
28942
28869
  export function getJoinedGroups(
28943
28870
 
@@ -29019,6 +28946,7 @@ declare namespace chrome {
29019
28946
  *
29020
28947
  * @chrome-returns-extra since Chrome 95
29021
28948
  * @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.
28949
+ * @returns Promise that resolves with storage items, or rejects on failure.
29022
28950
  */
29023
28951
  get(
29024
28952
 
@@ -29029,7 +28957,6 @@ declare namespace chrome {
29029
28957
  * Gets one or more items from storage.
29030
28958
  *
29031
28959
  * @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.
29032
- * @param callback Callback with storage items, or on failure (in which case {@link runtime.lastError} will be set).
29033
28960
  */
29034
28961
  get(
29035
28962
 
@@ -29046,6 +28973,7 @@ declare namespace chrome {
29046
28973
  /**
29047
28974
  * Gets all keys from storage.
29048
28975
  *
28976
+ * @returns Promise that resolves with storage keys, or rejects on failure.
29049
28977
  * @since Chrome 130
29050
28978
  */
29051
28979
  getKeys(): Promise<string[]>;
@@ -29053,7 +28981,6 @@ declare namespace chrome {
29053
28981
  /**
29054
28982
  * Gets all keys from storage.
29055
28983
  *
29056
- * @param callback Callback with storage keys, or on failure (in which case {@link runtime.lastError} will be set).
29057
28984
  * @since Chrome 130
29058
28985
  */
29059
28986
  getKeys(
@@ -29071,6 +28998,7 @@ declare namespace chrome {
29071
28998
  *
29072
28999
  * @chrome-returns-extra since Chrome 95
29073
29000
  * @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.
29001
+ * @returns Promise that resolves with the amount of space being used by storage, or rejects on failure.
29074
29002
  */
29075
29003
  getBytesInUse(
29076
29004
 
@@ -29081,7 +29009,6 @@ declare namespace chrome {
29081
29009
  * Gets the amount of space (in bytes) being used by one or more items.
29082
29010
  *
29083
29011
  * @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.
29084
- * @param callback Callback with the amount of space being used by storage, or on failure (in which case {@link runtime.lastError} will be set).
29085
29012
  */
29086
29013
  getBytesInUse(
29087
29014
 
@@ -29104,6 +29031,7 @@ declare namespace chrome {
29104
29031
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
29105
29032
 
29106
29033
  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).
29034
+ * @returns Promise that resolves on success, or rejects on failure.
29107
29035
  */
29108
29036
  set(
29109
29037
 
@@ -29118,7 +29046,6 @@ declare namespace chrome {
29118
29046
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
29119
29047
 
29120
29048
  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).
29121
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
29122
29049
  */
29123
29050
  set(
29124
29051
 
@@ -29132,6 +29059,7 @@ declare namespace chrome {
29132
29059
  *
29133
29060
  * @chrome-returns-extra since Chrome 95
29134
29061
  * @param keys A single key or a list of keys for items to remove.
29062
+ * @returns Promise that resolves on success, or rejects on failure.
29135
29063
  */
29136
29064
  remove(
29137
29065
 
@@ -29142,7 +29070,6 @@ declare namespace chrome {
29142
29070
  * Removes one or more items from storage.
29143
29071
  *
29144
29072
  * @param keys A single key or a list of keys for items to remove.
29145
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
29146
29073
  */
29147
29074
  remove(
29148
29075
 
@@ -29155,13 +29082,12 @@ declare namespace chrome {
29155
29082
  * Removes all items from storage.
29156
29083
  *
29157
29084
  * @chrome-returns-extra since Chrome 95
29085
+ * @returns Promise that resolves on success, or rejects on failure.
29158
29086
  */
29159
29087
  clear(): Promise<void>;
29160
29088
 
29161
29089
  /**
29162
29090
  * Removes all items from storage.
29163
- *
29164
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
29165
29091
  */
29166
29092
  clear(
29167
29093
 
@@ -29171,6 +29097,7 @@ declare namespace chrome {
29171
29097
  /**
29172
29098
  * 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.
29173
29099
  *
29100
+ * @returns Promise that resolves on success, or rejects on failure.
29174
29101
  * @since Chrome 102
29175
29102
  */
29176
29103
  setAccessLevel(
@@ -29187,7 +29114,6 @@ declare namespace chrome {
29187
29114
  /**
29188
29115
  * 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.
29189
29116
  *
29190
- * @param callback Callback on success, or on failure (in which case {@link runtime.lastError} will be set).
29191
29117
  * @since Chrome 102
29192
29118
  */
29193
29119
  setAccessLevel(
@@ -29390,6 +29316,7 @@ declare namespace chrome {
29390
29316
  * Note this call can fail. For example, if the user is not signed in to Chrome or if there is no network operation. To handle these errors it is important chrome.runtime.lastError is checked in the callback.
29391
29317
  *
29392
29318
  * @chrome-returns-extra since Chrome 117
29319
+ * @returns A callback type for requestFileSystem.
29393
29320
  */
29394
29321
  export function requestFileSystem(): Promise<DOMFileSystem>;
29395
29322
 
@@ -29399,8 +29326,6 @@ declare namespace chrome {
29399
29326
  * Calling this multiple times from the same app will return the same handle to the same file system.
29400
29327
  *
29401
29328
  * Note this call can fail. For example, if the user is not signed in to Chrome or if there is no network operation. To handle these errors it is important chrome.runtime.lastError is checked in the callback.
29402
- *
29403
- * @param callback A callback type for requestFileSystem.
29404
29329
  */
29405
29330
  export function requestFileSystem(
29406
29331
 
@@ -29413,6 +29338,7 @@ declare namespace chrome {
29413
29338
  * Sets the default conflict resolution policy for the `'syncable'` file storage for the app. By default it is set to `'last_write_win'`. When conflict resolution policy is set to `'last_write_win'` conflicts for existing files are automatically resolved next time the file is updated. `callback` can be optionally given to know if the request has succeeded or not.
29414
29339
  *
29415
29340
  * @chrome-returns-extra since Chrome 117
29341
+ * @returns A generic result callback to indicate success or failure.
29416
29342
  */
29417
29343
  export function setConflictResolutionPolicy(
29418
29344
 
@@ -29421,8 +29347,6 @@ declare namespace chrome {
29421
29347
 
29422
29348
  /**
29423
29349
  * Sets the default conflict resolution policy for the `'syncable'` file storage for the app. By default it is set to `'last_write_win'`. When conflict resolution policy is set to `'last_write_win'` conflicts for existing files are automatically resolved next time the file is updated. `callback` can be optionally given to know if the request has succeeded or not.
29424
- *
29425
- * @param callback A generic result callback to indicate success or failure.
29426
29350
  */
29427
29351
  export function setConflictResolutionPolicy(
29428
29352
 
@@ -29435,13 +29359,12 @@ declare namespace chrome {
29435
29359
  * Gets the current conflict resolution policy.
29436
29360
  *
29437
29361
  * @chrome-returns-extra since Chrome 117
29362
+ * @returns A callback type for getConflictResolutionPolicy.
29438
29363
  */
29439
29364
  export function getConflictResolutionPolicy(): Promise<ConflictResolutionPolicy>;
29440
29365
 
29441
29366
  /**
29442
29367
  * Gets the current conflict resolution policy.
29443
- *
29444
- * @param callback A callback type for getConflictResolutionPolicy.
29445
29368
  */
29446
29369
  export function getConflictResolutionPolicy(
29447
29370
 
@@ -29454,6 +29377,7 @@ declare namespace chrome {
29454
29377
  * Returns the current usage and quota in bytes for the `'syncable'` file storage for the app.
29455
29378
  *
29456
29379
  * @chrome-returns-extra since Chrome 117
29380
+ * @returns A callback type for getUsageAndQuota.
29457
29381
  */
29458
29382
  export function getUsageAndQuota(
29459
29383
 
@@ -29462,8 +29386,6 @@ declare namespace chrome {
29462
29386
 
29463
29387
  /**
29464
29388
  * Returns the current usage and quota in bytes for the `'syncable'` file storage for the app.
29465
- *
29466
- * @param callback A callback type for getUsageAndQuota.
29467
29389
  */
29468
29390
  export function getUsageAndQuota(
29469
29391
 
@@ -29478,6 +29400,7 @@ declare namespace chrome {
29478
29400
  * Returns the {@link FileStatus} for the given `fileEntry`. The status value can be `'synced'`, `'pending'` or `'conflicting'`. Note that `'conflicting'` state only happens when the service's conflict resolution policy is set to `'manual'`.
29479
29401
  *
29480
29402
  * @chrome-returns-extra since Chrome 117
29403
+ * @returns A callback type for getFileStatus.
29481
29404
  */
29482
29405
  export function getFileStatus(
29483
29406
 
@@ -29486,8 +29409,6 @@ declare namespace chrome {
29486
29409
 
29487
29410
  /**
29488
29411
  * Returns the {@link FileStatus} for the given `fileEntry`. The status value can be `'synced'`, `'pending'` or `'conflicting'`. Note that `'conflicting'` state only happens when the service's conflict resolution policy is set to `'manual'`.
29489
- *
29490
- * @param callback A callback type for getFileStatus.
29491
29412
  */
29492
29413
  export function getFileStatus(
29493
29414
 
@@ -29502,6 +29423,7 @@ declare namespace chrome {
29502
29423
  * Returns each {@link FileStatus} for the given `fileEntry` array. Typically called with the result from dirReader.readEntries().
29503
29424
  *
29504
29425
  * @chrome-returns-extra since Chrome 117
29426
+ * @returns A callback type for getFileStatuses.
29505
29427
  */
29506
29428
  export function getFileStatuses(
29507
29429
 
@@ -29510,8 +29432,6 @@ declare namespace chrome {
29510
29432
 
29511
29433
  /**
29512
29434
  * Returns each {@link FileStatus} for the given `fileEntry` array. Typically called with the result from dirReader.readEntries().
29513
- *
29514
- * @param callback A callback type for getFileStatuses.
29515
29435
  */
29516
29436
  export function getFileStatuses(
29517
29437
 
@@ -29526,13 +29446,12 @@ declare namespace chrome {
29526
29446
  * Returns the current sync backend status.
29527
29447
  *
29528
29448
  * @chrome-returns-extra since Chrome 117
29449
+ * @returns A callback type for getServiceStatus.
29529
29450
  */
29530
29451
  export function getServiceStatus(): Promise<ServiceStatus>;
29531
29452
 
29532
29453
  /**
29533
29454
  * Returns the current sync backend status.
29534
- *
29535
- * @param callback A callback type for getServiceStatus.
29536
29455
  */
29537
29456
  export function getServiceStatus(
29538
29457
 
@@ -30097,6 +30016,7 @@ declare namespace chrome {
30097
30016
  *
30098
30017
  * @chrome-returns-extra since Chrome 91
30099
30018
  * @param flags Options affecting how the information is returned.
30019
+ * @returns Promise that resolves with the results.
30100
30020
  */
30101
30021
  export function getInfo(
30102
30022
 
@@ -30110,7 +30030,6 @@ declare namespace chrome {
30110
30030
  * Requests the information for all attached display devices.
30111
30031
  *
30112
30032
  * @param flags Options affecting how the information is returned.
30113
- * @param callback The callback to invoke with the results.
30114
30033
  */
30115
30034
  export function getInfo(
30116
30035
 
@@ -30128,6 +30047,7 @@ declare namespace chrome {
30128
30047
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
30129
30048
  *
30130
30049
  * @chrome-returns-extra since Chrome 91
30050
+ * @returns Promise that resolves with the results.
30131
30051
  * @since Chrome 53
30132
30052
  */
30133
30053
  export function getDisplayLayout(): Promise<DisplayLayout[]>;
@@ -30135,7 +30055,6 @@ declare namespace chrome {
30135
30055
  /**
30136
30056
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
30137
30057
  *
30138
- * @param callback The callback to invoke with the results.
30139
30058
  * @since Chrome 53
30140
30059
  */
30141
30060
  export function getDisplayLayout(
@@ -30151,6 +30070,7 @@ declare namespace chrome {
30151
30070
  * @chrome-returns-extra since Chrome 91
30152
30071
  * @param id The display's unique identifier.
30153
30072
  * @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`.
30073
+ * @returns Promise that resolves when the function finishes.
30154
30074
  */
30155
30075
  export function setDisplayProperties(
30156
30076
 
@@ -30164,7 +30084,6 @@ declare namespace chrome {
30164
30084
  *
30165
30085
  * @param id The display's unique identifier.
30166
30086
  * @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`.
30167
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
30168
30087
  */
30169
30088
  export function setDisplayProperties(
30170
30089
 
@@ -30180,6 +30099,7 @@ declare namespace chrome {
30180
30099
  *
30181
30100
  * @chrome-returns-extra since Chrome 91
30182
30101
  * @param layouts The layout information, required for all displays except the primary display.
30102
+ * @returns Promise that resolves when the function finishes.
30183
30103
  * @since Chrome 53
30184
30104
  */
30185
30105
  export function setDisplayLayout(
@@ -30191,7 +30111,6 @@ declare namespace chrome {
30191
30111
  * 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.
30192
30112
  *
30193
30113
  * @param layouts The layout information, required for all displays except the primary display.
30194
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
30195
30114
  * @since Chrome 53
30196
30115
  */
30197
30116
  export function setDisplayLayout(
@@ -30264,6 +30183,7 @@ declare namespace chrome {
30264
30183
  *
30265
30184
  * @chrome-returns-extra since Chrome 91
30266
30185
  * @param id The display's unique identifier.
30186
+ * @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.
30267
30187
  * @since Chrome 57
30268
30188
  */
30269
30189
  export function showNativeTouchCalibration(
@@ -30275,7 +30195,6 @@ declare namespace chrome {
30275
30195
  * 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.
30276
30196
  *
30277
30197
  * @param id The display's unique identifier.
30278
- * @param callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not.
30279
30198
  * @since Chrome 57
30280
30199
  */
30281
30200
  export function showNativeTouchCalibration(
@@ -30328,6 +30247,7 @@ declare namespace chrome {
30328
30247
  *
30329
30248
  * @chrome-returns-extra since Chrome 91
30330
30249
  * @param info The information of the mirror mode that should be applied to the display mode.
30250
+ * @returns Promise that resolves when the function finishes.
30331
30251
  * @since Chrome 65
30332
30252
  */
30333
30253
  export function setMirrorMode(
@@ -30339,7 +30259,6 @@ declare namespace chrome {
30339
30259
  * 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.
30340
30260
  *
30341
30261
  * @param info The information of the mirror mode that should be applied to the display mode.
30342
- * @param callback Empty function called when the function finishes. To find out whether the function succeeded, {@link runtime.lastError} should be queried.
30343
30262
  * @since Chrome 65
30344
30263
  */
30345
30264
  export function setMirrorMode(
@@ -30418,13 +30337,12 @@ declare namespace chrome {
30418
30337
  * Retrieves information about local adapters on this system.
30419
30338
  *
30420
30339
  * @chrome-returns-extra since Chrome 91
30340
+ * @returns Called when local adapter information is available.
30421
30341
  */
30422
30342
  export function getNetworkInterfaces(): Promise<NetworkInterface[]>;
30423
30343
 
30424
30344
  /**
30425
30345
  * Retrieves information about local adapters on this system.
30426
- *
30427
- * @param callback Called when local adapter information is available.
30428
30346
  */
30429
30347
  export function getNetworkInterfaces(
30430
30348
 
@@ -30598,6 +30516,7 @@ declare namespace chrome {
30598
30516
  * Adds a new log record.
30599
30517
  *
30600
30518
  * @param options The logging options.
30519
+ * @returns Returns a Promise which resolves once the log has been added.
30601
30520
  */
30602
30521
  export function add(
30603
30522
 
@@ -30608,7 +30527,6 @@ declare namespace chrome {
30608
30527
  * Adds a new log record.
30609
30528
  *
30610
30529
  * @param options The logging options.
30611
- * @param callback A callback to invoke once the log has been added.
30612
30530
  */
30613
30531
  export function add(
30614
30532
 
@@ -30706,13 +30624,12 @@ declare namespace chrome {
30706
30624
  * 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).
30707
30625
  *
30708
30626
  * @chrome-returns-extra since Chrome 116
30627
+ * @returns Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
30709
30628
  */
30710
30629
  export function getCapturedTabs(): Promise<CaptureInfo[]>;
30711
30630
 
30712
30631
  /**
30713
30632
  * 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).
30714
- *
30715
- * @param callback Callback invoked with CaptureInfo\[\] for captured tabs.
30716
30633
  */
30717
30634
  export function getCapturedTabs(
30718
30635
 
@@ -30725,6 +30642,7 @@ declare namespace chrome {
30725
30642
  * 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.
30726
30643
  *
30727
30644
  * @chrome-returns-extra since Chrome 116
30645
+ * @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.
30728
30646
  * @since Chrome 71
30729
30647
  */
30730
30648
  export function getMediaStreamId(
@@ -30735,7 +30653,6 @@ declare namespace chrome {
30735
30653
  /**
30736
30654
  * 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.
30737
30655
  *
30738
- * @param callback Callback to invoke with the result. If successful, the result is an opaque string that can be passed to the `getUserMedia()` API to generate a media stream that corresponds to the target tab. The created `streamId` can only be used once and expires after a few seconds if it is not used.
30739
30656
  * @since Chrome 71
30740
30657
  */
30741
30658
  export function getMediaStreamId(
@@ -32742,6 +32659,7 @@ declare namespace chrome {
32742
32659
  * @chrome-returns-extra since Chrome 88
32743
32660
  * @param tabId The ID of the tab in which to run the script; defaults to the active tab of the current window.
32744
32661
  * @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
32662
+ * @returns Resolves after all the JavaScript has been executed.
32745
32663
  * @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
32746
32664
  * @chrome-max-manifest MV2
32747
32665
  * @chrome-deprecated-since Chrome 91
@@ -32758,6 +32676,7 @@ declare namespace chrome {
32758
32676
  *
32759
32677
  * @chrome-returns-extra since Chrome 88
32760
32678
  * @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
32679
+ * @returns Resolves after all the JavaScript has been executed.
32761
32680
  * @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
32762
32681
  * @chrome-max-manifest MV2
32763
32682
  * @chrome-deprecated-since Chrome 91
@@ -32772,7 +32691,6 @@ declare namespace chrome {
32772
32691
  *
32773
32692
  * @param tabId The ID of the tab in which to run the script; defaults to the active tab of the current window.
32774
32693
  * @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
32775
- * @param callback Resolves after all the JavaScript has been executed.
32776
32694
  * @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
32777
32695
  * @chrome-max-manifest MV2
32778
32696
  * @chrome-deprecated-since Chrome 91
@@ -32795,7 +32713,6 @@ declare namespace chrome {
32795
32713
  * Injects JavaScript code into a page. For details, see the [programmatic injection](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#programmatic) section of the content scripts doc.
32796
32714
  *
32797
32715
  * @param details Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.
32798
- * @param callback Resolves after all the JavaScript has been executed.
32799
32716
  * @deprecated Replaced by {@link scripting.executeScript} in Manifest V3.
32800
32717
  * @chrome-max-manifest MV2
32801
32718
  * @chrome-deprecated-since Chrome 91
@@ -32818,6 +32735,7 @@ declare namespace chrome {
32818
32735
  * @chrome-returns-extra since Chrome 88
32819
32736
  * @param tabId The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
32820
32737
  * @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
32738
+ * @returns Resolves when all the CSS has been inserted.
32821
32739
  * @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
32822
32740
  * @chrome-max-manifest MV2
32823
32741
  * @chrome-deprecated-since Chrome 91
@@ -32834,6 +32752,7 @@ declare namespace chrome {
32834
32752
  *
32835
32753
  * @chrome-returns-extra since Chrome 88
32836
32754
  * @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
32755
+ * @returns Resolves when all the CSS has been inserted.
32837
32756
  * @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
32838
32757
  * @chrome-max-manifest MV2
32839
32758
  * @chrome-deprecated-since Chrome 91
@@ -32848,7 +32767,6 @@ declare namespace chrome {
32848
32767
  *
32849
32768
  * @param tabId The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
32850
32769
  * @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
32851
- * @param callback Resolves when all the CSS has been inserted.
32852
32770
  * @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
32853
32771
  * @chrome-max-manifest MV2
32854
32772
  * @chrome-deprecated-since Chrome 91
@@ -32866,7 +32784,6 @@ declare namespace chrome {
32866
32784
  * Injects CSS into a page. Styles inserted with this method can be removed with {@link scripting.removeCSS}. For details, see the [programmatic injection](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#programmatic) section of the content scripts doc.
32867
32785
  *
32868
32786
  * @param details Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.
32869
- * @param callback Resolves when all the CSS has been inserted.
32870
32787
  * @deprecated Replaced by {@link scripting.insertCSS} in Manifest V3.
32871
32788
  * @chrome-max-manifest MV2
32872
32789
  * @chrome-deprecated-since Chrome 91
@@ -32884,6 +32801,7 @@ declare namespace chrome {
32884
32801
  * @chrome-returns-extra since Chrome 88
32885
32802
  * @param tabId The ID of the tab from which to remove the CSS; defaults to the active tab of the current window.
32886
32803
  * @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
32804
+ * @returns Resolves when all the CSS has been removed.
32887
32805
  * @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
32888
32806
  * @since Chrome 87
32889
32807
  * @chrome-max-manifest MV2
@@ -32901,6 +32819,7 @@ declare namespace chrome {
32901
32819
  *
32902
32820
  * @chrome-returns-extra since Chrome 88
32903
32821
  * @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
32822
+ * @returns Resolves when all the CSS has been removed.
32904
32823
  * @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
32905
32824
  * @since Chrome 87
32906
32825
  * @chrome-max-manifest MV2
@@ -32916,7 +32835,6 @@ declare namespace chrome {
32916
32835
  *
32917
32836
  * @param tabId The ID of the tab from which to remove the CSS; defaults to the active tab of the current window.
32918
32837
  * @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
32919
- * @param callback Resolves when all the CSS has been removed.
32920
32838
  * @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
32921
32839
  * @since Chrome 87
32922
32840
  * @chrome-max-manifest MV2
@@ -32935,7 +32853,6 @@ declare namespace chrome {
32935
32853
  * Removes from a page CSS that was previously injected by a call to {@link scripting.insertCSS}.
32936
32854
  *
32937
32855
  * @param details Details of the CSS text to remove. Either the code or the file property must be set, but both may not be set at the same time.
32938
- * @param callback Resolves when all the CSS has been removed.
32939
32856
  * @deprecated Replaced by {@link scripting.removeCSS} in Manifest V3.
32940
32857
  * @since Chrome 87
32941
32858
  * @chrome-max-manifest MV2
@@ -32954,6 +32871,7 @@ declare namespace chrome {
32954
32871
  * @chrome-returns-extra since Chrome 88
32955
32872
  * @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
32956
32873
  * @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.
32874
+ * @returns Resolves after the zoom factor has been changed.
32957
32875
  */
32958
32876
  export function setZoom(
32959
32877
 
@@ -32967,6 +32885,7 @@ declare namespace chrome {
32967
32885
  *
32968
32886
  * @chrome-returns-extra since Chrome 88
32969
32887
  * @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.
32888
+ * @returns Resolves after the zoom factor has been changed.
32970
32889
  */
32971
32890
  export function setZoom(
32972
32891
 
@@ -32978,7 +32897,6 @@ declare namespace chrome {
32978
32897
  *
32979
32898
  * @param tabId The ID of the tab to zoom; defaults to the active tab of the current window.
32980
32899
  * @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.
32981
- * @param callback Resolves after the zoom factor has been changed.
32982
32900
  */
32983
32901
  export function setZoom(
32984
32902
 
@@ -32993,7 +32911,6 @@ declare namespace chrome {
32993
32911
  * Zooms a specified tab.
32994
32912
  *
32995
32913
  * @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.
32996
- * @param callback Resolves after the zoom factor has been changed.
32997
32914
  */
32998
32915
  export function setZoom(
32999
32916
 
@@ -33007,6 +32924,7 @@ declare namespace chrome {
33007
32924
  *
33008
32925
  * @chrome-returns-extra since Chrome 88
33009
32926
  * @param tabId The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
32927
+ * @returns Resolves with the tab's current zoom factor after it has been fetched.
33010
32928
  */
33011
32929
  export function getZoom(
33012
32930
 
@@ -33017,7 +32935,6 @@ declare namespace chrome {
33017
32935
  * Gets the current zoom factor of a specified tab.
33018
32936
  *
33019
32937
  * @param tabId The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
33020
- * @param callback Resolves with the tab's current zoom factor after it has been fetched.
33021
32938
  */
33022
32939
  export function getZoom(
33023
32940
 
@@ -33037,6 +32954,7 @@ declare namespace chrome {
33037
32954
  * @chrome-returns-extra since Chrome 88
33038
32955
  * @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
33039
32956
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
32957
+ * @returns Resolves after the zoom settings are changed.
33040
32958
  */
33041
32959
  export function setZoomSettings(
33042
32960
 
@@ -33050,6 +32968,7 @@ declare namespace chrome {
33050
32968
  *
33051
32969
  * @chrome-returns-extra since Chrome 88
33052
32970
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
32971
+ * @returns Resolves after the zoom settings are changed.
33053
32972
  */
33054
32973
  export function setZoomSettings(
33055
32974
 
@@ -33061,7 +32980,6 @@ declare namespace chrome {
33061
32980
  *
33062
32981
  * @param tabId The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
33063
32982
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
33064
- * @param callback Resolves after the zoom settings are changed.
33065
32983
  */
33066
32984
  export function setZoomSettings(
33067
32985
 
@@ -33076,7 +32994,6 @@ declare namespace chrome {
33076
32994
  * 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.
33077
32995
  *
33078
32996
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
33079
- * @param callback Resolves after the zoom settings are changed.
33080
32997
  */
33081
32998
  export function setZoomSettings(
33082
32999
 
@@ -33090,6 +33007,7 @@ declare namespace chrome {
33090
33007
  *
33091
33008
  * @chrome-returns-extra since Chrome 88
33092
33009
  * @param tabId The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
33010
+ * @returns Resolves with the tab's current zoom settings.
33093
33011
  */
33094
33012
  export function getZoomSettings(
33095
33013
 
@@ -33100,7 +33018,6 @@ declare namespace chrome {
33100
33018
  * Gets the current zoom settings of a specified tab.
33101
33019
  *
33102
33020
  * @param tabId The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
33103
- * @param callback Resolves with the tab's current zoom settings.
33104
33021
  */
33105
33022
  export function getZoomSettings(
33106
33023
 
@@ -33119,6 +33036,7 @@ declare namespace chrome {
33119
33036
  *
33120
33037
  * @chrome-returns-extra since Chrome 88
33121
33038
  * @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.
33039
+ * @returns Resolves after the operation is completed.
33122
33040
  * @since Chrome 54
33123
33041
  */
33124
33042
  export function discard(
@@ -33130,7 +33048,6 @@ declare namespace chrome {
33130
33048
  * Discards a tab from memory. Discarded tabs are still visible on the tab strip and are reloaded when activated.
33131
33049
  *
33132
33050
  * @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.
33133
- * @param callback Resolves after the operation is completed.
33134
33051
  * @since Chrome 54
33135
33052
  */
33136
33053
  export function discard(
@@ -33406,6 +33323,7 @@ declare namespace chrome {
33406
33323
  * @chrome-returns-extra since Chrome 101
33407
33324
  * @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.
33408
33325
  * @param options The speech options.
33326
+ * @returns Resolves right away, before speech finishes. If an error occurs, the promise will be rejected. Use options.onEvent to get more detailed feedback.
33409
33327
  */
33410
33328
  export function speak(
33411
33329
 
@@ -33419,7 +33337,6 @@ declare namespace chrome {
33419
33337
  *
33420
33338
  * @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.
33421
33339
  * @param options The speech options.
33422
- * @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.
33423
33340
  */
33424
33341
  export function speak(
33425
33342
 
@@ -33894,6 +33811,7 @@ declare namespace chrome {
33894
33811
  *
33895
33812
  * @chrome-returns-extra since Chrome 96
33896
33813
  * @param details Which setting to change.
33814
+ * @returns Called at the completion of the set operation.
33897
33815
  */
33898
33816
  set(
33899
33817
 
@@ -33916,7 +33834,6 @@ declare namespace chrome {
33916
33834
  * Sets the value of a setting.
33917
33835
  *
33918
33836
  * @param details Which setting to change.
33919
- * @param callback Called at the completion of the set operation.
33920
33837
  */
33921
33838
  set(
33922
33839
 
@@ -33942,6 +33859,7 @@ declare namespace chrome {
33942
33859
  *
33943
33860
  * @chrome-returns-extra since Chrome 96
33944
33861
  * @param details Which setting to clear.
33862
+ * @returns Called at the completion of the clear operation.
33945
33863
  */
33946
33864
  clear(
33947
33865
 
@@ -33958,7 +33876,6 @@ declare namespace chrome {
33958
33876
  * Clears the setting, restoring any default value.
33959
33877
  *
33960
33878
  * @param details Which setting to clear.
33961
- * @param callback Called at the completion of the clear operation.
33962
33879
  */
33963
33880
  clear(
33964
33881
 
@@ -34432,6 +34349,7 @@ declare namespace chrome {
34432
34349
  *
34433
34350
  * @chrome-returns-extra since Chrome 116
34434
34351
  * @param options Configuration of the device picker dialog box.
34352
+ * @returns Invoked with a list of chosen {@link Device}s.
34435
34353
  */
34436
34354
  export function getUserSelectedDevices(
34437
34355
 
@@ -34442,7 +34360,6 @@ declare namespace chrome {
34442
34360
  * Presents a device picker to the user and returns the {@link Device}s selected. If the user cancels the picker devices will be empty. A user gesture is required for the dialog to display. Without a user gesture, the callback will run as though the user cancelled.
34443
34361
  *
34444
34362
  * @param options Configuration of the device picker dialog box.
34445
- * @param callback Invoked with a list of chosen {@link Device}s.
34446
34363
  */
34447
34364
  export function getUserSelectedDevices(
34448
34365
 
@@ -35122,6 +35039,7 @@ declare namespace chrome {
35122
35039
  * Registers one or more user scripts for this extension.
35123
35040
  *
35124
35041
  * @param scripts Contains a list of user scripts to be registered.
35042
+ * @returns Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
35125
35043
  */
35126
35044
  export function register(
35127
35045
 
@@ -35132,7 +35050,6 @@ declare namespace chrome {
35132
35050
  * Registers one or more user scripts for this extension.
35133
35051
  *
35134
35052
  * @param scripts Contains a list of user scripts to be registered.
35135
- * @param callback Called once scripts have been fully registered or if an error has ocurred.
35136
35053
  */
35137
35054
  export function register(
35138
35055
 
@@ -35145,6 +35062,7 @@ declare namespace chrome {
35145
35062
  * Returns all dynamically-registered user scripts for this extension.
35146
35063
  *
35147
35064
  * @param filter If specified, this method returns only the user scripts that match it.
35065
+ * @returns Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
35148
35066
  */
35149
35067
  export function getScripts(
35150
35068
 
@@ -35155,7 +35073,6 @@ declare namespace chrome {
35155
35073
  * Returns all dynamically-registered user scripts for this extension.
35156
35074
  *
35157
35075
  * @param filter If specified, this method returns only the user scripts that match it.
35158
- * @param callback Called once scripts have been fully registered or if an error occurs.
35159
35076
  */
35160
35077
  export function getScripts(
35161
35078
 
@@ -35170,6 +35087,7 @@ declare namespace chrome {
35170
35087
  * Unregisters all dynamically-registered user scripts for this extension.
35171
35088
  *
35172
35089
  * @param filter If specified, this method unregisters only the user scripts that match it.
35090
+ * @returns Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
35173
35091
  */
35174
35092
  export function unregister(
35175
35093
 
@@ -35180,7 +35098,6 @@ declare namespace chrome {
35180
35098
  * Unregisters all dynamically-registered user scripts for this extension.
35181
35099
  *
35182
35100
  * @param filter If specified, this method unregisters only the user scripts that match it.
35183
- * @param callback Called once scripts have been fully unregistered or if an error ocurs
35184
35101
  */
35185
35102
  export function unregister(
35186
35103
 
@@ -35193,6 +35110,7 @@ declare namespace chrome {
35193
35110
  * Updates one or more user scripts for this extension.
35194
35111
  *
35195
35112
  * @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.
35113
+ * @returns Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
35196
35114
  */
35197
35115
  export function update(
35198
35116
 
@@ -35203,7 +35121,6 @@ declare namespace chrome {
35203
35121
  * Updates one or more user scripts for this extension.
35204
35122
  *
35205
35123
  * @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.
35206
- * @param callback Called once scripts have been fully updated or if an error occurs.
35207
35124
  */
35208
35125
  export function update(
35209
35126
 
@@ -35240,6 +35157,7 @@ declare namespace chrome {
35240
35157
  * Configures the `` `USER_SCRIPT` `` execution environment.
35241
35158
  *
35242
35159
  * @param properties Contains the user script world configuration.
35160
+ * @returns Promise that resolves once the world has been configured.
35243
35161
  */
35244
35162
  export function configureWorld(
35245
35163
 
@@ -35250,7 +35168,6 @@ declare namespace chrome {
35250
35168
  * Configures the `` `USER_SCRIPT` `` execution environment.
35251
35169
  *
35252
35170
  * @param properties Contains the user script world configuration.
35253
- * @param callback Called once world hase been configured.
35254
35171
  */
35255
35172
  export function configureWorld(
35256
35173
 
@@ -35262,6 +35179,7 @@ declare namespace chrome {
35262
35179
  /**
35263
35180
  * Retrieves all registered world configurations.
35264
35181
  *
35182
+ * @returns Promise that resolves with the registered world configurations.
35265
35183
  * @since Chrome 133
35266
35184
  */
35267
35185
  export function getWorldConfigurations(): Promise<WorldProperties[]>;
@@ -35269,7 +35187,6 @@ declare namespace chrome {
35269
35187
  /**
35270
35188
  * Retrieves all registered world configurations.
35271
35189
  *
35272
- * @param callback Called with the registered world configurations.
35273
35190
  * @since Chrome 133
35274
35191
  */
35275
35192
  export function getWorldConfigurations(
@@ -35283,6 +35200,7 @@ declare namespace chrome {
35283
35200
  * 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.
35284
35201
  *
35285
35202
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
35203
+ * @returns Promise that resolves when the configuration is reset.
35286
35204
  * @since Chrome 133
35287
35205
  */
35288
35206
  export function resetWorldConfiguration(
@@ -35294,7 +35212,6 @@ declare namespace chrome {
35294
35212
  * 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.
35295
35213
  *
35296
35214
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
35297
- * @param callback Called when the configuration is reset.
35298
35215
  * @since Chrome 133
35299
35216
  */
35300
35217
  export function resetWorldConfiguration(
@@ -35348,6 +35265,7 @@ declare namespace chrome {
35348
35265
  *
35349
35266
  * @chrome-returns-extra since Chrome 96
35350
35267
  * @param restrictions the preferences to enabled/disabled virtual keyboard features.
35268
+ * @returns Invoked with the values which were updated.
35351
35269
  */
35352
35270
  export function restrictFeatures(
35353
35271
 
@@ -35358,7 +35276,6 @@ declare namespace chrome {
35358
35276
  * Sets restrictions on features provided by the virtual keyboard.
35359
35277
  *
35360
35278
  * @param restrictions the preferences to enabled/disabled virtual keyboard features.
35361
- * @param callback Invoked with the values which were updated.
35362
35279
  */
35363
35280
  export function restrictFeatures(
35364
35281
 
@@ -35506,6 +35423,7 @@ declare namespace chrome {
35506
35423
  *
35507
35424
  * @chrome-returns-extra since Chrome 96
35508
35425
  * @param name The name of the VPN configuration.
35426
+ * @returns Returns a Promise which resolves when the configuration is created or rejects if there is an error.
35509
35427
  */
35510
35428
  export function createConfig(
35511
35429
 
@@ -35516,7 +35434,6 @@ declare namespace chrome {
35516
35434
  * Creates a new VPN configuration that persists across multiple login sessions of the user.
35517
35435
  *
35518
35436
  * @param name The name of the VPN configuration.
35519
- * @param callback Called when the configuration is created or if there is an error.
35520
35437
  */
35521
35438
  export function createConfig(
35522
35439
 
@@ -35535,6 +35452,7 @@ declare namespace chrome {
35535
35452
  *
35536
35453
  * @chrome-returns-extra since Chrome 96
35537
35454
  * @param id ID of the VPN configuration to destroy.
35455
+ * @returns Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
35538
35456
  */
35539
35457
  export function destroyConfig(
35540
35458
 
@@ -35545,7 +35463,6 @@ declare namespace chrome {
35545
35463
  * Destroys a VPN configuration created by the extension.
35546
35464
  *
35547
35465
  * @param id ID of the VPN configuration to destroy.
35548
- * @param callback Called when the configuration is destroyed or if there is an error.
35549
35466
  */
35550
35467
  export function destroyConfig(
35551
35468
 
@@ -35559,6 +35476,7 @@ declare namespace chrome {
35559
35476
  *
35560
35477
  * @chrome-returns-extra since Chrome 96
35561
35478
  * @param parameters The parameters for the VPN session.
35479
+ * @returns Returns a Promise which resolves when the parameters are set or rejects if there is an error.
35562
35480
  */
35563
35481
  export function setParameters(
35564
35482
 
@@ -35569,7 +35487,6 @@ declare namespace chrome {
35569
35487
  * 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.
35570
35488
  *
35571
35489
  * @param parameters The parameters for the VPN session.
35572
- * @param callback Called when the parameters are set or if there is an error.
35573
35490
  */
35574
35491
  export function setParameters(
35575
35492
 
@@ -35583,6 +35500,7 @@ declare namespace chrome {
35583
35500
  *
35584
35501
  * @chrome-returns-extra since Chrome 96
35585
35502
  * @param data The IP packet to be sent to the platform.
35503
+ * @returns Returns a Promise which resolves when the packet is sent or rejects if there is an error.
35586
35504
  */
35587
35505
  export function sendPacket(
35588
35506
 
@@ -35593,7 +35511,6 @@ declare namespace chrome {
35593
35511
  * 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.
35594
35512
  *
35595
35513
  * @param data The IP packet to be sent to the platform.
35596
- * @param callback Called when the packet is sent or if there is an error.
35597
35514
  */
35598
35515
  export function sendPacket(
35599
35516
 
@@ -35607,6 +35524,7 @@ declare namespace chrome {
35607
35524
  *
35608
35525
  * @chrome-returns-extra since Chrome 96
35609
35526
  * @param state The VPN session state of the VPN client.
35527
+ * @returns Returns a Promise which resolves when the notification is complete or rejects if there is an error.
35610
35528
  */
35611
35529
  export function notifyConnectionStateChanged(
35612
35530
 
@@ -35617,7 +35535,6 @@ declare namespace chrome {
35617
35535
  * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
35618
35536
  *
35619
35537
  * @param state The VPN session state of the VPN client.
35620
- * @param callback Called when the notification is complete or if there is an error.
35621
35538
  */
35622
35539
  export function notifyConnectionStateChanged(
35623
35540