chrome-types 0.1.407 → 0.1.409

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 +169 -6
  2. package/index.d.ts +197 -6
  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 Wed Jan 07 2026 15:45:22 GMT+0000 (Coordinated Universal Time)
18
- // Built at b53c887388cda795521d8f71e46844d3fc36967a
17
+ // Generated on Fri Jan 09 2026 22:34:02 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 2d4be9c66aeadd66d47b4dd9b233902226201612
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
 
@@ -1907,6 +1909,7 @@ declare namespace chrome {
1907
1909
  *
1908
1910
  * @chrome-returns-extra since Chrome 116
1909
1911
  * @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.
1912
+ * @returns Reports the requested list of audio devices.
1910
1913
  */
1911
1914
  export function getDevices(
1912
1915
 
@@ -1987,6 +1990,7 @@ declare namespace chrome {
1987
1990
  *
1988
1991
  * @chrome-returns-extra since Chrome 116
1989
1992
  * @param streamType Stream type for which mute state should be fetched.
1993
+ * @returns Promise that resolves with a boolean indicating whether mute is set or not for specified stream type.
1990
1994
  */
1991
1995
  export function getMute(
1992
1996
 
@@ -4978,6 +4982,7 @@ declare namespace chrome {
4978
4982
  * Stored passwords.
4979
4983
  *
4980
4984
  * @deprecated Support for password deletion through extensions has been removed. This data type will be ignored.
4985
+ * @chrome-deprecated-since Chrome 144
4981
4986
  */
4982
4987
  passwords?: boolean;
4983
4988
 
@@ -5048,6 +5053,7 @@ declare namespace chrome {
5048
5053
  *
5049
5054
  * @chrome-returns-extra since Chrome 96
5050
5055
  * @param dataToRemove The set of data types to remove.
5056
+ * @returns Resolves when deletion has completed.
5051
5057
  */
5052
5058
  export function remove(
5053
5059
 
@@ -5074,6 +5080,7 @@ declare namespace chrome {
5074
5080
  * Clears websites' appcache data.
5075
5081
  *
5076
5082
  * @chrome-returns-extra since Chrome 96
5083
+ * @returns Resolves when websites' appcache data has been cleared.
5077
5084
  */
5078
5085
  export function removeAppcache(
5079
5086
 
@@ -5094,6 +5101,7 @@ declare namespace chrome {
5094
5101
  * Clears the browser's cache.
5095
5102
  *
5096
5103
  * @chrome-returns-extra since Chrome 96
5104
+ * @returns Resolves when the browser's cache has been cleared.
5097
5105
  */
5098
5106
  export function removeCache(
5099
5107
 
@@ -5114,6 +5122,7 @@ declare namespace chrome {
5114
5122
  * Clears websites' cache storage data.
5115
5123
  *
5116
5124
  * @chrome-returns-extra since Chrome 96
5125
+ * @returns Resolves when websites' cache storage has been cleared.
5117
5126
  * @since Chrome 72
5118
5127
  */
5119
5128
  export function removeCacheStorage(
@@ -5137,6 +5146,7 @@ declare namespace chrome {
5137
5146
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
5138
5147
  *
5139
5148
  * @chrome-returns-extra since Chrome 96
5149
+ * @returns Resolves when the browser's cookies and server-bound certificates have been cleared.
5140
5150
  */
5141
5151
  export function removeCookies(
5142
5152
 
@@ -5157,6 +5167,7 @@ declare namespace chrome {
5157
5167
  * Clears the browser's list of downloaded files (_not_ the downloaded files themselves).
5158
5168
  *
5159
5169
  * @chrome-returns-extra since Chrome 96
5170
+ * @returns Resolves when the browser's list of downloaded files has been cleared.
5160
5171
  */
5161
5172
  export function removeDownloads(
5162
5173
 
@@ -5177,6 +5188,7 @@ declare namespace chrome {
5177
5188
  * Clears websites' file system data.
5178
5189
  *
5179
5190
  * @chrome-returns-extra since Chrome 96
5191
+ * @returns Resolves when websites' file systems have been cleared.
5180
5192
  */
5181
5193
  export function removeFileSystems(
5182
5194
 
@@ -5197,6 +5209,7 @@ declare namespace chrome {
5197
5209
  * Clears the browser's stored form data (autofill).
5198
5210
  *
5199
5211
  * @chrome-returns-extra since Chrome 96
5212
+ * @returns Resolves when the browser's form data has been cleared.
5200
5213
  */
5201
5214
  export function removeFormData(
5202
5215
 
@@ -5217,6 +5230,7 @@ declare namespace chrome {
5217
5230
  * Clears the browser's history.
5218
5231
  *
5219
5232
  * @chrome-returns-extra since Chrome 96
5233
+ * @returns Resolves when the browser's history has cleared.
5220
5234
  */
5221
5235
  export function removeHistory(
5222
5236
 
@@ -5237,6 +5251,7 @@ declare namespace chrome {
5237
5251
  * Clears websites' IndexedDB data.
5238
5252
  *
5239
5253
  * @chrome-returns-extra since Chrome 96
5254
+ * @returns Resolves when websites' IndexedDB data has been cleared.
5240
5255
  */
5241
5256
  export function removeIndexedDB(
5242
5257
 
@@ -5257,6 +5272,7 @@ declare namespace chrome {
5257
5272
  * Clears websites' local storage data.
5258
5273
  *
5259
5274
  * @chrome-returns-extra since Chrome 96
5275
+ * @returns Resolves when websites' local storage has been cleared.
5260
5276
  */
5261
5277
  export function removeLocalStorage(
5262
5278
 
@@ -5277,6 +5293,7 @@ declare namespace chrome {
5277
5293
  * Clears plugins' data.
5278
5294
  *
5279
5295
  * @chrome-returns-extra since Chrome 96
5296
+ * @returns Resolves when plugins' data has been cleared.
5280
5297
  * @deprecated Support for Flash has been removed. This function has no effect.
5281
5298
  * @chrome-deprecated-since Chrome 88
5282
5299
  */
@@ -5302,7 +5319,9 @@ declare namespace chrome {
5302
5319
  * Clears the browser's stored passwords.
5303
5320
  *
5304
5321
  * @chrome-returns-extra since Chrome 96
5322
+ * @returns Resolves when the browser's passwords have been cleared.
5305
5323
  * @deprecated Support for password deletion through extensions has been removed. This function has no effect.
5324
+ * @chrome-deprecated-since Chrome 144
5306
5325
  */
5307
5326
  export function removePasswords(
5308
5327
 
@@ -5313,6 +5332,7 @@ declare namespace chrome {
5313
5332
  * Clears the browser's stored passwords.
5314
5333
  *
5315
5334
  * @deprecated Support for password deletion through extensions has been removed. This function has no effect.
5335
+ * @chrome-deprecated-since Chrome 144
5316
5336
  */
5317
5337
  export function removePasswords(
5318
5338
 
@@ -5325,6 +5345,7 @@ declare namespace chrome {
5325
5345
  * Clears websites' service workers.
5326
5346
  *
5327
5347
  * @chrome-returns-extra since Chrome 96
5348
+ * @returns Resolves when websites' service workers have been cleared.
5328
5349
  * @since Chrome 72
5329
5350
  */
5330
5351
  export function removeServiceWorkers(
@@ -5348,6 +5369,7 @@ declare namespace chrome {
5348
5369
  * Clears websites' WebSQL data.
5349
5370
  *
5350
5371
  * @chrome-returns-extra since Chrome 96
5372
+ * @returns Resolves when websites' WebSQL databases have been cleared.
5351
5373
  */
5352
5374
  export function removeWebSQL(
5353
5375
 
@@ -5678,6 +5700,7 @@ declare namespace chrome {
5678
5700
  *
5679
5701
  * @chrome-returns-extra since Chrome 96
5680
5702
  * @param details Contains the details about the requested dialog.
5703
+ * @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).
5681
5704
  * @since Chrome 57
5682
5705
  */
5683
5706
  export function requestPin(
@@ -5705,6 +5728,7 @@ declare namespace chrome {
5705
5728
  *
5706
5729
  * @chrome-returns-extra since Chrome 96
5707
5730
  * @param details Contains the details about the reason for stopping the request flow.
5731
+ * @returns Returns a Promise which resolves when the request to close the PIN dialog is complete.
5708
5732
  * @since Chrome 57
5709
5733
  */
5710
5734
  export function stopPinRequest(
@@ -5732,6 +5756,7 @@ declare namespace chrome {
5732
5756
  *
5733
5757
  * @chrome-returns-extra since Chrome 96
5734
5758
  * @param details The certificates to set. Invalid certificates will be ignored.
5759
+ * @returns Returns a Promise which resolves upon completion.
5735
5760
  * @since Chrome 86
5736
5761
  */
5737
5762
  export function setCertificates(
@@ -5939,6 +5964,7 @@ declare namespace chrome {
5939
5964
  * Returns all the registered extension commands for this extension and their shortcut (if active). Before Chrome 110, this command did not return `_execute_action`.
5940
5965
  *
5941
5966
  * @chrome-returns-extra since Chrome 96
5967
+ * @returns Resolves with a list of the registered commands.
5942
5968
  */
5943
5969
  export function getAll(): Promise<Command[]>;
5944
5970
 
@@ -6664,6 +6690,7 @@ declare namespace chrome {
6664
6690
  * @chrome-returns-extra since Chrome 123
6665
6691
  * @param id The ID of the item to update.
6666
6692
  * @param updateProperties The properties to update. Accepts the same values as the {@link contextMenus.create} function.
6693
+ * @returns Resolves when the context menu has been updated.
6667
6694
  */
6668
6695
  export function update(
6669
6696
 
@@ -6774,6 +6801,7 @@ declare namespace chrome {
6774
6801
  *
6775
6802
  * @chrome-returns-extra since Chrome 123
6776
6803
  * @param menuItemId The ID of the context menu item to remove.
6804
+ * @returns Resolves when the context menu has been removed.
6777
6805
  */
6778
6806
  export function remove(
6779
6807
 
@@ -6796,6 +6824,7 @@ declare namespace chrome {
6796
6824
  * Removes all context menu items added by this extension.
6797
6825
  *
6798
6826
  * @chrome-returns-extra since Chrome 123
6827
+ * @returns Resolves when removal is complete.
6799
6828
  */
6800
6829
  export function removeAll(): Promise<void>;
6801
6830
 
@@ -7581,6 +7610,7 @@ declare namespace chrome {
7581
7610
  * @chrome-returns-extra since Chrome 96
7582
7611
  * @param target Debugging target to which you want to attach.
7583
7612
  * @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).
7613
+ * @returns Resolves once the attach operation succeeds or fails. The promise resolves with no value. If the attach fails, the promise will be rejected.
7584
7614
  */
7585
7615
  export function attach(
7586
7616
 
@@ -7609,6 +7639,7 @@ declare namespace chrome {
7609
7639
  *
7610
7640
  * @chrome-returns-extra since Chrome 96
7611
7641
  * @param target Debugging target from which you want to detach.
7642
+ * @returns Resolves once the detach operation succeeds or fails. The promise resolves with no value. If the detach fails, the promise will be rejected.
7612
7643
  */
7613
7644
  export function detach(
7614
7645
 
@@ -7634,6 +7665,7 @@ declare namespace chrome {
7634
7665
  * @param target Debugging target to which you want to send the command.
7635
7666
  * @param method Method name. Should be one of the methods defined by the [remote debugging protocol](https://developer.chrome.com/devtools/docs/debugger-protocol).
7636
7667
  * @param commandParams JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
7668
+ * @returns Response body. If an error occurs while posting the message, the promise will be rejected.
7637
7669
  */
7638
7670
  export function sendCommand(
7639
7671
 
@@ -8700,6 +8732,7 @@ declare namespace chrome {
8700
8732
  * * {@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}.
8701
8733
  *
8702
8734
  * @chrome-returns-extra since Chrome 91
8735
+ * @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.
8703
8736
  */
8704
8737
  export function updateDynamicRules(
8705
8738
 
@@ -8732,6 +8765,7 @@ declare namespace chrome {
8732
8765
  *
8733
8766
  * @chrome-returns-extra since Chrome 91
8734
8767
  * @param filter An object to filter the list of fetched rules.
8768
+ * @returns Promise that resolves with the set of dynamic rules. The Promise may be rejected in case of transient internal errors.
8735
8769
  */
8736
8770
  export function getDynamicRules(
8737
8771
 
@@ -8766,6 +8800,7 @@ declare namespace chrome {
8766
8800
  * * {@link MAX_NUMBER_OF_SESSION_RULES} is the maximum number of session rules an extension can add.
8767
8801
  *
8768
8802
  * @chrome-returns-extra since Chrome 91
8803
+ * @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.
8769
8804
  * @since Chrome 90
8770
8805
  */
8771
8806
  export function updateSessionRules(
@@ -8794,6 +8829,7 @@ declare namespace chrome {
8794
8829
  *
8795
8830
  * @chrome-returns-extra since Chrome 91
8796
8831
  * @param filter An object to filter the list of fetched rules.
8832
+ * @returns Promise that resolves with the set of session scoped rules.
8797
8833
  * @since Chrome 90
8798
8834
  */
8799
8835
  export function getSessionRules(
@@ -8827,6 +8863,7 @@ declare namespace chrome {
8827
8863
  * 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.
8828
8864
  *
8829
8865
  * @chrome-returns-extra since Chrome 91
8866
+ * @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.
8830
8867
  */
8831
8868
  export function updateEnabledRulesets(
8832
8869
 
@@ -8854,6 +8891,7 @@ declare namespace chrome {
8854
8891
  * Returns the ids for the current set of enabled static rulesets.
8855
8892
  *
8856
8893
  * @chrome-returns-extra since Chrome 91
8894
+ * @returns Promise that resolves with a list of ids, where each id corresponds to an enabled static {@link Ruleset}.
8857
8895
  */
8858
8896
  export function getEnabledRulesets(): Promise<string[]>;
8859
8897
 
@@ -8870,6 +8908,7 @@ declare namespace chrome {
8870
8908
  /**
8871
8909
  * 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.
8872
8910
  *
8911
+ * @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.
8873
8912
  * @since Chrome 111
8874
8913
  */
8875
8914
  export function updateStaticRules(
@@ -8893,6 +8932,7 @@ declare namespace chrome {
8893
8932
  * Returns the list of static rules in the given {@link Ruleset} that are currently disabled.
8894
8933
  *
8895
8934
  * @param options Specifies the ruleset to query.
8935
+ * @returns Promise that resolves with a list of ids that correspond to the disabled rules in that ruleset.
8896
8936
  * @since Chrome 111
8897
8937
  */
8898
8938
  export function getDisabledRuleIds(
@@ -8920,6 +8960,7 @@ declare namespace chrome {
8920
8960
  *
8921
8961
  * @chrome-returns-extra since Chrome 91
8922
8962
  * @param filter An object to filter the list of matched rules.
8963
+ * @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.
8923
8964
  */
8924
8965
  export function getMatchedRules(
8925
8966
 
@@ -8971,6 +9012,7 @@ declare namespace chrome {
8971
9012
  *
8972
9013
  * @chrome-returns-extra since Chrome 91
8973
9014
  * @param regexOptions The regular expression to check.
9015
+ * @returns Promise that resolves with details consisting of whether the regular expression is supported and the reason if not.
8974
9016
  * @since Chrome 87
8975
9017
  */
8976
9018
  export function isRegexSupported(
@@ -9016,6 +9058,7 @@ declare namespace chrome {
9016
9058
  /**
9017
9059
  * 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.
9018
9060
  *
9061
+ * @returns Promise that resolves with the details of matched rules.
9019
9062
  * @since Chrome 103
9020
9063
  */
9021
9064
  export function testMatchOutcome(
@@ -10472,6 +10515,7 @@ declare namespace chrome {
10472
10515
  * Resolves the given hostname or IP address literal.
10473
10516
  *
10474
10517
  * @param hostname The hostname to resolve.
10518
+ * @returns Promise that resolves when the resolution operation completes.
10475
10519
  */
10476
10520
  export function resolve(
10477
10521
 
@@ -11002,6 +11046,7 @@ declare namespace chrome {
11002
11046
  *
11003
11047
  * @chrome-returns-extra since Chrome 96
11004
11048
  * @param options An object containing scan parameters.
11049
+ * @returns Returns a Promise which resolves with the scan results.
11005
11050
  */
11006
11051
  export function scan(
11007
11052
 
@@ -11026,6 +11071,7 @@ declare namespace chrome {
11026
11071
  * 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.
11027
11072
  *
11028
11073
  * @param filter A {@link DeviceFilter} indicating which types of scanners should be returned.
11074
+ * @returns Returns a Promise which resolves with the result and list of scanners.
11029
11075
  * @since Chrome 125
11030
11076
  */
11031
11077
  export function getScannerList(
@@ -11052,6 +11098,7 @@ declare namespace chrome {
11052
11098
  * 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.
11053
11099
  *
11054
11100
  * @param scannerId The ID of a scanner to be opened. This value is one returned from a previous call to {@link getScannerList}.
11101
+ * @returns Returns a Promise which resolves with the result.
11055
11102
  * @since Chrome 125
11056
11103
  */
11057
11104
  export function openScanner(
@@ -11078,6 +11125,7 @@ declare namespace chrome {
11078
11125
  * 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.
11079
11126
  *
11080
11127
  * @param scannerHandle The handle of an open scanner returned from a call to {@link openScanner}.
11128
+ * @returns Returns a Promise which resolves with the result.
11081
11129
  * @since Chrome 125
11082
11130
  */
11083
11131
  export function getOptionGroups(
@@ -11104,6 +11152,7 @@ declare namespace chrome {
11104
11152
  * 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.
11105
11153
  *
11106
11154
  * @param scannerHandle Specifies the handle of an open scanner that was previously returned from a call to {@link openScanner}.
11155
+ * @returns Returns a Promise which resolves with the result.
11107
11156
  * @since Chrome 125
11108
11157
  */
11109
11158
  export function closeScanner(
@@ -11131,6 +11180,7 @@ declare namespace chrome {
11131
11180
  *
11132
11181
  * @param scannerHandle The handle of the scanner to set options on. This should be a value previously returned from a call to {@link openScanner}.
11133
11182
  * @param options A list of `OptionSetting` objects to be applied to the scanner.
11183
+ * @returns Returns a Promise which resolves with the result.
11134
11184
  * @since Chrome 125
11135
11185
  */
11136
11186
  export function setOptions(
@@ -11163,6 +11213,7 @@ declare namespace chrome {
11163
11213
  *
11164
11214
  * @param scannerHandle The handle of an open scanner. This should be a value previously returned from a call to {@link openScanner}.
11165
11215
  * @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`.
11216
+ * @returns Returns a Promise which resolves with the result.
11166
11217
  * @since Chrome 125
11167
11218
  */
11168
11219
  export function startScan(
@@ -11194,6 +11245,7 @@ declare namespace chrome {
11194
11245
  * 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.
11195
11246
  *
11196
11247
  * @param job The handle of an active scan job previously returned from a call to {@link startScan}.
11248
+ * @returns Returns a Promise which resolves with the result.
11197
11249
  * @since Chrome 125
11198
11250
  */
11199
11251
  export function cancelScan(
@@ -11224,6 +11276,7 @@ declare namespace chrome {
11224
11276
  * When the scan job completes, the response will have the result value of `EOF`. This response may contain a final non-zero `data` member.
11225
11277
  *
11226
11278
  * @param job Active job handle previously returned from {@link startScan}.
11279
+ * @returns Returns a Promise which resolves with the result.
11227
11280
  * @since Chrome 125
11228
11281
  */
11229
11282
  export function readScanData(
@@ -11796,6 +11849,7 @@ declare namespace chrome {
11796
11849
  *
11797
11850
  * @chrome-returns-extra since Chrome 96
11798
11851
  * @param options What to download and how.
11852
+ * @returns Returns a Promise which resolves with the id of the new {@link DownloadItem}.
11799
11853
  */
11800
11854
  export function download(
11801
11855
 
@@ -11843,6 +11897,7 @@ declare namespace chrome {
11843
11897
  *
11844
11898
  * @chrome-returns-extra since Chrome 96
11845
11899
  * @param downloadId The id of the download to pause.
11900
+ * @returns Returns a Promise which resolves when the pause request is completed.
11846
11901
  */
11847
11902
  export function pause(
11848
11903
 
@@ -11866,6 +11921,7 @@ declare namespace chrome {
11866
11921
  *
11867
11922
  * @chrome-returns-extra since Chrome 96
11868
11923
  * @param downloadId The id of the download to resume.
11924
+ * @returns Returns a Promise which resolves when the resume request is completed.
11869
11925
  */
11870
11926
  export function resume(
11871
11927
 
@@ -11889,6 +11945,7 @@ declare namespace chrome {
11889
11945
  *
11890
11946
  * @chrome-returns-extra since Chrome 96
11891
11947
  * @param downloadId The id of the download to cancel.
11948
+ * @returns Returns a Promise which resolves when the cancel request is completed.
11892
11949
  */
11893
11950
  export function cancel(
11894
11951
 
@@ -11912,6 +11969,7 @@ declare namespace chrome {
11912
11969
  *
11913
11970
  * @chrome-returns-extra since Chrome 96
11914
11971
  * @param downloadId The identifier for the download.
11972
+ * @returns Returns a Promise which resolves with a URL to an image that represents the download.
11915
11973
  */
11916
11974
  export function getFileIcon(
11917
11975
 
@@ -12024,6 +12082,7 @@ declare namespace chrome {
12024
12082
  *
12025
12083
  * @chrome-returns-extra since Chrome 96
12026
12084
  * @param downloadId The identifier for the {@link DownloadItem}.
12085
+ * @returns Returns a Promise which resolves when the danger prompt dialog closes.
12027
12086
  */
12028
12087
  export function acceptDanger(
12029
12088
 
@@ -12057,6 +12116,7 @@ declare namespace chrome {
12057
12116
  * 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.
12058
12117
  *
12059
12118
  * @param options Encapsulate a change to the download UI.
12119
+ * @returns Returns a Promise which resolves when the UI update is completed.
12060
12120
  * @since Chrome 105
12061
12121
  */
12062
12122
  export function setUiOptions(
@@ -12092,6 +12152,7 @@ declare namespace chrome {
12092
12152
  * 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.
12093
12153
  *
12094
12154
  * @chrome-returns-extra since Chrome 96
12155
+ * @returns Returns a Promise which resolves with the device identifier of the directory API.
12095
12156
  */
12096
12157
  export function getDirectoryDeviceId(): Promise<string>;
12097
12158
 
@@ -12109,6 +12170,7 @@ declare namespace chrome {
12109
12170
  * 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.
12110
12171
  *
12111
12172
  * @chrome-returns-extra since Chrome 96
12173
+ * @returns Returns a Promise which resolves with the serial number of the device.
12112
12174
  * @since Chrome 66
12113
12175
  */
12114
12176
  export function getDeviceSerialNumber(): Promise<string>;
@@ -12129,6 +12191,7 @@ declare namespace chrome {
12129
12191
  * 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.
12130
12192
  *
12131
12193
  * @chrome-returns-extra since Chrome 96
12194
+ * @returns Returns a Promise which resolves with the Asset ID of the device.
12132
12195
  * @since Chrome 66
12133
12196
  */
12134
12197
  export function getDeviceAssetId(): Promise<string>;
@@ -12149,6 +12212,7 @@ declare namespace chrome {
12149
12212
  * 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.
12150
12213
  *
12151
12214
  * @chrome-returns-extra since Chrome 96
12215
+ * @returns Returns a Promise which resolves with the Annotated Location of the device.
12152
12216
  * @since Chrome 66
12153
12217
  */
12154
12218
  export function getDeviceAnnotatedLocation(): Promise<string>;
@@ -12169,6 +12233,7 @@ declare namespace chrome {
12169
12233
  * 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.
12170
12234
  *
12171
12235
  * @chrome-returns-extra since Chrome 96
12236
+ * @returns Returns a Promise which resolves with the hostname of the device.
12172
12237
  * @since Chrome 82
12173
12238
  */
12174
12239
  export function getDeviceHostname(): Promise<string>;
@@ -12206,6 +12271,7 @@ declare namespace chrome {
12206
12271
  * Obtains the manufacturer and model for the hardware platform and, if the extension is authorized, returns it via `callback`.
12207
12272
  *
12208
12273
  * @chrome-returns-extra since Chrome 96
12274
+ * @returns Returns a Promise which resolves with the hardware platform info.
12209
12275
  */
12210
12276
  export function getHardwarePlatformInfo(): Promise<HardwarePlatformInfo>;
12211
12277
 
@@ -12242,6 +12308,7 @@ declare namespace chrome {
12242
12308
  * 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.
12243
12309
  *
12244
12310
  * @param options Object containing the fields defined in {@link SetCurrentInputMethodOptions}.
12311
+ * @returns Returns a Promise which resolves when the input method is changed, or rejects if there is an error.
12245
12312
  */
12246
12313
  export function setCurrentInputMethod(
12247
12314
 
@@ -12317,6 +12384,7 @@ declare namespace chrome {
12317
12384
  * 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.
12318
12385
  *
12319
12386
  * @chrome-returns-extra since Chrome 96
12387
+ * @returns Returns a Promise which resolves with the device's default network's {@link NetworkDetails}.
12320
12388
  */
12321
12389
  export function getNetworkDetails(): Promise<NetworkDetails>;
12322
12390
 
@@ -12420,6 +12488,7 @@ declare namespace chrome {
12420
12488
  * 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).
12421
12489
  *
12422
12490
  * @chrome-returns-extra since Chrome 131
12491
+ * @returns Invoked by `getTokens` with the list of available Tokens.
12423
12492
  */
12424
12493
  export function getTokens(): Promise<Token[]>;
12425
12494
 
@@ -12441,6 +12510,7 @@ declare namespace chrome {
12441
12510
  *
12442
12511
  * @chrome-returns-extra since Chrome 131
12443
12512
  * @param tokenId The id of a Token returned by `getTokens`.
12513
+ * @returns Returns a Promise which resolves with the list of the available certificates.
12444
12514
  */
12445
12515
  export function getCertificates(
12446
12516
 
@@ -12470,6 +12540,7 @@ declare namespace chrome {
12470
12540
  * @chrome-returns-extra since Chrome 131
12471
12541
  * @param tokenId The id of a Token returned by `getTokens`.
12472
12542
  * @param certificate The DER encoding of a X.509 certificate.
12543
+ * @returns Returns a Promise which resolves when this operation is finished.
12473
12544
  */
12474
12545
  export function importCertificate(
12475
12546
 
@@ -12499,6 +12570,7 @@ declare namespace chrome {
12499
12570
  * @chrome-returns-extra since Chrome 131
12500
12571
  * @param tokenId The id of a Token returned by `getTokens`.
12501
12572
  * @param certificate The DER encoding of a X.509 certificate.
12573
+ * @returns Returns a Promise which resolves when this operation is finished.
12502
12574
  */
12503
12575
  export function removeCertificate(
12504
12576
 
@@ -12531,6 +12603,7 @@ declare namespace chrome {
12531
12603
  *
12532
12604
  * @chrome-returns-extra since Chrome 131
12533
12605
  * @param options Object containing the fields defined in {@link ChallengeKeyOptions}.
12606
+ * @returns Returns a Promise which resolves with the challenge response.
12534
12607
  * @since Chrome 110
12535
12608
  */
12536
12609
  export function challengeKey(
@@ -12566,6 +12639,7 @@ declare namespace chrome {
12566
12639
  * @chrome-returns-extra since Chrome 131
12567
12640
  * @param challenge A challenge as emitted by the Verified Access Web API.
12568
12641
  * @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.
12642
+ * @returns Returns a Promise which resolves with the challenge response.
12569
12643
  * @deprecated Use {@link challengeKey} instead.
12570
12644
  * @since Chrome 50
12571
12645
  * @chrome-deprecated-since Chrome 110
@@ -12612,6 +12686,7 @@ declare namespace chrome {
12612
12686
  * @chrome-returns-extra since Chrome 131
12613
12687
  * @param challenge A challenge as emitted by the Verified Access Web API.
12614
12688
  * @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.
12689
+ * @returns Returns a Promise which resolves with the challenge response.
12615
12690
  * @deprecated Use {@link challengeKey} instead.
12616
12691
  * @since Chrome 50
12617
12692
  * @chrome-deprecated-since Chrome 110
@@ -14947,6 +15022,7 @@ declare namespace chrome {
14947
15022
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
14948
15023
  *
14949
15024
  * @chrome-returns-extra since Chrome 96
15025
+ * @returns A generic result callback to indicate success or failure.
14950
15026
  */
14951
15027
  export function mount(
14952
15028
 
@@ -14973,6 +15049,7 @@ declare namespace chrome {
14973
15049
  * In case of an error, {@link runtime.lastError} will be set with a corresponding error code.
14974
15050
  *
14975
15051
  * @chrome-returns-extra since Chrome 96
15052
+ * @returns A generic result callback to indicate success or failure.
14976
15053
  */
14977
15054
  export function unmount(
14978
15055
 
@@ -14995,6 +15072,7 @@ declare namespace chrome {
14995
15072
  * Returns all file systems mounted by the extension.
14996
15073
  *
14997
15074
  * @chrome-returns-extra since Chrome 96
15075
+ * @returns Callback to receive the result of {@link getAll} function.
14998
15076
  */
14999
15077
  export function getAll(): Promise<FileSystemInfo[]>;
15000
15078
 
@@ -15012,6 +15090,7 @@ declare namespace chrome {
15012
15090
  * Returns information about a file system with the passed `fileSystemId`.
15013
15091
  *
15014
15092
  * @chrome-returns-extra since Chrome 96
15093
+ * @returns Callback to receive the result of {@link get} function.
15015
15094
  */
15016
15095
  export function get(
15017
15096
 
@@ -15044,6 +15123,7 @@ declare namespace chrome {
15044
15123
  * In case of an error, {@link runtime.lastError} will be set will a corresponding error code.
15045
15124
  *
15046
15125
  * @chrome-returns-extra since Chrome 96
15126
+ * @returns A generic result callback to indicate success or failure.
15047
15127
  * @since Chrome 45
15048
15128
  */
15049
15129
  export function notify(
@@ -15750,6 +15830,7 @@ declare namespace chrome {
15750
15830
  *
15751
15831
  * @chrome-returns-extra since Chrome 116
15752
15832
  * @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.
15833
+ * @returns Resolves when registration completes.
15753
15834
  */
15754
15835
  export function register(
15755
15836
 
@@ -15777,6 +15858,7 @@ declare namespace chrome {
15777
15858
  * Unregisters the application from FCM.
15778
15859
  *
15779
15860
  * @chrome-returns-extra since Chrome 116
15861
+ * @returns Resolves after the unregistration completes. Unregistration was successful if the promise does not reject.
15780
15862
  */
15781
15863
  export function unregister(): Promise<void>;
15782
15864
 
@@ -15793,6 +15875,7 @@ declare namespace chrome {
15793
15875
  *
15794
15876
  * @chrome-returns-extra since Chrome 116
15795
15877
  * @param message A message to send to the other party via FCM.
15878
+ * @returns Resolves after the message is successfully queued for sending. If an error occurs, the promise will be rejected.
15796
15879
  */
15797
15880
  export function send(
15798
15881
 
@@ -16839,6 +16922,7 @@ declare namespace chrome {
16839
16922
  *
16840
16923
  * @chrome-returns-extra since Chrome 105
16841
16924
  * @param details Token options.
16925
+ * @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.
16842
16926
  */
16843
16927
  export function getAuthToken(
16844
16928
 
@@ -16877,6 +16961,7 @@ declare namespace chrome {
16877
16961
  *
16878
16962
  * @chrome-returns-extra since Chrome 106
16879
16963
  * @param details Profile options.
16964
+ * @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.
16880
16965
  */
16881
16966
  export function getProfileUserInfo(
16882
16967
 
@@ -16914,6 +16999,7 @@ declare namespace chrome {
16914
16999
  *
16915
17000
  * @chrome-returns-extra since Chrome 106
16916
17001
  * @param details Token information.
17002
+ * @returns Returns a Promise which resolves when the token has been removed from the cache.
16917
17003
  */
16918
17004
  export function removeCachedAuthToken(
16919
17005
 
@@ -16942,6 +17028,7 @@ declare namespace chrome {
16942
17028
  * * De-authorizes the user from all auth flows
16943
17029
  *
16944
17030
  * @chrome-returns-extra since Chrome 106
17031
+ * @returns Returns a Promise which resolves when the state has been cleared.
16945
17032
  * @since Chrome 87
16946
17033
  */
16947
17034
  export function clearAllCachedAuthTokens(): Promise<void>;
@@ -16969,6 +17056,7 @@ declare namespace chrome {
16969
17056
  *
16970
17057
  * @chrome-returns-extra since Chrome 106
16971
17058
  * @param details WebAuth flow options.
17059
+ * @returns Returns a Promise which resolves with the URL redirected back to your application.
16972
17060
  */
16973
17061
  export function launchWebAuthFlow(
16974
17062
 
@@ -17485,6 +17573,7 @@ declare namespace chrome {
17485
17573
  * Set the current composition. If this extension does not own the active IME, this fails.
17486
17574
  *
17487
17575
  * @chrome-returns-extra since Chrome 111
17576
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
17488
17577
  */
17489
17578
  export function setComposition(
17490
17579
 
@@ -17601,6 +17690,7 @@ declare namespace chrome {
17601
17690
  * Clear the current composition. If this extension does not own the active IME, this fails.
17602
17691
  *
17603
17692
  * @chrome-returns-extra since Chrome 111
17693
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
17604
17694
  */
17605
17695
  export function clearComposition(
17606
17696
 
@@ -17635,6 +17725,7 @@ declare namespace chrome {
17635
17725
  * Commits the provided text to the current input.
17636
17726
  *
17637
17727
  * @chrome-returns-extra since Chrome 111
17728
+ * @returns Resolves when the operation completes with a boolean indicating if the text was accepted or not. On failure, the promise will be rejected.
17638
17729
  */
17639
17730
  export function commitText(
17640
17731
 
@@ -17679,6 +17770,7 @@ declare namespace chrome {
17679
17770
  * 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.
17680
17771
  *
17681
17772
  * @chrome-returns-extra since Chrome 111
17773
+ * @returns Resolves when the operation completes.
17682
17774
  */
17683
17775
  export function sendKeyEvents(
17684
17776
 
@@ -17726,6 +17818,7 @@ declare namespace chrome {
17726
17818
  * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
17727
17819
  *
17728
17820
  * @chrome-returns-extra since Chrome 111
17821
+ * @returns Resolves when the operation completes.
17729
17822
  */
17730
17823
  export function setCandidateWindowProperties(
17731
17824
 
@@ -17864,6 +17957,7 @@ declare namespace chrome {
17864
17957
  * Sets the current candidate list. This fails if this extension doesn't own the active IME
17865
17958
  *
17866
17959
  * @chrome-returns-extra since Chrome 111
17960
+ * @returns Resolves when the operation completes.
17867
17961
  */
17868
17962
  export function setCandidates(
17869
17963
 
@@ -17992,6 +18086,7 @@ declare namespace chrome {
17992
18086
  * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
17993
18087
  *
17994
18088
  * @chrome-returns-extra since Chrome 111
18089
+ * @returns Resolves when the operation completes
17995
18090
  */
17996
18091
  export function setCursorPosition(
17997
18092
 
@@ -18036,6 +18131,7 @@ declare namespace chrome {
18036
18131
  * Shows/Hides an assistive window with the given properties.
18037
18132
  *
18038
18133
  * @chrome-returns-extra since Chrome 111
18134
+ * @returns Resolves when the operation completes.
18039
18135
  * @since Chrome 85
18040
18136
  */
18041
18137
  export function setAssistiveWindowProperties(
@@ -18083,6 +18179,7 @@ declare namespace chrome {
18083
18179
  * Highlights/Unhighlights a button in an assistive window.
18084
18180
  *
18085
18181
  * @chrome-returns-extra since Chrome 111
18182
+ * @returns Resolves when the operation completes. On failure, the promise will be rejected.
18086
18183
  * @since Chrome 86
18087
18184
  */
18088
18185
  export function setAssistiveWindowButtonHighlighted(
@@ -18178,6 +18275,7 @@ declare namespace chrome {
18178
18275
  * Updates the state of the MenuItems specified
18179
18276
  *
18180
18277
  * @chrome-returns-extra since Chrome 111
18278
+ * @returns Resolves when the operation completes
18181
18279
  */
18182
18280
  export function updateMenuItems(
18183
18281
 
@@ -18198,6 +18296,7 @@ declare namespace chrome {
18198
18296
  * Deletes the text around the caret.
18199
18297
  *
18200
18298
  * @chrome-returns-extra since Chrome 111
18299
+ * @returns Resolves when the operation completes.
18201
18300
  */
18202
18301
  export function deleteSurroundingText(
18203
18302
 
@@ -18287,6 +18386,7 @@ declare namespace chrome {
18287
18386
  * 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.
18288
18387
  *
18289
18388
  * @chrome-returns-extra since Chrome 96
18389
+ * @returns Resolves when the retrieval completes.
18290
18390
  */
18291
18391
  export function getID(): Promise<string>;
18292
18392
 
@@ -18307,6 +18407,7 @@ declare namespace chrome {
18307
18407
  * Retrieves the time when the InstanceID has been generated. The creation time will be returned by the `callback`.
18308
18408
  *
18309
18409
  * @chrome-returns-extra since Chrome 96
18410
+ * @returns Resolves when the retrieval completes.
18310
18411
  */
18311
18412
  export function getCreationTime(): Promise<number>;
18312
18413
 
@@ -18328,6 +18429,7 @@ declare namespace chrome {
18328
18429
  *
18329
18430
  * @chrome-returns-extra since Chrome 96
18330
18431
  * @param getTokenParams Parameters for getToken.
18432
+ * @returns Resolves when the retrieval completes.
18331
18433
  */
18332
18434
  export function getToken(
18333
18435
 
@@ -18404,6 +18506,7 @@ declare namespace chrome {
18404
18506
  *
18405
18507
  * @chrome-returns-extra since Chrome 96
18406
18508
  * @param deleteTokenParams Parameters for deleteToken.
18509
+ * @returns Resolves when the token deletion completes. The token was revoked successfully if the promise does not reject.
18407
18510
  */
18408
18511
  export function deleteToken(
18409
18512
 
@@ -18456,6 +18559,7 @@ declare namespace chrome {
18456
18559
  * Resets the app instance identifier and revokes all tokens associated with it.
18457
18560
  *
18458
18561
  * @chrome-returns-extra since Chrome 96
18562
+ * @returns Resolves when the deletion completes. The instance identifier was revoked successfully if the promise does not reject.
18459
18563
  */
18460
18564
  export function deleteID(): Promise<void>;
18461
18565
 
@@ -21751,6 +21855,7 @@ declare namespace chrome {
21751
21855
 
21752
21856
  The `notificationId` parameter is required before Chrome 42.
21753
21857
  * @param options Contents of the notification.
21858
+ * @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
21754
21859
  */
21755
21860
  export function create(
21756
21861
 
@@ -21764,6 +21869,7 @@ declare namespace chrome {
21764
21869
  *
21765
21870
  * @chrome-returns-extra since Chrome 116
21766
21871
  * @param options Contents of the notification.
21872
+ * @returns Returns a Promise which resolves with the notification id (either supplied or generated) that represents the created notification.
21767
21873
  */
21768
21874
  export function create(
21769
21875
 
@@ -21811,6 +21917,7 @@ declare namespace chrome {
21811
21917
  * @chrome-returns-extra since Chrome 116
21812
21918
  * @param notificationId The id of the notification to be updated. This is returned by {@link notifications.create} method.
21813
21919
  * @param options Contents of the notification to update to.
21920
+ * @returns Returns a Promise which resolves to indicate whether a matching notification existed.
21814
21921
  */
21815
21922
  export function update(
21816
21923
 
@@ -21841,6 +21948,7 @@ declare namespace chrome {
21841
21948
  *
21842
21949
  * @chrome-returns-extra since Chrome 116
21843
21950
  * @param notificationId The id of the notification to be cleared. This is returned by {@link notifications.create} method.
21951
+ * @returns Returns a Promise which resolves to indicate whether a matching notification existed.
21844
21952
  */
21845
21953
  export function clear(
21846
21954
 
@@ -21865,6 +21973,7 @@ declare namespace chrome {
21865
21973
  * Retrieves all the notifications of this app or extension.
21866
21974
  *
21867
21975
  * @chrome-returns-extra since Chrome 116
21976
+ * @returns Returns a Promise which resolves with the set of notification\_ids currently in the system.
21868
21977
  */
21869
21978
  export function getAll(): Promise<{[name: string]: any}>;
21870
21979
 
@@ -21882,6 +21991,7 @@ declare namespace chrome {
21882
21991
  * Retrieves whether the user has enabled notifications from this app or extension.
21883
21992
  *
21884
21993
  * @chrome-returns-extra since Chrome 116
21994
+ * @returns Returns a Promise which resolves with the current permission level.
21885
21995
  */
21886
21996
  export function getPermissionLevel(): Promise<PermissionLevel>;
21887
21997
 
@@ -21967,6 +22077,7 @@ declare namespace chrome {
21967
22077
  * Creates a new offscreen document for the extension.
21968
22078
  *
21969
22079
  * @param parameters The parameters describing the offscreen document to create.
22080
+ * @returns Promise that resolves when the offscreen document is created and has completed its initial page load.
21970
22081
  */
21971
22082
  export function createDocument(
21972
22083
 
@@ -21987,6 +22098,8 @@ declare namespace chrome {
21987
22098
 
21988
22099
  /**
21989
22100
  * Closes the currently-open offscreen document for the extension.
22101
+ *
22102
+ * @returns Promise that resolves when the offscreen document has been closed.
21990
22103
  */
21991
22104
  export function closeDocument(): Promise<void>;
21992
22105
 
@@ -22412,6 +22525,7 @@ declare namespace chrome {
22412
22525
  * Saves the content of the tab with given id as MHTML.
22413
22526
  *
22414
22527
  * @chrome-returns-extra since Chrome 116
22528
+ * @returns Resolves when the MHTML has been generated.
22415
22529
  */
22416
22530
  export function saveAsMHTML(
22417
22531
 
@@ -23803,6 +23917,7 @@ declare namespace chrome {
23803
23917
  * Returns the ID of the renderer process for the specified tab.
23804
23918
  *
23805
23919
  * @param tabId The ID of the tab for which the renderer process ID is to be returned.
23920
+ * @returns A callback to return the ID of the renderer process of a tab.
23806
23921
  */
23807
23922
  export function getProcessIdForTab(
23808
23923
 
@@ -23830,6 +23945,7 @@ declare namespace chrome {
23830
23945
  * Terminates the specified renderer process. Equivalent to visiting about:crash, but without changing the tab's URL.
23831
23946
  *
23832
23947
  * @param processId The ID of the process to be terminated.
23948
+ * @returns A callback to report the status of the termination.
23833
23949
  */
23834
23950
  export function terminate(
23835
23951
 
@@ -23858,6 +23974,7 @@ declare namespace chrome {
23858
23974
  *
23859
23975
  * @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.
23860
23976
  * @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.
23977
+ * @returns A callback called when the processes information is collected.
23861
23978
  */
23862
23979
  export function getProcessInfo(
23863
23980
 
@@ -24186,6 +24303,7 @@ declare namespace chrome {
24186
24303
  * Adds an entry to the reading list if it does not exist.
24187
24304
  *
24188
24305
  * @param entry The entry to add to the reading list.
24306
+ * @returns Resolves once the entry has been added.
24189
24307
  */
24190
24308
  export function addEntry(
24191
24309
 
@@ -24208,6 +24326,7 @@ declare namespace chrome {
24208
24326
  * Removes an entry from the reading list if it exists.
24209
24327
  *
24210
24328
  * @param info The entry to remove from the reading list.
24329
+ * @returns Resolves once the entry has been removed.
24211
24330
  */
24212
24331
  export function removeEntry(
24213
24332
 
@@ -24230,6 +24349,7 @@ declare namespace chrome {
24230
24349
  * Updates a reading list entry if it exists.
24231
24350
  *
24232
24351
  * @param info The entry to update.
24352
+ * @returns Resolves once the matched entries have been updated.
24233
24353
  */
24234
24354
  export function updateEntry(
24235
24355
 
@@ -24252,6 +24372,7 @@ declare namespace chrome {
24252
24372
  * Retrieves all entries that match the `QueryInfo` properties. Properties that are not provided will not be matched.
24253
24373
  *
24254
24374
  * @param info The properties to search for.
24375
+ * @returns Resolves once the entries have been matched.
24255
24376
  */
24256
24377
  export function query(
24257
24378
 
@@ -24705,7 +24826,7 @@ declare namespace chrome {
24705
24826
  */
24706
24827
  response?: any,
24707
24828
  ) => void,
24708
- ) => boolean | undefined>;
24829
+ ) => (boolean | Promise<any>) | undefined>;
24709
24830
 
24710
24831
  /**
24711
24832
  * Fired when a message is sent from a user script associated with the same extension.
@@ -25382,6 +25503,7 @@ declare namespace chrome {
25382
25503
  *
25383
25504
  * @chrome-returns-extra since Chrome 90
25384
25505
  * @param injection The details of the script which to inject.
25506
+ * @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.
25385
25507
  */
25386
25508
  export function executeScript(
25387
25509
 
@@ -25407,6 +25529,7 @@ declare namespace chrome {
25407
25529
  *
25408
25530
  * @chrome-returns-extra since Chrome 90
25409
25531
  * @param injection The details of the styles to insert.
25532
+ * @returns Returns a Promise which resolves upon completion of the insertion.
25410
25533
  */
25411
25534
  export function insertCSS(
25412
25535
 
@@ -25429,6 +25552,7 @@ declare namespace chrome {
25429
25552
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
25430
25553
  *
25431
25554
  * @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.
25555
+ * @returns Returns a Promise which resolves upon the completion of the removal.
25432
25556
  * @since Chrome 90
25433
25557
  */
25434
25558
  export function removeCSS(
@@ -25453,6 +25577,7 @@ declare namespace chrome {
25453
25577
  * Registers one or more content scripts for this extension.
25454
25578
  *
25455
25579
  * @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.
25580
+ * @returns Returns a Promise which resolves once scripts have been fully registered or rejects if an error has occurred.
25456
25581
  * @since Chrome 96
25457
25582
  */
25458
25583
  export function registerContentScripts(
@@ -25503,6 +25628,7 @@ declare namespace chrome {
25503
25628
  * Unregisters content scripts for this extension.
25504
25629
  *
25505
25630
  * @param filter If specified, only unregisters dynamic content scripts which match the filter. Otherwise, all of the extension's dynamic content scripts are unregistered.
25631
+ * @returns Returns a Promise which resolves once scripts have been unregistered or rejects if an error has occurred.
25506
25632
  * @since Chrome 96
25507
25633
  */
25508
25634
  export function unregisterContentScripts(
@@ -25527,6 +25653,7 @@ declare namespace chrome {
25527
25653
  * Updates one or more content scripts for this extension.
25528
25654
  *
25529
25655
  * @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.
25656
+ * @returns Returns a Promise which resolves once scripts have been updated or rejects if an error has occurred.
25530
25657
  * @since Chrome 96
25531
25658
  */
25532
25659
  export function updateContentScripts(
@@ -26528,7 +26655,7 @@ declare namespace chrome {
26528
26655
  /**
26529
26656
  * Fired when the extension's side panel is closed.
26530
26657
  *
26531
- * @since Pending
26658
+ * @since Chrome 144
26532
26659
  */
26533
26660
  export const onClosed: events.Event<(
26534
26661
  info: PanelClosedInfo,
@@ -26538,6 +26665,7 @@ declare namespace chrome {
26538
26665
  * Configures the side panel.
26539
26666
  *
26540
26667
  * @param options The configuration options to apply to the panel.
26668
+ * @returns Returns a Promise which resolves when the options have been set.
26541
26669
  */
26542
26670
  export function setOptions(
26543
26671
 
@@ -26560,6 +26688,7 @@ declare namespace chrome {
26560
26688
  * Returns the active panel configuration.
26561
26689
  *
26562
26690
  * @param options Specifies the context to return the configuration for.
26691
+ * @returns Returns a Promise which resolves with the active panel configuration.
26563
26692
  */
26564
26693
  export function getOptions(
26565
26694
 
@@ -26584,6 +26713,7 @@ declare namespace chrome {
26584
26713
  * Configures the extension's side panel behavior. This is an upsert operation.
26585
26714
  *
26586
26715
  * @param behavior The new behavior to be set.
26716
+ * @returns Returns a Promise which resolves when the new behavior has been set.
26587
26717
  */
26588
26718
  export function setPanelBehavior(
26589
26719
 
@@ -26604,6 +26734,8 @@ declare namespace chrome {
26604
26734
 
26605
26735
  /**
26606
26736
  * Returns the extension's current side panel behavior.
26737
+ *
26738
+ * @returns Returns a Promise which resolves with the extension's side panel behavior.
26607
26739
  */
26608
26740
  export function getPanelBehavior(): Promise<PanelBehavior>;
26609
26741
 
@@ -26621,6 +26753,7 @@ declare namespace chrome {
26621
26753
  * Opens the side panel for the extension. This may only be called in response to a user action.
26622
26754
  *
26623
26755
  * @param options Specifies the context in which to open the side panel.
26756
+ * @returns Returns a Promise which resolves when the side panel has been opened.
26624
26757
  * @since Chrome 116
26625
26758
  */
26626
26759
  export function open(
@@ -26644,6 +26777,7 @@ declare namespace chrome {
26644
26777
  /**
26645
26778
  * Returns the side panel's current layout.
26646
26779
  *
26780
+ * @returns Returns a Promise which resolves with a {@link PanelLayout}.
26647
26781
  * @since Chrome 140
26648
26782
  */
26649
26783
  export function getLayout(): Promise<PanelLayout>;
@@ -28718,6 +28852,7 @@ declare namespace chrome {
28718
28852
  *
28719
28853
  * @chrome-returns-extra since Chrome 95
28720
28854
  * @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.
28855
+ * @returns Promise that resolves with an object containing a key-value map for the requested items, or rejects on failure.
28721
28856
  */
28722
28857
  get(
28723
28858
 
@@ -28744,6 +28879,7 @@ declare namespace chrome {
28744
28879
  /**
28745
28880
  * Gets all keys from storage.
28746
28881
  *
28882
+ * @returns Promise that resolves with storage keys, or rejects on failure.
28747
28883
  * @since Chrome 130
28748
28884
  */
28749
28885
  getKeys(): Promise<string[]>;
@@ -28768,6 +28904,7 @@ declare namespace chrome {
28768
28904
  *
28769
28905
  * @chrome-returns-extra since Chrome 95
28770
28906
  * @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.
28907
+ * @returns Promise that resolves with the amount of space being used by storage, or rejects on failure.
28771
28908
  */
28772
28909
  getBytesInUse(
28773
28910
 
@@ -28800,6 +28937,7 @@ declare namespace chrome {
28800
28937
  An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
28801
28938
 
28802
28939
  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).
28940
+ * @returns Promise that resolves on success, or rejects on failure.
28803
28941
  */
28804
28942
  set(
28805
28943
 
@@ -28827,6 +28965,7 @@ declare namespace chrome {
28827
28965
  *
28828
28966
  * @chrome-returns-extra since Chrome 95
28829
28967
  * @param keys A single key or a list of keys for items to remove.
28968
+ * @returns Promise that resolves on success, or rejects on failure.
28830
28969
  */
28831
28970
  remove(
28832
28971
 
@@ -28849,6 +28988,7 @@ declare namespace chrome {
28849
28988
  * Removes all items from storage.
28850
28989
  *
28851
28990
  * @chrome-returns-extra since Chrome 95
28991
+ * @returns Promise that resolves on success, or rejects on failure.
28852
28992
  */
28853
28993
  clear(): Promise<void>;
28854
28994
 
@@ -28863,6 +29003,7 @@ declare namespace chrome {
28863
29003
  /**
28864
29004
  * 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.
28865
29005
  *
29006
+ * @returns Promise that resolves on success, or rejects on failure.
28866
29007
  * @since Chrome 102
28867
29008
  */
28868
29009
  setAccessLevel(
@@ -29774,6 +29915,7 @@ declare namespace chrome {
29774
29915
  *
29775
29916
  * @chrome-returns-extra since Chrome 91
29776
29917
  * @param flags Options affecting how the information is returned.
29918
+ * @returns Promise that resolves with the results.
29777
29919
  */
29778
29920
  export function getInfo(
29779
29921
 
@@ -29804,6 +29946,7 @@ declare namespace chrome {
29804
29946
  * Requests the layout info for all displays. NOTE: This is only available to ChromeOS Kiosk apps and Web UI.
29805
29947
  *
29806
29948
  * @chrome-returns-extra since Chrome 91
29949
+ * @returns Promise that resolves with the results.
29807
29950
  * @since Chrome 53
29808
29951
  */
29809
29952
  export function getDisplayLayout(): Promise<DisplayLayout[]>;
@@ -29826,6 +29969,7 @@ declare namespace chrome {
29826
29969
  * @chrome-returns-extra since Chrome 91
29827
29970
  * @param id The display's unique identifier.
29828
29971
  * @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`.
29972
+ * @returns Promise that resolves when the function finishes.
29829
29973
  */
29830
29974
  export function setDisplayProperties(
29831
29975
 
@@ -29854,6 +29998,7 @@ declare namespace chrome {
29854
29998
  *
29855
29999
  * @chrome-returns-extra since Chrome 91
29856
30000
  * @param layouts The layout information, required for all displays except the primary display.
30001
+ * @returns Promise that resolves when the function finishes.
29857
30002
  * @since Chrome 53
29858
30003
  */
29859
30004
  export function setDisplayLayout(
@@ -29937,6 +30082,7 @@ declare namespace chrome {
29937
30082
  *
29938
30083
  * @chrome-returns-extra since Chrome 91
29939
30084
  * @param id The display's unique identifier.
30085
+ * @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.
29940
30086
  * @since Chrome 57
29941
30087
  */
29942
30088
  export function showNativeTouchCalibration(
@@ -30000,6 +30146,7 @@ declare namespace chrome {
30000
30146
  *
30001
30147
  * @chrome-returns-extra since Chrome 91
30002
30148
  * @param info The information of the mirror mode that should be applied to the display mode.
30149
+ * @returns Promise that resolves when the function finishes.
30003
30150
  * @since Chrome 65
30004
30151
  */
30005
30152
  export function setMirrorMode(
@@ -30267,6 +30414,7 @@ declare namespace chrome {
30267
30414
  * Adds a new log record.
30268
30415
  *
30269
30416
  * @param options The logging options.
30417
+ * @returns Returns a Promise which resolves once the log has been added.
30270
30418
  */
30271
30419
  export function add(
30272
30420
 
@@ -30374,6 +30522,7 @@ declare namespace chrome {
30374
30522
  * 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).
30375
30523
  *
30376
30524
  * @chrome-returns-extra since Chrome 116
30525
+ * @returns Returns a Promise which resolves with CaptureInfo\[\] for captured tabs.
30377
30526
  */
30378
30527
  export function getCapturedTabs(): Promise<CaptureInfo[]>;
30379
30528
 
@@ -30391,6 +30540,7 @@ declare namespace chrome {
30391
30540
  * 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.
30392
30541
  *
30393
30542
  * @chrome-returns-extra since Chrome 116
30543
+ * @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.
30394
30544
  * @since Chrome 71
30395
30545
  */
30396
30546
  export function getMediaStreamId(
@@ -33071,6 +33221,7 @@ declare namespace chrome {
33071
33221
  * @chrome-returns-extra since Chrome 101
33072
33222
  * @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.
33073
33223
  * @param options The speech options.
33224
+ * @returns Resolves right away, before speech finishes. If an error occurs, the promise will be rejected. Use options.onEvent to get more detailed feedback.
33074
33225
  */
33075
33226
  export function speak(
33076
33227
 
@@ -34785,6 +34936,7 @@ declare namespace chrome {
34785
34936
  * Registers one or more user scripts for this extension.
34786
34937
  *
34787
34938
  * @param scripts Contains a list of user scripts to be registered.
34939
+ * @returns Promise that resolves once scripts have been fully registered. The promise will be rejected if an error occurs.
34788
34940
  */
34789
34941
  export function register(
34790
34942
 
@@ -34807,6 +34959,7 @@ declare namespace chrome {
34807
34959
  * Returns all dynamically-registered user scripts for this extension.
34808
34960
  *
34809
34961
  * @param filter If specified, this method returns only the user scripts that match it.
34962
+ * @returns Promise that resolves with the registered scripts. The promise will be rejected if an error occurs.
34810
34963
  */
34811
34964
  export function getScripts(
34812
34965
 
@@ -34831,6 +34984,7 @@ declare namespace chrome {
34831
34984
  * Unregisters all dynamically-registered user scripts for this extension.
34832
34985
  *
34833
34986
  * @param filter If specified, this method unregisters only the user scripts that match it.
34987
+ * @returns Promise that resolves once scripts have been fully unregistered. The promise will be rejected if an error occurs.
34834
34988
  */
34835
34989
  export function unregister(
34836
34990
 
@@ -34853,6 +35007,7 @@ declare namespace chrome {
34853
35007
  * Updates one or more user scripts for this extension.
34854
35008
  *
34855
35009
  * @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.
35010
+ * @returns Promise that resolves once scripts have been fully updated. The promise will be rejected if an error occurs.
34856
35011
  */
34857
35012
  export function update(
34858
35013
 
@@ -34899,6 +35054,7 @@ declare namespace chrome {
34899
35054
  * Configures the `` `USER_SCRIPT` `` execution environment.
34900
35055
  *
34901
35056
  * @param properties Contains the user script world configuration.
35057
+ * @returns Promise that resolves once the world has been configured.
34902
35058
  */
34903
35059
  export function configureWorld(
34904
35060
 
@@ -34920,6 +35076,7 @@ declare namespace chrome {
34920
35076
  /**
34921
35077
  * Retrieves all registered world configurations.
34922
35078
  *
35079
+ * @returns Promise that resolves with the registered world configurations.
34923
35080
  * @since Chrome 133
34924
35081
  */
34925
35082
  export function getWorldConfigurations(): Promise<WorldProperties[]>;
@@ -34940,6 +35097,7 @@ declare namespace chrome {
34940
35097
  * 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.
34941
35098
  *
34942
35099
  * @param worldId The ID of the user script world to reset. If omitted, resets the default world's configuration.
35100
+ * @returns Promise that resolves when the configuration is reset.
34943
35101
  * @since Chrome 133
34944
35102
  */
34945
35103
  export function resetWorldConfiguration(
@@ -35161,6 +35319,7 @@ declare namespace chrome {
35161
35319
  *
35162
35320
  * @chrome-returns-extra since Chrome 96
35163
35321
  * @param name The name of the VPN configuration.
35322
+ * @returns Returns a Promise which resolves when the configuration is created or rejects if there is an error.
35164
35323
  */
35165
35324
  export function createConfig(
35166
35325
 
@@ -35189,6 +35348,7 @@ declare namespace chrome {
35189
35348
  *
35190
35349
  * @chrome-returns-extra since Chrome 96
35191
35350
  * @param id ID of the VPN configuration to destroy.
35351
+ * @returns Returns a Promise which resolves when the configuration is destroyed or rejects if there is an error.
35192
35352
  */
35193
35353
  export function destroyConfig(
35194
35354
 
@@ -35212,6 +35372,7 @@ declare namespace chrome {
35212
35372
  *
35213
35373
  * @chrome-returns-extra since Chrome 96
35214
35374
  * @param parameters The parameters for the VPN session.
35375
+ * @returns Returns a Promise which resolves when the parameters are set or rejects if there is an error.
35215
35376
  */
35216
35377
  export function setParameters(
35217
35378
 
@@ -35235,6 +35396,7 @@ declare namespace chrome {
35235
35396
  *
35236
35397
  * @chrome-returns-extra since Chrome 96
35237
35398
  * @param data The IP packet to be sent to the platform.
35399
+ * @returns Returns a Promise which resolves when the packet is sent or rejects if there is an error.
35238
35400
  */
35239
35401
  export function sendPacket(
35240
35402
 
@@ -35258,6 +35420,7 @@ declare namespace chrome {
35258
35420
  *
35259
35421
  * @chrome-returns-extra since Chrome 96
35260
35422
  * @param state The VPN session state of the VPN client.
35423
+ * @returns Returns a Promise which resolves when the notification is complete or rejects if there is an error.
35261
35424
  */
35262
35425
  export function notifyConnectionStateChanged(
35263
35426
 
@@ -36792,7 +36955,7 @@ declare namespace chrome {
36792
36955
  }
36793
36956
 
36794
36957
  /**
36795
- * @since Pending
36958
+ * @since Chrome 144
36796
36959
  */
36797
36960
  export interface SecurityInfo {
36798
36961
 
@@ -37232,7 +37395,7 @@ declare namespace chrome {
37232
37395
  /**
37233
37396
  * Information about the TLS/QUIC connection used for the underlying connection. Only provided if `securityInfo` is specified in the `extraInfoSpec` parameter.
37234
37397
  *
37235
- * @since Pending
37398
+ * @since Chrome 144
37236
37399
  */
37237
37400
  securityInfo?: SecurityInfo,
37238
37401
  },