@types/chrome 0.0.216 → 0.0.217

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +228 -606
  3. chrome/package.json +2 -2
chrome/index.d.ts CHANGED
@@ -168,7 +168,8 @@ declare namespace chrome.action {
168
168
  * @param tabId The id of the tab for which you want to modify the action.
169
169
  * @param callback
170
170
  */
171
- export function disable(tabId?: number, callback?: () => void): void;
171
+ export function disable(callback: () => void): void;
172
+ export function disable(tabId: number, callback: () => void): void;
172
173
 
173
174
  /**
174
175
  * Since Chrome 88.
@@ -184,13 +185,12 @@ declare namespace chrome.action {
184
185
  * @param tabId The id of the tab for which you want to modify the action.
185
186
  * @param callback
186
187
  */
187
- export function enable(tabId?: number, callback?: () => void): void;
188
+ export function enable(callback: () => void): void;
189
+ export function enable(tabId: number, callback: () => void): void;
188
190
 
189
191
  /**
190
192
  * Since Chrome 88.
191
193
  * Gets the background color of the action.
192
- * @param callback The callback parameter should be a function that looks like this:
193
- * (result: ColorArray) => {...}
194
194
  */
195
195
  export function getBadgeBackgroundColor(details: TabDetails, callback: (result: ColorArray) => void): void;
196
196
  /**
@@ -205,8 +205,6 @@ declare namespace chrome.action {
205
205
  * Gets the badge text of the action. If no tab is specified, the non-tab-specific badge text is returned.
206
206
  * If displayActionCountAsBadgeText is enabled, a placeholder text will be returned unless the
207
207
  * declarativeNetRequestFeedback permission is present or tab-specific badge text was provided.
208
- * @param callback The callback parameter should be a function that looks like this:
209
- * (result: string) => {...}
210
208
  */
211
209
  export function getBadgeText(details: TabDetails, callback: (result: string) => void): void;
212
210
 
@@ -222,8 +220,6 @@ declare namespace chrome.action {
222
220
  /**
223
221
  * Since Chrome 88.
224
222
  * Gets the html document set as the popup for this action.
225
- * @param callback The callback parameter should be a function that looks like this:
226
- * (result: string) => {...}
227
223
  */
228
224
  export function getPopup(details: TabDetails, callback: (result: string) => void): void;
229
225
 
@@ -237,8 +233,6 @@ declare namespace chrome.action {
237
233
  /**
238
234
  * Since Chrome 88.
239
235
  * Gets the title of the action.
240
- * @param callback The callback parameter should be a function that looks like this:
241
- * (result: string) => {...}
242
236
  */
243
237
  export function getTitle(details: TabDetails, callback: (result: string) => void): void;
244
238
 
@@ -252,8 +246,6 @@ declare namespace chrome.action {
252
246
  /**
253
247
  * Since Chrome 91.
254
248
  * Returns the user-specified settings relating to an extension's action.
255
- * @param callback The callback parameter should be a function that looks like this:
256
- * (userSettings: UserSettings) => {...}
257
249
  */
258
250
  export function getUserSettings(callback: (userSettings: UserSettings) => void): void;
259
251
 
@@ -277,10 +269,9 @@ declare namespace chrome.action {
277
269
  * Since Chrome 99+.
278
270
  * Opens the extension's popup.
279
271
  * @param options Specifies options for opening the popup.
280
- * @param callback The callback parameter should be a function that looks like this:
281
- * () => {...}
282
272
  */
283
- export function openPopup(options?: OpenPopupOptions, callback?: () => void): void;
273
+ export function openPopup(callback: () => void): void;
274
+ export function openPopup(options: OpenPopupOptions, callback: () => void): void;
284
275
 
285
276
  /**
286
277
  * Since Chrome 88.
@@ -292,10 +283,8 @@ declare namespace chrome.action {
292
283
  /**
293
284
  * Since Chrome 88.
294
285
  * Sets the background color for the badge.
295
- * @param callback The callback parameter should be a function that looks like this:
296
- * () => {...}
297
286
  */
298
- export function setBadgeBackgroundColor(details: BadgeBackgroundColorDetails, callback?: () => void): void;
287
+ export function setBadgeBackgroundColor(details: BadgeBackgroundColorDetails, callback: () => void): void;
299
288
 
300
289
  /**
301
290
  * Since Chrome 88.
@@ -307,10 +296,8 @@ declare namespace chrome.action {
307
296
  /**
308
297
  * Since Chrome 88.
309
298
  * Sets the badge text for the action. The badge is displayed on top of the icon.
310
- * @param callback The callback parameter should be a function that looks like this:
311
- * () => {...}
312
299
  */
313
- export function setBadgeText(details: BadgeTextDetails, callback?: () => void): void;
300
+ export function setBadgeText(details: BadgeTextDetails, callback: () => void): void;
314
301
 
315
302
  /**
316
303
  * Since Chrome 88.
@@ -318,15 +305,7 @@ declare namespace chrome.action {
318
305
  * or as dictionary of either one of those. Either the path or the imageData property must be specified.
319
306
  * @return The `setIcon` method provides its result via callback or returned as a `Promise` (MV3 only). Since Chrome 96.
320
307
  */
321
- export function setIcon(details: TabIconDetails): Promise<void>;
322
-
323
- /**
324
- * Since Chrome 88.
325
- * Sets the icon for the action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element,
326
- * or as dictionary of either one of those. Either the path or the imageData property must be specified.
327
- * @param callback The callback parameter should be a function that looks like this:
328
- * () => {...}
329
- */
308
+ export function setIcon(details: TabIconDetails): Promise<void>
330
309
  export function setIcon(details: TabIconDetails, callback: () => void): void;
331
310
 
332
311
  /**
@@ -339,10 +318,8 @@ declare namespace chrome.action {
339
318
  /**
340
319
  * Since Chrome 88.
341
320
  * Sets the html document to be opened as a popup when the user clicks on the action's icon.
342
- * @param callback The callback parameter should be a function that looks like this:
343
- * () => {...}
344
321
  */
345
- export function setPopup(details: PopupDetails, callback?: () => void): void;
322
+ export function setPopup(details: PopupDetails, callback: () => void): void;
346
323
 
347
324
  /**
348
325
  * Since Chrome 88.
@@ -354,10 +331,8 @@ declare namespace chrome.action {
354
331
  /**
355
332
  * Since Chrome 88.
356
333
  * Sets the title of the action. This shows up in the tooltip.
357
- * @param callback The callback parameter should be a function that looks like this:
358
- * () => {...}
359
334
  */
360
- export function setTitle(details: TitleDetails, callback?: () => void): void;
335
+ export function setTitle(details: TitleDetails, callback: () => void): void;
361
336
 
362
337
  /** Fired when an action icon is clicked. This event will not fire if the action has a popup. */
363
338
  export var onClicked: BrowserClickedEvent;
@@ -409,8 +384,6 @@ declare namespace chrome.alarms {
409
384
  export function create(name: string, alarmInfo: AlarmCreateInfo): void;
410
385
  /**
411
386
  * Gets an array of all the alarms.
412
- * @param callback The callback parameter should be a function that looks like this:
413
- * function(array of Alarm alarms) {...};
414
387
  */
415
388
  export function getAll(callback: (alarms: Alarm[]) => void): void;
416
389
  /**
@@ -426,10 +399,8 @@ declare namespace chrome.alarms {
426
399
  export function clearAll(): Promise<boolean>;
427
400
  /**
428
401
  * Clears all alarms.
429
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
430
- * function(boolean wasCleared) {...};
431
402
  */
432
- export function clearAll(callback?: (wasCleared: boolean) => void): void;
403
+ export function clearAll(callback: (wasCleared: boolean) => void): void;
433
404
  /**
434
405
  * Clears the alarm with the given name.
435
406
  * @param name The name of the alarm to clear. Defaults to the empty string.
@@ -439,14 +410,11 @@ declare namespace chrome.alarms {
439
410
  /**
440
411
  * Clears the alarm with the given name.
441
412
  * @param name The name of the alarm to clear. Defaults to the empty string.
442
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
443
- * function(boolean wasCleared) {...};
444
413
  */
445
- export function clear(name?: string, callback?: (wasCleared: boolean) => void): void;
414
+ export function clear(callback: (wasCleared: boolean) => void): void;
415
+ export function clear(name: string, callback: (wasCleared: boolean) => void): void;
446
416
  /**
447
417
  * Clears the alarm without a name.
448
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
449
- * function(boolean wasCleared) {...};
450
418
  */
451
419
  export function clear(callback: (wasCleared: boolean) => void): void;
452
420
  /**
@@ -456,8 +424,6 @@ declare namespace chrome.alarms {
456
424
  export function clear(): Promise<void>;
457
425
  /**
458
426
  * Retrieves details about the specified alarm.
459
- * @param callback The callback parameter should be a function that looks like this:
460
- * function( Alarm alarm) {...};
461
427
  */
462
428
  export function get(callback: (alarm: Alarm) => void): void;
463
429
  /**
@@ -468,8 +434,6 @@ declare namespace chrome.alarms {
468
434
  /**
469
435
  * Retrieves details about the specified alarm.
470
436
  * @param name The name of the alarm to get. Defaults to the empty string.
471
- * @param callback The callback parameter should be a function that looks like this:
472
- * function( Alarm alarm) {...};
473
437
  */
474
438
  export function get(name: string, callback: (alarm: Alarm) => void): void;
475
439
  /**
@@ -622,8 +586,6 @@ declare namespace chrome.bookmarks {
622
586
  /**
623
587
  * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
624
588
  * @param query A string of words and quoted phrases that are matched against bookmark URLs and titles.
625
- * @param callback The callback parameter should be a function that looks like this:
626
- * function(array of BookmarkTreeNode results) {...};
627
589
  */
628
590
  export function search(query: string, callback: (results: BookmarkTreeNode[]) => void): void;
629
591
  /**
@@ -635,8 +597,6 @@ declare namespace chrome.bookmarks {
635
597
  /**
636
598
  * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
637
599
  * @param query An object with one or more of the properties query, url, and title specified. Bookmarks matching all specified properties will be produced.
638
- * @param callback The callback parameter should be a function that looks like this:
639
- * function(array of BookmarkTreeNode results) {...};
640
600
  */
641
601
  export function search(query: BookmarkSearchQuery, callback: (results: BookmarkTreeNode[]) => void): void;
642
602
  /**
@@ -647,8 +607,6 @@ declare namespace chrome.bookmarks {
647
607
  export function search(query: BookmarkSearchQuery): Promise<BookmarkTreeNode[]>;
648
608
  /**
649
609
  * Retrieves the entire Bookmarks hierarchy.
650
- * @param callback The callback parameter should be a function that looks like this:
651
- * function(array of BookmarkTreeNode results) {...};
652
610
  */
653
611
  export function getTree(callback: (results: BookmarkTreeNode[]) => void): void;
654
612
  /**
@@ -659,8 +617,6 @@ declare namespace chrome.bookmarks {
659
617
  /**
660
618
  * Retrieves the recently added bookmarks.
661
619
  * @param numberOfItems The maximum number of items to return.
662
- * @param callback The callback parameter should be a function that looks like this:
663
- * function(array of BookmarkTreeNode results) {...};
664
620
  */
665
621
  export function getRecent(numberOfItems: number, callback: (results: BookmarkTreeNode[]) => void): void;
666
622
  /**
@@ -672,8 +628,6 @@ declare namespace chrome.bookmarks {
672
628
  /**
673
629
  * Retrieves the specified BookmarkTreeNode.
674
630
  * @param id A single string-valued id
675
- * @param callback The callback parameter should be a function that looks like this:
676
- * function(array of BookmarkTreeNode results) {...};
677
631
  */
678
632
  export function get(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
679
633
  /**
@@ -685,8 +639,6 @@ declare namespace chrome.bookmarks {
685
639
  /**
686
640
  * Retrieves the specified BookmarkTreeNode.
687
641
  * @param idList An array of string-valued ids
688
- * @param callback The callback parameter should be a function that looks like this:
689
- * function(array of BookmarkTreeNode results) {...};
690
642
  */
691
643
  export function get(idList: string[], callback: (results: BookmarkTreeNode[]) => void): void;
692
644
  /**
@@ -702,10 +654,8 @@ declare namespace chrome.bookmarks {
702
654
  export function create(bookmark: BookmarkCreateArg): Promise<BookmarkTreeNode>;
703
655
  /**
704
656
  * Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.
705
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
706
- * function( BookmarkTreeNode result) {...};
707
657
  */
708
- export function create(bookmark: BookmarkCreateArg, callback?: (result: BookmarkTreeNode) => void): void;
658
+ export function create(bookmark: BookmarkCreateArg, callback: (result: BookmarkTreeNode) => void): void;
709
659
  /**
710
660
  * Moves the specified BookmarkTreeNode to the provided location.
711
661
  * @return The `move` method provides its result via callback or returned as a `Promise` (MV3 only).
@@ -716,13 +666,11 @@ declare namespace chrome.bookmarks {
716
666
  ): Promise<BookmarkTreeNode>;
717
667
  /**
718
668
  * Moves the specified BookmarkTreeNode to the provided location.
719
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
720
- * function( BookmarkTreeNode result) {...};
721
669
  */
722
670
  export function move(
723
671
  id: string,
724
672
  destination: BookmarkDestinationArg,
725
- callback?: (result: BookmarkTreeNode) => void,
673
+ callback: (result: BookmarkTreeNode) => void,
726
674
  ): void;
727
675
  /**
728
676
  * Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported.
@@ -734,13 +682,11 @@ declare namespace chrome.bookmarks {
734
682
  ): Promise<BookmarkTreeNode>;
735
683
  /**
736
684
  * Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported.
737
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
738
- * function( BookmarkTreeNode result) {...};
739
685
  */
740
686
  export function update(
741
687
  id: string,
742
688
  changes: BookmarkChangesArg,
743
- callback?: (result: BookmarkTreeNode) => void,
689
+ callback: (result: BookmarkTreeNode) => void,
744
690
  ): void;
745
691
  /**
746
692
  * Removes a bookmark or an empty bookmark folder.
@@ -749,14 +695,10 @@ declare namespace chrome.bookmarks {
749
695
  export function remove(id: string): Promise<void>;
750
696
  /**
751
697
  * Removes a bookmark or an empty bookmark folder.
752
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
753
- * function() {...};
754
698
  */
755
- export function remove(id: string, callback?: Function): void;
699
+ export function remove(id: string, callback: Function): void;
756
700
  /**
757
701
  * Retrieves the children of the specified BookmarkTreeNode id.
758
- * @param callback The callback parameter should be a function that looks like this:
759
- * function(array of BookmarkTreeNode results) {...};
760
702
  */
761
703
  export function getChildren(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
762
704
  /**
@@ -768,8 +710,6 @@ declare namespace chrome.bookmarks {
768
710
  * Since Chrome 14.
769
711
  * Retrieves part of the Bookmarks hierarchy, starting at the specified node.
770
712
  * @param id The ID of the root of the subtree to retrieve.
771
- * @param callback The callback parameter should be a function that looks like this:
772
- * function(array of BookmarkTreeNode results) {...};
773
713
  */
774
714
  export function getSubTree(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
775
715
  /**
@@ -786,10 +726,8 @@ declare namespace chrome.bookmarks {
786
726
  export function removeTree(id: string): Promise<void>;
787
727
  /**
788
728
  * Recursively removes a bookmark folder.
789
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
790
- * function() {...};
791
729
  */
792
- export function removeTree(id: string, callback?: Function): void;
730
+ export function removeTree(id: string, callback: Function): void;
793
731
 
794
732
  /** Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents. */
795
733
  export var onRemoved: BookmarkRemovedEvent;
@@ -875,7 +813,8 @@ declare namespace chrome.browserAction {
875
813
  * @param tabId The id of the tab for which you want to modify the browser action.
876
814
  * @param callback Supported since Chrome 67
877
815
  */
878
- export function enable(tabId?: number, callback?: () => void): void;
816
+ export function enable(callback: () => void): void;
817
+ export function enable(tabId: number, callback: () => void): void;
879
818
  /**
880
819
  * Sets the background color for the badge.
881
820
  * @return The `setBadgeBackgroundColor` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -885,7 +824,7 @@ declare namespace chrome.browserAction {
885
824
  * Sets the background color for the badge.
886
825
  * @param callback Supported since Chrome 67
887
826
  */
888
- export function setBadgeBackgroundColor(details: BadgeBackgroundColorDetails, callback?: () => void): void;
827
+ export function setBadgeBackgroundColor(details: BadgeBackgroundColorDetails, callback: () => void): void;
889
828
  /**
890
829
  * Sets the badge text for the browser action. The badge is displayed on top of the icon.
891
830
  * @return The `setBadgeText` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -895,7 +834,7 @@ declare namespace chrome.browserAction {
895
834
  * Sets the badge text for the browser action. The badge is displayed on top of the icon.
896
835
  * @param callback Supported since Chrome 67
897
836
  */
898
- export function setBadgeText(details: BadgeTextDetails, callback?: () => void): void;
837
+ export function setBadgeText(details: BadgeTextDetails, callback: () => void): void;
899
838
  /**
900
839
  * Sets the title of the browser action. This shows up in the tooltip.
901
840
  * @return The `setTitle` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -905,7 +844,7 @@ declare namespace chrome.browserAction {
905
844
  * Sets the title of the browser action. This shows up in the tooltip.
906
845
  * @param callback Supported since Chrome 67
907
846
  */
908
- export function setTitle(details: TitleDetails, callback?: () => void): void;
847
+ export function setTitle(details: TitleDetails, callback: () => void): void;
909
848
  /**
910
849
  * Since Chrome 19.
911
850
  * Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.
@@ -927,7 +866,7 @@ declare namespace chrome.browserAction {
927
866
  * Sets the html document to be opened as a popup when the user clicks on the browser action's icon.
928
867
  * @param callback Supported since Chrome 67
929
868
  */
930
- export function setPopup(details: PopupDetails, callback?: () => void): void;
869
+ export function setPopup(details: PopupDetails, callback: () => void): void;
931
870
  /**
932
871
  * Since Chrome 22.
933
872
  * Disables the browser action for a tab.
@@ -941,12 +880,11 @@ declare namespace chrome.browserAction {
941
880
  * @param tabId The id of the tab for which you want to modify the browser action.
942
881
  * @param callback Supported since Chrome 67
943
882
  */
944
- export function disable(tabId?: number, callback?: () => void): void;
883
+ export function disable(callback: () => void): void;
884
+ export function disable(tabId: number, callback: () => void): void;
945
885
  /**
946
886
  * Since Chrome 19.
947
887
  * Gets the title of the browser action.
948
- * @param callback The callback parameter should be a function that looks like this:
949
- * function(string result) {...};
950
888
  */
951
889
  export function getTitle(details: TabDetails, callback: (result: string) => void): void;
952
890
  /**
@@ -958,8 +896,6 @@ declare namespace chrome.browserAction {
958
896
  /**
959
897
  * Since Chrome 19.
960
898
  * Gets the background color of the browser action.
961
- * @param callback The callback parameter should be a function that looks like this:
962
- * function( ColorArray result) {...};
963
899
  */
964
900
  export function getBadgeBackgroundColor(details: TabDetails, callback: (result: ColorArray) => void): void;
965
901
  /**
@@ -971,8 +907,6 @@ declare namespace chrome.browserAction {
971
907
  /**
972
908
  * Since Chrome 19.
973
909
  * Gets the html document set as the popup for this browser action.
974
- * @param callback The callback parameter should be a function that looks like this:
975
- * function(string result) {...};
976
910
  */
977
911
  export function getPopup(details: TabDetails, callback: (result: string) => void): void;
978
912
  /**
@@ -983,10 +917,8 @@ declare namespace chrome.browserAction {
983
917
  export function getPopup(details: TabDetails): Promise<string>;
984
918
  /**
985
919
  * Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
986
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
987
- * function() {...};
988
920
  */
989
- export function setIcon(details: TabIconDetails, callback?: Function): void;
921
+ export function setIcon(details: TabIconDetails, callback: Function): void;
990
922
 
991
923
  /** Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. */
992
924
  export var onClicked: BrowserClickedEvent;
@@ -1102,8 +1034,6 @@ declare namespace chrome.browsingData {
1102
1034
  /**
1103
1035
  * Since Chrome 26.
1104
1036
  * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
1105
- * @param callback The callback parameter should be a function that looks like this:
1106
- * function(object result) {...};
1107
1037
  */
1108
1038
  export function settings(callback: (result: SettingsResult) => void): void;
1109
1039
  /**
@@ -1120,10 +1050,8 @@ declare namespace chrome.browsingData {
1120
1050
  *
1121
1051
  * Clears plugins' data.
1122
1052
  * @param callback Called when plugins' data has been cleared.
1123
- * If you specify the callback parameter, it should be a function that looks like this:
1124
- * function() {...};
1125
1053
  */
1126
- export function removePluginData(options: RemovalOptions, callback?: () => void): void;
1054
+ export function removePluginData(options: RemovalOptions, callback: () => void): void;
1127
1055
  /**
1128
1056
  * Since Chrome 72.
1129
1057
  * Clears websites' service workers.
@@ -1134,10 +1062,8 @@ declare namespace chrome.browsingData {
1134
1062
  * Since Chrome 72.
1135
1063
  * Clears websites' service workers.
1136
1064
  * @param callback Called when the browser's service workers have been cleared.
1137
- * If you specify the callback parameter, it should be a function that looks like this:
1138
- * function() {...};
1139
1065
  */
1140
- export function removeServiceWorkers(options: RemovalOptions, callback?: () => void): void;
1066
+ export function removeServiceWorkers(options: RemovalOptions, callback: () => void): void;
1141
1067
  /**
1142
1068
  * Clears the browser's stored form data (autofill).
1143
1069
  * @return The `removeFormData` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1146,10 +1072,8 @@ declare namespace chrome.browsingData {
1146
1072
  /**
1147
1073
  * Clears the browser's stored form data (autofill).
1148
1074
  * @param callback Called when the browser's form data has been cleared.
1149
- * If you specify the callback parameter, it should be a function that looks like this:
1150
- * function() {...};
1151
1075
  */
1152
- export function removeFormData(options: RemovalOptions, callback?: () => void): void;
1076
+ export function removeFormData(options: RemovalOptions, callback: () => void): void;
1153
1077
  /**
1154
1078
  * Clears websites' file system data.
1155
1079
  * @return The `removeFileSystems` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1158,10 +1082,8 @@ declare namespace chrome.browsingData {
1158
1082
  /**
1159
1083
  * Clears websites' file system data.
1160
1084
  * @param callback Called when websites' file systems have been cleared.
1161
- * If you specify the callback parameter, it should be a function that looks like this:
1162
- * function() {...};
1163
1085
  */
1164
- export function removeFileSystems(options: RemovalOptions, callback?: () => void): void;
1086
+ export function removeFileSystems(options: RemovalOptions, callback: () => void): void;
1165
1087
  /**
1166
1088
  * Clears various types of browsing data stored in a user's profile.
1167
1089
  * @param dataToRemove The set of data types to remove.
@@ -1172,10 +1094,8 @@ declare namespace chrome.browsingData {
1172
1094
  * Clears various types of browsing data stored in a user's profile.
1173
1095
  * @param dataToRemove The set of data types to remove.
1174
1096
  * @param callback Called when deletion has completed.
1175
- * If you specify the callback parameter, it should be a function that looks like this:
1176
- * function() {...};
1177
1097
  */
1178
- export function remove(options: RemovalOptions, dataToRemove: DataTypeSet, callback?: () => void): void;
1098
+ export function remove(options: RemovalOptions, dataToRemove: DataTypeSet, callback: () => void): void;
1179
1099
  /**
1180
1100
  * Clears the browser's stored passwords.
1181
1101
  * @return The `removePasswords` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1184,22 +1104,18 @@ declare namespace chrome.browsingData {
1184
1104
  /**
1185
1105
  * Clears the browser's stored passwords.
1186
1106
  * @param callback Called when the browser's passwords have been cleared.
1187
- * If you specify the callback parameter, it should be a function that looks like this:
1188
- * function() {...};
1189
1107
  */
1190
- export function removePasswords(options: RemovalOptions, callback?: () => void): void;
1108
+ export function removePasswords(options: RemovalOptions, callback: () => void): void;
1191
1109
  /**
1192
1110
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
1193
1111
  * @return The `removeCookies` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
1194
1112
  */
1195
- export function removeCookies(options: RemovalOptions, callback?: () => void): Promise<void>;
1113
+ export function removeCookies(options: RemovalOptions): Promise<void>;
1196
1114
  /**
1197
1115
  * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
1198
1116
  * @param callback Called when the browser's cookies and server-bound certificates have been cleared.
1199
- * If you specify the callback parameter, it should be a function that looks like this:
1200
- * function() {...};
1201
1117
  */
1202
- export function removeCookies(options: RemovalOptions, callback?: () => void): void;
1118
+ export function removeCookies(options: RemovalOptions, callback: () => void): void;
1203
1119
  /**
1204
1120
  * Clears websites' WebSQL data.
1205
1121
  * @return The `removeWebSQL` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1208,10 +1124,8 @@ declare namespace chrome.browsingData {
1208
1124
  /**
1209
1125
  * Clears websites' WebSQL data.
1210
1126
  * @param callback Called when websites' WebSQL databases have been cleared.
1211
- * If you specify the callback parameter, it should be a function that looks like this:
1212
- * function() {...};
1213
1127
  */
1214
- export function removeWebSQL(options: RemovalOptions, callback?: () => void): void;
1128
+ export function removeWebSQL(options: RemovalOptions, callback: () => void): void;
1215
1129
  /**
1216
1130
  * Clears websites' appcache data.
1217
1131
  * @return The `removeAppcache` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1220,20 +1134,16 @@ declare namespace chrome.browsingData {
1220
1134
  /**
1221
1135
  * Clears websites' appcache data.
1222
1136
  * @param callback Called when websites' appcache data has been cleared.
1223
- * If you specify the callback parameter, it should be a function that looks like this:
1224
- * function() {...};
1225
1137
  */
1226
- export function removeAppcache(options: RemovalOptions, callback?: () => void): void;
1138
+ export function removeAppcache(options: RemovalOptions, callback: () => void): void;
1227
1139
  /** Clears websites' cache storage data.
1228
1140
  * @return The `removeCacheStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
1229
1141
  */
1230
1142
  export function removeCacheStorage(options: RemovalOptions): Promise<void>
1231
1143
  /** Clears websites' cache storage data.
1232
1144
  * @param callback Called when websites' appcache data has been cleared.
1233
- * If you specify the callback parameter, it should be a function that looks like this:
1234
- * function() {...};
1235
1145
  */
1236
- export function removeCacheStorage(options: RemovalOptions, callback?: () => void): void
1146
+ export function removeCacheStorage(options: RemovalOptions, callback: () => void): void
1237
1147
  /**
1238
1148
  * Clears the browser's list of downloaded files (not the downloaded files themselves).
1239
1149
  * @return The `removeDownloads` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1242,10 +1152,8 @@ declare namespace chrome.browsingData {
1242
1152
  /**
1243
1153
  * Clears the browser's list of downloaded files (not the downloaded files themselves).
1244
1154
  * @param callback Called when the browser's list of downloaded files has been cleared.
1245
- * If you specify the callback parameter, it should be a function that looks like this:
1246
- * function() {...};
1247
1155
  */
1248
- export function removeDownloads(options: RemovalOptions, callback?: () => void): void;
1156
+ export function removeDownloads(options: RemovalOptions, callback: () => void): void;
1249
1157
  /**
1250
1158
  * Clears websites' local storage data.
1251
1159
  * @return The `removeLocalStorage` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1254,10 +1162,8 @@ declare namespace chrome.browsingData {
1254
1162
  /**
1255
1163
  * Clears websites' local storage data.
1256
1164
  * @param callback Called when websites' local storage has been cleared.
1257
- * If you specify the callback parameter, it should be a function that looks like this:
1258
- * function() {...};
1259
1165
  */
1260
- export function removeLocalStorage(options: RemovalOptions, callback?: () => void): void;
1166
+ export function removeLocalStorage(options: RemovalOptions, callback: () => void): void;
1261
1167
  /**
1262
1168
  * Clears the browser's cache.
1263
1169
  * @return The `removeCache` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1266,10 +1172,8 @@ declare namespace chrome.browsingData {
1266
1172
  /**
1267
1173
  * Clears the browser's cache.
1268
1174
  * @param callback Called when the browser's cache has been cleared.
1269
- * If you specify the callback parameter, it should be a function that looks like this:
1270
- * function() {...};
1271
1175
  */
1272
- export function removeCache(options: RemovalOptions, callback?: () => void): void;
1176
+ export function removeCache(options: RemovalOptions, callback: () => void): void;
1273
1177
  /**
1274
1178
  * Clears the browser's history.
1275
1179
  * @return The `removeHistory` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1278,10 +1182,8 @@ declare namespace chrome.browsingData {
1278
1182
  /**
1279
1183
  * Clears the browser's history.
1280
1184
  * @param callback Called when the browser's history has cleared.
1281
- * If you specify the callback parameter, it should be a function that looks like this:
1282
- * function() {...};
1283
1185
  */
1284
- export function removeHistory(options: RemovalOptions, callback?: () => void): void;
1186
+ export function removeHistory(options: RemovalOptions, callback: () => void): void;
1285
1187
  /**
1286
1188
  * Clears websites' IndexedDB data.
1287
1189
  * @return The `removeIndexedDB` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -1290,10 +1192,8 @@ declare namespace chrome.browsingData {
1290
1192
  /**
1291
1193
  * Clears websites' IndexedDB data.
1292
1194
  * @param callback Called when websites' IndexedDB data has been cleared.
1293
- * If you specify the callback parameter, it should be a function that looks like this:
1294
- * function() {...};
1295
1195
  */
1296
- export function removeIndexedDB(options: RemovalOptions, callback?: () => void): void;
1196
+ export function removeIndexedDB(options: RemovalOptions, callback: () => void): void;
1297
1197
  }
1298
1198
 
1299
1199
  ////////////////////
@@ -1324,8 +1224,6 @@ declare namespace chrome.commands {
1324
1224
  /**
1325
1225
  * Returns all the registered extension commands for this extension and their shortcut (if active).
1326
1226
  * @param callback Called to return the registered commands.
1327
- * If you specify the callback parameter, it should be a function that looks like this:
1328
- * function(array of Command commands) {...};
1329
1227
  */
1330
1228
  export function getAll(callback: (commands: Command[]) => void): void;
1331
1229
 
@@ -1441,26 +1339,22 @@ declare namespace chrome.contentSettings {
1441
1339
  export interface ContentSetting {
1442
1340
  /**
1443
1341
  * Clear all content setting rules set by this extension.
1444
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
1445
- * function() {...};
1446
1342
  */
1447
1343
  clear(details: ClearDetails, callback?: () => void): void;
1448
1344
  /**
1449
1345
  * Applies a new content setting rule.
1450
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
1451
- * function() {...};
1452
1346
  */
1453
1347
  set(details: SetDetails, callback?: () => void): void;
1454
- /**
1455
- * @param callback The callback parameter should be a function that looks like this:
1456
- * function(array of ResourceIdentifier resourceIdentifiers) {...};
1457
- * Parameter resourceIdentifiers: A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
1458
- */
1459
- getResourceIdentifiers(callback: (resourceIdentifiers?: ResourceIdentifier[]) => void): void;
1348
+ getResourceIdentifiers(
1349
+ callback: (
1350
+ /**
1351
+ * A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
1352
+ */
1353
+ resourceIdentifiers?: ResourceIdentifier[]
1354
+ ) => void
1355
+ ): void;
1460
1356
  /**
1461
1357
  * Gets the current content setting for a given pair of URLs.
1462
- * @param callback The callback parameter should be a function that looks like this:
1463
- * function(object details) {...};
1464
1358
  */
1465
1359
  get(details: GetDetails, callback: (details: ReturnedDetails) => void): void;
1466
1360
  }
@@ -1821,8 +1715,6 @@ declare namespace chrome.contextMenus {
1821
1715
  /**
1822
1716
  * Removes all context menu items added by this extension.
1823
1717
  * @param callback Called when removal is complete.
1824
- * If you specify the callback parameter, it should be a function that looks like this:
1825
- * function() {...};
1826
1718
  */
1827
1719
  export function removeAll(callback?: () => void): void;
1828
1720
  /**
@@ -1836,8 +1728,6 @@ declare namespace chrome.contextMenus {
1836
1728
  * @param id The ID of the item to update.
1837
1729
  * @param updateProperties The properties to update. Accepts the same values as the create function.
1838
1730
  * @param callback Called when the context menu has been updated.
1839
- * If you specify the callback parameter, it should be a function that looks like this:
1840
- * function() {...};
1841
1731
  */
1842
1732
  export function update(id: string, updateProperties: UpdateProperties, callback?: () => void): void;
1843
1733
  /**
@@ -1845,24 +1735,18 @@ declare namespace chrome.contextMenus {
1845
1735
  * @param id The ID of the item to update.
1846
1736
  * @param updateProperties The properties to update. Accepts the same values as the create function.
1847
1737
  * @param callback Called when the context menu has been updated.
1848
- * If you specify the callback parameter, it should be a function that looks like this:
1849
- * function() {...};
1850
1738
  */
1851
1739
  export function update(id: number, updateProperties: UpdateProperties, callback?: () => void): void;
1852
1740
  /**
1853
1741
  * Removes a context menu item.
1854
1742
  * @param menuItemId The ID of the context menu item to remove.
1855
1743
  * @param callback Called when the context menu has been removed.
1856
- * If you specify the callback parameter, it should be a function that looks like this:
1857
- * function() {...};
1858
1744
  */
1859
1745
  export function remove(menuItemId: string, callback?: () => void): void;
1860
1746
  /**
1861
1747
  * Removes a context menu item.
1862
1748
  * @param menuItemId The ID of the context menu item to remove.
1863
1749
  * @param callback Called when the context menu has been removed.
1864
- * If you specify the callback parameter, it should be a function that looks like this:
1865
- * function() {...};
1866
1750
  */
1867
1751
  export function remove(menuItemId: number, callback?: () => void): void;
1868
1752
 
@@ -1987,8 +1871,6 @@ declare namespace chrome.cookies {
1987
1871
 
1988
1872
  /**
1989
1873
  * Lists all existing cookie stores.
1990
- * @param callback The callback parameter should be a function that looks like this:
1991
- * function(array of CookieStore cookieStores) {...};
1992
1874
  * Parameter cookieStores: All the existing cookie stores.
1993
1875
  */
1994
1876
  export function getAllCookieStores(callback: (cookieStores: CookieStore[]) => void): void;
@@ -2000,8 +1882,6 @@ declare namespace chrome.cookies {
2000
1882
  /**
2001
1883
  * Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
2002
1884
  * @param details Information to filter the cookies being retrieved.
2003
- * @param callback The callback parameter should be a function that looks like this:
2004
- * function(array of Cookie cookies) {...};
2005
1885
  * Parameter cookies: All the existing, unexpired cookies that match the given cookie info.
2006
1886
  */
2007
1887
  export function getAll(details: GetAllDetails, callback: (cookies: Cookie[]) => void): void;
@@ -2020,11 +1900,9 @@ declare namespace chrome.cookies {
2020
1900
  /**
2021
1901
  * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
2022
1902
  * @param details Details about the cookie being set.
2023
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
2024
- * function( Cookie cookie) {...};
2025
1903
  * Optional parameter cookie: Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "chrome.runtime.lastError" will be set.
2026
1904
  */
2027
- export function set(details: SetDetails, callback?: (cookie: Cookie | null) => void): void;
1905
+ export function set(details: SetDetails, callback: (cookie: Cookie | null) => void): void;
2028
1906
  /**
2029
1907
  * Deletes a cookie by name.
2030
1908
  * @param details Information to identify the cookie to remove.
@@ -2034,15 +1912,11 @@ declare namespace chrome.cookies {
2034
1912
  /**
2035
1913
  * Deletes a cookie by name.
2036
1914
  * @param details Information to identify the cookie to remove.
2037
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
2038
- * function(object details) {...};
2039
1915
  */
2040
1916
  export function remove(details: Details, callback?: (details: Details) => void): void;
2041
1917
  /**
2042
1918
  * Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
2043
1919
  * @param details Details to identify the cookie being retrieved.
2044
- * @param callback The callback parameter should be a function that looks like this:
2045
- * function( Cookie cookie) {...};
2046
1920
  * Parameter cookie: Contains details about the cookie. This parameter is null if no such cookie was found.
2047
1921
  */
2048
1922
  export function get(details: Details, callback: (cookie: Cookie | null) => void): void;
@@ -2133,11 +2007,9 @@ declare module chrome {
2133
2007
  * Attaches debugger to the given target.
2134
2008
  * @param target Debugging target to which you want to attach.
2135
2009
  * @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 in the documentation pages.
2136
- * @param callback Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, runtime.lastError will be set to the error message.
2137
- * If you specify the callback parameter, it should be a function that looks like this:
2138
- * function() {...};
2010
+ * @param callback Called once the attach operation succeeds or fails. If the attach fails, runtime.lastError will be set to the error message.
2139
2011
  */
2140
- export function attach(target: Debuggee, requiredVersion: string, callback?: () => void): void;
2012
+ export function attach(target: Debuggee, requiredVersion: string, callback: () => void): void;
2141
2013
  /**
2142
2014
  * Detaches debugger from the given target.
2143
2015
  * @param target Debugging target from which you want to detach.
@@ -2147,11 +2019,9 @@ declare module chrome {
2147
2019
  /**
2148
2020
  * Detaches debugger from the given target.
2149
2021
  * @param target Debugging target from which you want to detach.
2150
- * @param callback Called once the detach operation succeeds or fails. Callback receives no arguments. If the detach fails, runtime.lastError will be set to the error message.
2151
- * If you specify the callback parameter, it should be a function that looks like this:
2152
- * function() {...};
2022
+ * @param callback Called once the detach operation succeeds or fails. If the detach fails, runtime.lastError will be set to the error message.
2153
2023
  */
2154
- export function detach(target: Debuggee, callback?: () => void): void;
2024
+ export function detach(target: Debuggee, callback: () => void): void;
2155
2025
  /**
2156
2026
  * Sends given command to the debugging target.
2157
2027
  * @param target Debugging target to which you want to send the command.
@@ -2172,8 +2042,6 @@ declare module chrome {
2172
2042
  * @param commandParams Since Chrome 22.
2173
2043
  * JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
2174
2044
  * @param callback Response body. If an error occurs while posting the message, the callback will be called with no arguments and runtime.lastError will be set to the error message.
2175
- * If you specify the callback parameter, it should be a function that looks like this:
2176
- * function(object result) {...};
2177
2045
  */
2178
2046
  export function sendCommand(
2179
2047
  target: Debuggee,
@@ -2190,8 +2058,6 @@ declare module chrome {
2190
2058
  /**
2191
2059
  * Since Chrome 28.
2192
2060
  * Returns the list of available debug targets.
2193
- * @param callback The callback parameter should be a function that looks like this:
2194
- * function(array of TargetInfo result) {...};
2195
2061
  * Parameter result: Array of TargetInfo objects corresponding to the available debug targets.
2196
2062
  */
2197
2063
  export function getTargets(callback: (result: TargetInfo[]) => void): void;
@@ -2423,8 +2289,6 @@ declare namespace chrome.desktopCapture {
2423
2289
  /**
2424
2290
  * Shows desktop media picker UI with the specified set of sources.
2425
2291
  * @param sources Set of sources that should be shown to the user.
2426
- * @param callback The callback parameter should be a function that looks like this:
2427
- * function(string streamId) {...};
2428
2292
  * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
2429
2293
  */
2430
2294
  export function chooseDesktopMedia(sources: string[], callback: (streamId: string, options: StreamOptions) => void): number;
@@ -2432,8 +2296,6 @@ declare namespace chrome.desktopCapture {
2432
2296
  * Shows desktop media picker UI with the specified set of sources.
2433
2297
  * @param sources Set of sources that should be shown to the user.
2434
2298
  * @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches tab.url.
2435
- * @param callback The callback parameter should be a function that looks like this:
2436
- * function(string streamId) {...};
2437
2299
  * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
2438
2300
  */
2439
2301
  export function chooseDesktopMedia(
@@ -2458,27 +2320,36 @@ declare namespace chrome.desktopCapture {
2458
2320
  declare namespace chrome.devtools.inspectedWindow {
2459
2321
  /** A resource within the inspected page, such as a document, a script, or an image. */
2460
2322
  export interface Resource {
2461
- /** The URL of the resource. */
2462
- url: string;
2463
- /**
2464
- * Gets the content of the resource.
2465
- * @param callback A function that receives resource content when the request completes.
2466
- * The callback parameter should be a function that looks like this:
2467
- * function(string content, string encoding) {...};
2468
- * Parameter content: Content of the resource (potentially encoded).
2469
- * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
2470
- */
2471
- getContent(callback: (content: string, encoding: string) => void): void;
2472
- /**
2473
- * Sets the content of the resource.
2474
- * @param content New content of the resource. Only resources with the text type are currently supported.
2475
- * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
2476
- * @param callback A function called upon request completion.
2477
- * If you specify the callback parameter, it should be a function that looks like this:
2478
- * function(object error) {...};
2479
- * Optional parameter error: Set to undefined if the resource content was set successfully; describes error otherwise.
2480
- */
2481
- setContent(content: string, commit: boolean, callback?: (error: Object) => void): void;
2323
+ /** The URL of the resource. */
2324
+ url: string;
2325
+ /**
2326
+ * Gets the content of the resource.
2327
+ * @param callback A function that receives resource content when the request completes.
2328
+ */
2329
+ getContent(
2330
+ callback: (
2331
+ /** Content of the resource (potentially encoded) */
2332
+ content: string,
2333
+ /** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported. */
2334
+ encoding: string
2335
+ ) => void
2336
+ ): void;
2337
+ /**
2338
+ * Sets the content of the resource.
2339
+ * @param content New content of the resource. Only resources with the text type are currently supported.
2340
+ * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
2341
+ * @param callback A function called upon request completion.
2342
+ */
2343
+ setContent(
2344
+ content: string,
2345
+ commit: boolean,
2346
+ callback?: (
2347
+ /**
2348
+ * Set to undefined if the resource content was set successfully; describes error otherwise.
2349
+ */
2350
+ error?: Object
2351
+ ) => void
2352
+ ): void;
2482
2353
  }
2483
2354
 
2484
2355
  export interface ReloadOptions {
@@ -2525,8 +2396,6 @@ declare namespace chrome.devtools.inspectedWindow {
2525
2396
  * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object.
2526
2397
  * @param expression An expression to evaluate.
2527
2398
  * @param callback A function called when evaluation completes.
2528
- * If you specify the callback parameter, it should be a function that looks like this:
2529
- * function(object result, object exceptionInfo) {...};
2530
2399
  * Parameter result: The result of evaluation.
2531
2400
  * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression.
2532
2401
  */
@@ -2539,8 +2408,6 @@ declare namespace chrome.devtools.inspectedWindow {
2539
2408
  * @param expression An expression to evaluate.
2540
2409
  * @param options The options parameter can contain one or more options.
2541
2410
  * @param callback A function called when evaluation completes.
2542
- * If you specify the callback parameter, it should be a function that looks like this:
2543
- * function(object result, object exceptionInfo) {...};
2544
2411
  * Parameter result: The result of evaluation.
2545
2412
  * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression.
2546
2413
  */
@@ -2552,8 +2419,6 @@ declare namespace chrome.devtools.inspectedWindow {
2552
2419
  /**
2553
2420
  * Retrieves the list of resources from the inspected page.
2554
2421
  * @param callback A function that receives the list of resources when the request completes.
2555
- * The callback parameter should be a function that looks like this:
2556
- * function(array of Resource resources) {...};
2557
2422
  */
2558
2423
  export function getResources(callback: (resources: Resource[]) => void): void;
2559
2424
 
@@ -2586,15 +2451,18 @@ declare namespace chrome.devtools.network {
2586
2451
  export interface HARLog extends HARFormatLog { }
2587
2452
  /** Represents a network request for a document resource (script, image and so on). See HAR Specification for reference. */
2588
2453
  export interface Request extends chrome.devtools.network.HAREntry {
2589
- /**
2590
- * Returns content of the response body.
2591
- * @param callback A function that receives the response body when the request completes.
2592
- * The callback parameter should be a function that looks like this:
2593
- * function(string content, string encoding) {...};
2594
- * Parameter content: Content of the response body (potentially encoded).
2595
- * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
2596
- */
2597
- getContent(callback: (content: string, encoding: string) => void): void;
2454
+ /**
2455
+ * Returns content of the response body.
2456
+ * @param callback A function that receives the response body when the request completes.
2457
+ */
2458
+ getContent(
2459
+ callback: (
2460
+ /** Content of the response body (potentially encoded) */
2461
+ content: string,
2462
+ /** Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported */
2463
+ encoding: string
2464
+ ) => void
2465
+ ): void;
2598
2466
  }
2599
2467
 
2600
2468
  export interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> { }
@@ -2604,8 +2472,6 @@ declare namespace chrome.devtools.network {
2604
2472
  /**
2605
2473
  * Returns HAR log that contains all known network requests.
2606
2474
  * @param callback A function that receives the HAR log when the request completes.
2607
- * The callback parameter should be a function that looks like this:
2608
- * function(object harLog) {...};
2609
2475
  * Parameter harLog: A HAR log. See HAR specification for details.
2610
2476
  */
2611
2477
  export function getHAR(callback: (harLog: HARLog) => void): void;
@@ -2666,17 +2532,20 @@ declare namespace chrome.devtools.panels {
2666
2532
 
2667
2533
  /** Represents the Elements panel. */
2668
2534
  export interface ElementsPanel {
2669
- /**
2670
- * Creates a pane within panel's sidebar.
2671
- * @param title Text that is displayed in sidebar caption.
2672
- * @param callback A callback invoked when the sidebar is created.
2673
- * If you specify the callback parameter, it should be a function that looks like this:
2674
- * function( ExtensionSidebarPane result) {...};
2675
- * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
2676
- */
2677
- createSidebarPane(title: string, callback?: (result: ExtensionSidebarPane) => void): void;
2678
- /** Fired when an object is selected in the panel. */
2679
- onSelectionChanged: SelectionChangedEvent;
2535
+ /**
2536
+ * Creates a pane within panel's sidebar.
2537
+ * @param title Text that is displayed in sidebar caption.
2538
+ * @param callback A callback invoked when the sidebar is created.
2539
+ */
2540
+ createSidebarPane(
2541
+ title: string,
2542
+ callback?: (
2543
+ /** An ExtensionSidebarPane object for created sidebar pane */
2544
+ result: ExtensionSidebarPane
2545
+ ) => void
2546
+ ): void;
2547
+ /** Fired when an object is selected in the panel. */
2548
+ onSelectionChanged: SelectionChangedEvent;
2680
2549
  }
2681
2550
 
2682
2551
  /**
@@ -2688,11 +2557,14 @@ declare namespace chrome.devtools.panels {
2688
2557
  * Creates a pane within panel's sidebar.
2689
2558
  * @param title Text that is displayed in sidebar caption.
2690
2559
  * @param callback A callback invoked when the sidebar is created.
2691
- * If you specify the callback parameter, it should be a function that looks like this:
2692
- * function( ExtensionSidebarPane result) {...};
2693
- * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
2694
2560
  */
2695
- createSidebarPane(title: string, callback?: (result: ExtensionSidebarPane) => void): void;
2561
+ createSidebarPane(
2562
+ title: string,
2563
+ callback?: (
2564
+ /** An ExtensionSidebarPane object for created sidebar pane. */
2565
+ result: ExtensionSidebarPane
2566
+ ) => void
2567
+ ): void;
2696
2568
  /** Fired when an object is selected in the panel. */
2697
2569
  onSelectionChanged: SelectionChangedEvent;
2698
2570
  }
@@ -2714,16 +2586,12 @@ declare namespace chrome.devtools.panels {
2714
2586
  * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
2715
2587
  * @param rootTitle An optional title for the root of the expression tree.
2716
2588
  * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
2717
- * If you specify the callback parameter, it should be a function that looks like this:
2718
- * function() {...};
2719
2589
  */
2720
2590
  setExpression(expression: string, rootTitle?: string, callback?: () => void): void;
2721
2591
  /**
2722
2592
  * Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
2723
2593
  * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
2724
2594
  * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
2725
- * If you specify the callback parameter, it should be a function that looks like this:
2726
- * function() {...};
2727
2595
  */
2728
2596
  setExpression(expression: string, callback?: () => void): void;
2729
2597
  /**
@@ -2731,16 +2599,12 @@ declare namespace chrome.devtools.panels {
2731
2599
  * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
2732
2600
  * @param rootTitle An optional title for the root of the expression tree.
2733
2601
  * @param callback A callback invoked after the sidebar is updated with the object.
2734
- * If you specify the callback parameter, it should be a function that looks like this:
2735
- * function() {...};
2736
2602
  */
2737
2603
  setObject(jsonObject: Object, rootTitle?: string, callback?: () => void): void;
2738
2604
  /**
2739
2605
  * Sets a JSON-compliant object to be displayed in the sidebar pane.
2740
2606
  * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
2741
2607
  * @param callback A callback invoked after the sidebar is updated with the object.
2742
- * If you specify the callback parameter, it should be a function that looks like this:
2743
- * function() {...};
2744
2608
  */
2745
2609
  setObject(jsonObject: Object, callback?: () => void): void;
2746
2610
  /**
@@ -2768,8 +2632,6 @@ declare namespace chrome.devtools.panels {
2768
2632
  * @param iconPath Path of the panel's icon relative to the extension directory.
2769
2633
  * @param pagePath Path of the panel's HTML page relative to the extension directory.
2770
2634
  * @param callback A function that is called when the panel is created.
2771
- * If you specify the callback parameter, it should be a function that looks like this:
2772
- * function( ExtensionPanel panel) {...};
2773
2635
  * Parameter panel: An ExtensionPanel object representing the created panel.
2774
2636
  */
2775
2637
  export function create(
@@ -2781,8 +2643,6 @@ declare namespace chrome.devtools.panels {
2781
2643
  /**
2782
2644
  * Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.
2783
2645
  * @param callback A function that is called when the user clicks on a valid resource link in Developer Tools window. Note that if the user clicks an invalid URL or an XHR, this function is not called.
2784
- * If you specify the callback parameter, it should be a function that looks like this:
2785
- * function( devtools.inspectedWindow.Resource resource) {...};
2786
2646
  * Parameter resource: A devtools.inspectedWindow.Resource object for the resource that was clicked.
2787
2647
  */
2788
2648
  export function setOpenResourceHandler(
@@ -2794,8 +2654,6 @@ declare namespace chrome.devtools.panels {
2794
2654
  * @param url The URL of the resource to open.
2795
2655
  * @param lineNumber Specifies the line number to scroll to when the resource is loaded.
2796
2656
  * @param callback A function that is called when the resource has been successfully loaded.
2797
- * If you specify the callback parameter, it should be a function that looks like this:
2798
- * function() {...};
2799
2657
  */
2800
2658
  export function openResource(url: string, lineNumber: number, callback: () => void): void;
2801
2659
 
@@ -2834,8 +2692,6 @@ declare namespace chrome.documentScan {
2834
2692
  * Performs a document scan. On success, the PNG data will be sent to the callback.
2835
2693
  * @param options Object containing scan parameters.
2836
2694
  * @param callback Called with the result and data from the scan.
2837
- * The callback parameter should be a function that looks like this:
2838
- * function(object result) {...};
2839
2695
  */
2840
2696
  export function scan(options: DocumentScanOptions, callback: (result: DocumentScanCallbackArg) => void): void;
2841
2697
  }
@@ -3065,8 +2921,6 @@ declare namespace chrome.downloads {
3065
2921
  export function search(query: DownloadQuery): Promise<DownloadItem[]>;
3066
2922
  /**
3067
2923
  * Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.
3068
- * @param callback The callback parameter should be a function that looks like this:
3069
- * function(array of DownloadItem results) {...};
3070
2924
  */
3071
2925
  export function search(query: DownloadQuery, callback: (results: DownloadItem[]) => void): void;
3072
2926
  /**
@@ -3079,10 +2933,8 @@ declare namespace chrome.downloads {
3079
2933
  * Pause the download. If the request was successful the download is in a paused state. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
3080
2934
  * @param downloadId The id of the download to pause.
3081
2935
  * @param callback Called when the pause request is completed.
3082
- * If you specify the callback parameter, it should be a function that looks like this:
3083
- * function() {...};
3084
2936
  */
3085
- export function pause(downloadId: number, callback?: () => void): void;
2937
+ export function pause(downloadId: number, callback: () => void): void;
3086
2938
  /**
3087
2939
  * Retrieve an icon for the specified download. For new downloads, file icons are available after the 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, runtime.lastError will contain an error message.
3088
2940
  * @param downloadId The identifier for the download.
@@ -3093,16 +2945,12 @@ declare namespace chrome.downloads {
3093
2945
  * Retrieve an icon for the specified download. For new downloads, file icons are available after the 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, runtime.lastError will contain an error message.
3094
2946
  * @param downloadId The identifier for the download.
3095
2947
  * @param callback A URL to an image that represents the download.
3096
- * The callback parameter should be a function that looks like this:
3097
- * function(string iconURL) {...};
3098
2948
  */
3099
2949
  export function getFileIcon(downloadId: number, callback: (iconURL: string) => void): void;
3100
2950
  /**
3101
2951
  * Retrieve an icon for the specified download. For new downloads, file icons are available after the 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, runtime.lastError will contain an error message.
3102
2952
  * @param downloadId The identifier for the download.
3103
2953
  * @param callback A URL to an image that represents the download.
3104
- * The callback parameter should be a function that looks like this:
3105
- * function(string iconURL) {...};
3106
2954
  */
3107
2955
  export function getFileIcon(
3108
2956
  downloadId: number,
@@ -3119,10 +2967,8 @@ declare namespace chrome.downloads {
3119
2967
  * Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
3120
2968
  * @param downloadId The id of the download to resume.
3121
2969
  * @param callback Called when the resume request is completed.
3122
- * If you specify the callback parameter, it should be a function that looks like this:
3123
- * function() {...};
3124
2970
  */
3125
- export function resume(downloadId: number, callback?: () => void): void;
2971
+ export function resume(downloadId: number, callback: () => void): void;
3126
2972
  /**
3127
2973
  * Cancel a download. When callback is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
3128
2974
  * @param downloadId The id of the download to cancel.
@@ -3133,10 +2979,8 @@ declare namespace chrome.downloads {
3133
2979
  * Cancel a download. When callback is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
3134
2980
  * @param downloadId The id of the download to cancel.
3135
2981
  * @param callback Called when the cancel request is completed.
3136
- * If you specify the callback parameter, it should be a function that looks like this:
3137
- * function() {...};
3138
2982
  */
3139
- export function cancel(downloadId: number, callback?: () => void): void;
2983
+ export function cancel(downloadId: number, callback: () => void): void;
3140
2984
  /**
3141
2985
  * 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 DownloadItem's downloadId. If there was an error starting the download, then callback will be called with downloadId=undefined and runtime.lastError will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.
3142
2986
  * @param options What to download and how.
@@ -3147,10 +2991,8 @@ declare namespace chrome.downloads {
3147
2991
  * 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 DownloadItem's downloadId. If there was an error starting the download, then callback will be called with downloadId=undefined and runtime.lastError will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.
3148
2992
  * @param options What to download and how.
3149
2993
  * @param callback Called with the id of the new DownloadItem.
3150
- * If you specify the callback parameter, it should be a function that looks like this:
3151
- * function(integer downloadId) {...};
3152
2994
  */
3153
- export function download(options: DownloadOptions, callback?: (downloadId: number) => void): void;
2995
+ export function download(options: DownloadOptions, callback: (downloadId: number) => void): void;
3154
2996
  /**
3155
2997
  * Open the downloaded file now if the DownloadItem is complete; otherwise returns an error through runtime.lastError. Requires the "downloads.open" permission in addition to the "downloads" permission. An onChanged event will fire when the item is opened for the first time.
3156
2998
  * @param downloadId The identifier for the downloaded file.
@@ -3170,8 +3012,6 @@ declare namespace chrome.downloads {
3170
3012
  export function erase(query: DownloadQuery): Promise<number[]>;
3171
3013
  /**
3172
3014
  * Erase matching DownloadItem from history without deleting the downloaded file. An onErased event will fire for each DownloadItem that matches query, then callback will be called.
3173
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
3174
- * function(array of integer erasedIds) {...};
3175
3015
  */
3176
3016
  export function erase(query: DownloadQuery, callback: (erasedIds: number[]) => void): void;
3177
3017
  /**
@@ -3181,8 +3021,6 @@ declare namespace chrome.downloads {
3181
3021
  export function removeFile(downloadId: number): Promise<void>;
3182
3022
  /**
3183
3023
  * Remove the downloaded file if it exists and the DownloadItem is complete; otherwise return an error through runtime.lastError.
3184
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
3185
- * function() {...};
3186
3024
  */
3187
3025
  export function removeFile(downloadId: number, callback?: () => void): void;
3188
3026
  /**
@@ -3195,8 +3033,6 @@ declare namespace chrome.downloads {
3195
3033
  * 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 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 onChanged fires.
3196
3034
  * @param downloadId The identifier for the DownloadItem.
3197
3035
  * @param callback Called when the danger prompt dialog closes.
3198
- * If you specify the callback parameter, it should be a function that looks like this:
3199
- * function() {...};
3200
3036
  */
3201
3037
  export function acceptDanger(downloadId: number, callback: () => void): void;
3202
3038
  /** Initiate dragging the downloaded file to another application. Call in a javascript ondragstart handler. */
@@ -3250,8 +3086,6 @@ declare namespace chrome.enterprise.platformKeys {
3250
3086
  /**
3251
3087
  * 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).
3252
3088
  * @param callback Invoked by getTokens with the list of available Tokens.
3253
- * The callback parameter should be a function that looks like this:
3254
- * function(array of Token tokens) {...};
3255
3089
  * Parameter tokens: The list of available tokens.
3256
3090
  */
3257
3091
  export function getTokens(callback: (tokens: Token[]) => void): void;
@@ -3259,8 +3093,6 @@ declare namespace chrome.enterprise.platformKeys {
3259
3093
  * 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.
3260
3094
  * @param tokenId The id of a Token returned by getTokens.
3261
3095
  * @param callback Called back with the list of the available certificates.
3262
- * The callback parameter should be a function that looks like this:
3263
- * function(array of ArrayBuffer certificates) {...};
3264
3096
  * Parameter certificates: The list of certificates, each in DER encoding of a X.509 certificate.
3265
3097
  */
3266
3098
  export function getCertificates(tokenId: string, callback: (certificates: ArrayBuffer[]) => void): void;
@@ -3269,8 +3101,6 @@ declare namespace chrome.enterprise.platformKeys {
3269
3101
  * @param tokenId The id of a Token returned by getTokens.
3270
3102
  * @param certificate The DER encoding of a X.509 certificate.
3271
3103
  * @param callback Called back when this operation is finished.
3272
- * If you specify the callback parameter, it should be a function that looks like this:
3273
- * function() {...};
3274
3104
  */
3275
3105
  export function importCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
3276
3106
  /**
@@ -3278,8 +3108,6 @@ declare namespace chrome.enterprise.platformKeys {
3278
3108
  * @param tokenId The id of a Token returned by getTokens.
3279
3109
  * @param certificate The DER encoding of a X.509 certificate.
3280
3110
  * @param callback Called back when this operation is finished.
3281
- * If you specify the callback parameter, it should be a function that looks like this:
3282
- * function() {...};
3283
3111
  */
3284
3112
  export function removeCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
3285
3113
  /**
@@ -3295,8 +3123,6 @@ declare namespace chrome.enterprise.platformKeys {
3295
3123
  * @param challenge A challenge as emitted by the Verified Access Web API.
3296
3124
  * @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. Since Chrome 59.
3297
3125
  * @param callback Called back with the challenge response.
3298
- * The callback parameter should be a function that looks like this:
3299
- * function(ArrayBuffer response) {...};
3300
3126
  * @since Chrome 50.
3301
3127
  */
3302
3128
  export function challengeMachineKey(
@@ -3318,8 +3144,6 @@ declare namespace chrome.enterprise.platformKeys {
3318
3144
  * @param challenge A challenge as emitted by the Verified Access Web API.
3319
3145
  * @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.
3320
3146
  * @param callback Called back with the challenge response.
3321
- * The callback parameter should be a function that looks like this:
3322
- * function(ArrayBuffer response) {...};
3323
3147
  * @since Chrome 50.
3324
3148
  */
3325
3149
  export function challengeUserKey(
@@ -3343,8 +3167,6 @@ declare namespace chrome.enterprise.deviceAttributes {
3343
3167
  /**
3344
3168
  * @description Fetches the value of the device identifier of the directory API, that is generated by the server and identifies the cloud record of the device for querying in the cloud directory API.
3345
3169
  * @param callback Called with the device identifier of the directory API when received.
3346
- * The callback parameter should be a function that looks like this:
3347
- * function(string deviceId) {...};
3348
3170
  */
3349
3171
  export function getDirectoryDeviceId(callback: (deviceId: string) => void): void;
3350
3172
  /**
@@ -3405,8 +3227,6 @@ declare namespace chrome.enterprise.networkingAttributes {
3405
3227
  /**
3406
3228
  * 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, runtime.lastError will be set with a failure reason.
3407
3229
  * @param callback Called with the device's default network's NetworkDetails.
3408
- * The callback parameter should be a function that looks like this:
3409
- * function(NetworkDetails networkAddresses) {...};
3410
3230
  */
3411
3231
  export function getNetworkDetails(callback: (networkDetails: NetworkDetails) => void): void;
3412
3232
  }
@@ -3476,20 +3296,25 @@ declare namespace chrome.events {
3476
3296
  /**
3477
3297
  * Returns currently registered rules.
3478
3298
  * @param callback Called with registered rules.
3479
- * The callback parameter should be a function that looks like this:
3480
- * function(array of Rule rules) {...};
3481
- * Parameter rules: Rules that were registered, the optional parameters are filled with values.
3482
3299
  */
3483
- getRules(callback: (rules: Rule[]) => void): void;
3300
+ getRules(
3301
+ callback: (
3302
+ /** Rules that were registered, the optional parameters are filled with values */
3303
+ rules: Rule[]
3304
+ ) => void
3305
+ ): void;
3484
3306
  /**
3485
3307
  * Returns currently registered rules.
3486
3308
  * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are returned.
3487
3309
  * @param callback Called with registered rules.
3488
- * The callback parameter should be a function that looks like this:
3489
- * function(array of Rule rules) {...};
3490
- * Parameter rules: Rules that were registered, the optional parameters are filled with values.
3491
3310
  */
3492
- getRules(ruleIdentifiers: string[], callback: (rules: Rule[]) => void): void;
3311
+ getRules(
3312
+ ruleIdentifiers: string[],
3313
+ callback: (
3314
+ /** Rules that were registered, the optional parameters are filled with values */
3315
+ rules: Rule[]
3316
+ ) => void
3317
+ ): void;
3493
3318
  /**
3494
3319
  * @param callback Listener whose registration status shall be tested.
3495
3320
  */
@@ -3498,31 +3323,28 @@ declare namespace chrome.events {
3498
3323
  * Unregisters currently registered rules.
3499
3324
  * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are unregistered.
3500
3325
  * @param callback Called when rules were unregistered.
3501
- * If you specify the callback parameter, it should be a function that looks like this:
3502
- * function() {...};
3503
3326
  */
3504
3327
  removeRules(ruleIdentifiers?: string[], callback?: () => void): void;
3505
3328
  /**
3506
3329
  * Unregisters currently registered rules.
3507
3330
  * @param callback Called when rules were unregistered.
3508
- * If you specify the callback parameter, it should be a function that looks like this:
3509
- * function() {...};
3510
3331
  */
3511
3332
  removeRules(callback?: () => void): void;
3512
3333
  /**
3513
3334
  * Registers rules to handle events.
3514
3335
  * @param rules Rules to be registered. These do not replace previously registered rules.
3515
3336
  * @param callback Called with registered rules.
3516
- * If you specify the callback parameter, it should be a function that looks like this:
3517
- * function(array of Rule rules) {...};
3518
- * Parameter rules: Rules that were registered, the optional parameters are filled with values.
3519
3337
  */
3520
- addRules(rules: Rule[], callback?: (rules: Rule[]) => void): void;
3338
+ addRules(
3339
+ rules: Rule[],
3340
+ callback?: (
3341
+ /** Rules that were registered, the optional parameters are filled with values */
3342
+ rules: Rule[]
3343
+ ) => void
3344
+ ): void;
3521
3345
  /**
3522
3346
  * Deregisters an event listener callback from an event.
3523
3347
  * @param callback Listener that shall be unregistered.
3524
- * The callback parameter should be a function that looks like this:
3525
- * function() {...};
3526
3348
  */
3527
3349
  removeListener(callback: T): void;
3528
3350
  hasListeners(): boolean;
@@ -3533,8 +3355,6 @@ declare namespace chrome.events {
3533
3355
  /**
3534
3356
  * Registers an event listener callback to an event.
3535
3357
  * @param callback Called when an event occurs. The parameters of this function depend on the type of event.
3536
- * The callback parameter should be a function that looks like this:
3537
- * function() {...};
3538
3358
  */
3539
3359
  addListener(callback: T): void;
3540
3360
  }
@@ -3624,8 +3444,6 @@ declare namespace chrome.extension {
3624
3444
  /**
3625
3445
  * Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.
3626
3446
  * Since Chrome 12.
3627
- * @param callback The callback parameter should be a function that looks like this:
3628
- * function(boolean isAllowedAccess) {...};
3629
3447
  * Parameter isAllowedAccess: True if the extension can access the 'file://' scheme, false otherwise.
3630
3448
  */
3631
3449
  export function isAllowedFileSchemeAccess(callback: (isAllowedAccess: boolean) => void): void;
@@ -3638,8 +3456,6 @@ declare namespace chrome.extension {
3638
3456
  /**
3639
3457
  * Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
3640
3458
  * Since Chrome 12.
3641
- * @param callback The callback parameter should be a function that looks like this:
3642
- * function(boolean isAllowedAccess) {...};
3643
3459
  * Parameter isAllowedAccess: True if the extension has access to Incognito mode, false otherwise.
3644
3460
  */
3645
3461
  export function isAllowedIncognitoAccess(callback: (isAllowedAccess: boolean) => void): void;
@@ -3722,8 +3538,6 @@ declare namespace chrome.fileBrowserHandler {
3722
3538
  * Since Chrome 21.
3723
3539
  * @param selectionParams Parameters that will be used while selecting the file.
3724
3540
  * @param callback Function called upon completion.
3725
- * The callback parameter should be a function that looks like this:
3726
- * function(object result) {...};
3727
3541
  * Parameter result: Result of the method.
3728
3542
  */
3729
3543
  export function selectFile(selectionParams: SelectionParams, callback: (result: SelectionResult) => void): void;
@@ -4082,31 +3896,23 @@ declare namespace chrome.fileSystemProvider {
4082
3896
  * Depending on the type of the file system being mounted, the source option must be set appropriately.
4083
3897
  * In case of an error, runtime.lastError will be set with a corresponding error code.
4084
3898
  * @param callback A generic result callback to indicate success or failure.
4085
- * If you specify the callback parameter, it should be a function that looks like this:
4086
- * function() {...};
4087
3899
  */
4088
3900
  export function mount(options: MountOptions, callback?: () => void): void;
4089
3901
  /**
4090
3902
  * Unmounts a file system with the given fileSystemId. It must be called after 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).
4091
3903
  * In case of an error, runtime.lastError will be set with a corresponding error code.
4092
3904
  * @param callback A generic result callback to indicate success or failure.
4093
- * If you specify the callback parameter, it should be a function that looks like this:
4094
- * function() {...};
4095
3905
  */
4096
3906
  export function unmount(options: UnmountOptions, callback?: () => void): void;
4097
3907
  /**
4098
3908
  * Returns all file systems mounted by the extension.
4099
3909
  * @param callback Callback to receive the result of getAll function.
4100
- * The callback parameter should be a function that looks like this:
4101
- * function(array of FileSystemInfo fileSystems) {...};
4102
3910
  */
4103
3911
  export function getAll(callback: (fileSystems: FileSystemInfo[]) => void): void;
4104
3912
  /**
4105
3913
  * Returns information about a file system with the passed fileSystemId.
4106
3914
  * @since Since Chrome 42.
4107
3915
  * @param callback Callback to receive the result of get function.
4108
- * The callback parameter should be a function that looks like this:
4109
- * function(FileSystemInfo fileSystem) {...};
4110
3916
  */
4111
3917
  export function get(fileSystemId: string, callback: (fileSystem: FileSystemInfo) => void): void;
4112
3918
  /**
@@ -4117,8 +3923,6 @@ declare namespace chrome.fileSystemProvider {
4117
3923
  * Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
4118
3924
  * In case of an error, runtime.lastError will be set will a corresponding error code.
4119
3925
  * @param callback A generic result callback to indicate success or failure.
4120
- * If you specify the callback parameter, it should be a function that looks like this:
4121
- * function() {...};
4122
3926
  */
4123
3927
  export function notify(options: NotificationOptions, callback: () => void): void;
4124
3928
 
@@ -4257,10 +4061,8 @@ declare namespace chrome.fontSettings {
4257
4061
  export function setDefaultFontSize(details: DefaultFontSizeDetails): Promise<void>
4258
4062
  /**
4259
4063
  * Sets the default font size.
4260
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4261
- * function() {...};
4262
4064
  */
4263
- export function setDefaultFontSize(details: DefaultFontSizeDetails, callback?: Function): void;
4065
+ export function setDefaultFontSize(details: DefaultFontSizeDetails, callback: Function): void;
4264
4066
  /**
4265
4067
  * Gets the font for a given script and generic font family.
4266
4068
  * @return The `getFont` method provides its result via callback or returned as a `Promise` (MV3 only).
@@ -4268,10 +4070,8 @@ declare namespace chrome.fontSettings {
4268
4070
  export function getFont(details: FontDetails): Promise<FontDetailsResult>
4269
4071
  /**
4270
4072
  * Gets the font for a given script and generic font family.
4271
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4272
- * function(object details) {...};
4273
4073
  */
4274
- export function getFont(details: FontDetails, callback?: (details: FontDetailsResult) => void): void;
4074
+ export function getFont(details: FontDetails, callback: (details: FontDetailsResult) => void): void;
4275
4075
  /**
4276
4076
  * Gets the default font size.
4277
4077
  * @param details This parameter is currently unused.
@@ -4281,10 +4081,9 @@ declare namespace chrome.fontSettings {
4281
4081
  /**
4282
4082
  * Gets the default font size.
4283
4083
  * @param details This parameter is currently unused.
4284
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4285
- * function(object details) {...};
4286
4084
  */
4287
- export function getDefaultFontSize(details?: Object, callback?: (options: FontSizeDetails) => void): void;
4085
+ export function getDefaultFontSize(callback: (options: FontSizeDetails) => void): void;
4086
+ export function getDefaultFontSize(details: Object, callback: (options: FontSizeDetails) => void): void;
4288
4087
  /**
4289
4088
  * Gets the minimum font size.
4290
4089
  * @param details This parameter is currently unused.
@@ -4294,10 +4093,9 @@ declare namespace chrome.fontSettings {
4294
4093
  /**
4295
4094
  * Gets the minimum font size.
4296
4095
  * @param details This parameter is currently unused.
4297
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4298
- * function(object details) {...};
4299
4096
  */
4300
- export function getMinimumFontSize(details?: object, callback?: (options: FontSizeDetails) => void): void;
4097
+ export function getMinimumFontSize(callback: (options: FontSizeDetails) => void): void;
4098
+ export function getMinimumFontSize(details: object, callback: (options: FontSizeDetails) => void): void;
4301
4099
  /**
4302
4100
  * Sets the minimum font size.
4303
4101
  * @return The `setMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -4305,10 +4103,8 @@ declare namespace chrome.fontSettings {
4305
4103
  export function setMinimumFontSize(details: SetFontSizeDetails): Promise<void>;
4306
4104
  /**
4307
4105
  * Sets the minimum font size.
4308
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4309
- * function() {...};
4310
4106
  */
4311
- export function setMinimumFontSize(details: SetFontSizeDetails, callback?: Function): void;
4107
+ export function setMinimumFontSize(details: SetFontSizeDetails, callback: Function): void;
4312
4108
  /**
4313
4109
  * Gets the default size for fixed width fonts.
4314
4110
  * @param details This parameter is currently unused.
@@ -4318,10 +4114,9 @@ declare namespace chrome.fontSettings {
4318
4114
  /**
4319
4115
  * Gets the default size for fixed width fonts.
4320
4116
  * @param details This parameter is currently unused.
4321
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4322
- * function(object details) {...};
4323
4117
  */
4324
- export function getDefaultFixedFontSize(details?: Object, callback?: (details: FontSizeDetails) => void): void;
4118
+ export function getDefaultFixedFontSize(callback: (details: FontSizeDetails) => void): void;
4119
+ export function getDefaultFixedFontSize(details: Object, callback: (details: FontSizeDetails) => void): void;
4325
4120
  /**
4326
4121
  * Clears the default font size set by this extension, if any.
4327
4122
  * @param details This parameter is currently unused.
@@ -4331,10 +4126,9 @@ declare namespace chrome.fontSettings {
4331
4126
  /**
4332
4127
  * Clears the default font size set by this extension, if any.
4333
4128
  * @param details This parameter is currently unused.
4334
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4335
- * function() {...};
4336
4129
  */
4337
- export function clearDefaultFontSize(details?: Object, callback?: Function): void;
4130
+ export function clearDefaultFontSize(callback: Function): void;
4131
+ export function clearDefaultFontSize(details: Object, callback: Function): void;
4338
4132
  /**
4339
4133
  * Sets the default size for fixed width fonts.
4340
4134
  * @return The `setDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -4342,10 +4136,8 @@ declare namespace chrome.fontSettings {
4342
4136
  export function setDefaultFixedFontSize(details: SetFontSizeDetails): Promise<void>;
4343
4137
  /**
4344
4138
  * Sets the default size for fixed width fonts.
4345
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4346
- * function() {...};
4347
4139
  */
4348
- export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback?: Function): void;
4140
+ export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback: Function): void;
4349
4141
  /**
4350
4142
  * Clears the font set by this extension, if any.
4351
4143
  * @return The `clearFont` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -4353,10 +4145,8 @@ declare namespace chrome.fontSettings {
4353
4145
  export function clearFont(details: FontDetails): Promise<void>;
4354
4146
  /**
4355
4147
  * Clears the font set by this extension, if any.
4356
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4357
- * function() {...};
4358
4148
  */
4359
- export function clearFont(details: FontDetails, callback?: Function): void;
4149
+ export function clearFont(details: FontDetails, callback: Function): void;
4360
4150
  /**
4361
4151
  * Sets the font for a given script and generic font family.
4362
4152
  * @return The `setFont` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -4364,10 +4154,8 @@ declare namespace chrome.fontSettings {
4364
4154
  export function setFont(details: SetFontDetails): Promise<void>;
4365
4155
  /**
4366
4156
  * Sets the font for a given script and generic font family.
4367
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4368
- * function(object details) {...};
4369
4157
  */
4370
- export function setFont(details: SetFontDetails, callback?: Function): void;
4158
+ export function setFont(details: SetFontDetails, callback: Function): void;
4371
4159
  /**
4372
4160
  * Clears the minimum font size set by this extension, if any.
4373
4161
  * @param details This parameter is currently unused.
@@ -4377,10 +4165,9 @@ declare namespace chrome.fontSettings {
4377
4165
  /**
4378
4166
  * Clears the minimum font size set by this extension, if any.
4379
4167
  * @param details This parameter is currently unused.
4380
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4381
- * function() {...};
4382
4168
  */
4383
- export function clearMinimumFontSize(details?: Object, callback?: Function): void;
4169
+ export function clearMinimumFontSize(callback: Function): void;
4170
+ export function clearMinimumFontSize(details: Object, callback: Function): void;
4384
4171
  /**
4385
4172
  * Gets a list of fonts on the system.
4386
4173
  * @return The `getFontList` method provides its result via callback or returned as a `Promise` (MV3 only).
@@ -4388,10 +4175,8 @@ declare namespace chrome.fontSettings {
4388
4175
  export function getFontList(): Promise<FontName[]>;
4389
4176
  /**
4390
4177
  * Gets a list of fonts on the system.
4391
- * @param callback The callback parameter should be a function that looks like this:
4392
- * function(array of FontName results) {...};
4393
4178
  */
4394
- export function getFontList(callback?: (results: FontName[]) => void): void;
4179
+ export function getFontList(callback: (results: FontName[]) => void): void;
4395
4180
  /**
4396
4181
  * Clears the default fixed font size set by this extension, if any.
4397
4182
  * @param details This parameter is currently unused.
@@ -4401,10 +4186,8 @@ declare namespace chrome.fontSettings {
4401
4186
  /**
4402
4187
  * Clears the default fixed font size set by this extension, if any.
4403
4188
  * @param details This parameter is currently unused.
4404
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4405
- * function() {...};
4406
4189
  */
4407
- export function clearDefaultFixedFontSize(details: Object, callback?: Function): void;
4190
+ export function clearDefaultFixedFontSize(details: Object, callback: Function): void;
4408
4191
 
4409
4192
  /** Fired when the default fixed font size setting changes. */
4410
4193
  export var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
@@ -4474,24 +4257,18 @@ declare namespace chrome.gcm {
4474
4257
  * Registers the application with GCM. 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.
4475
4258
  * @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.
4476
4259
  * @param callback Function called when registration completes. It should check runtime.lastError for error when registrationId is empty.
4477
- * The callback parameter should be a function that looks like this:
4478
- * function(string registrationId) {...};
4479
4260
  * Parameter registrationId: A registration ID assigned to the application by the GCM.
4480
4261
  */
4481
4262
  export function register(senderIds: string[], callback: (registrationId: string) => void): void;
4482
4263
  /**
4483
4264
  * Unregisters the application from GCM.
4484
4265
  * @param callback A function called after the unregistration completes. Unregistration was successful if runtime.lastError is not set.
4485
- * The callback parameter should be a function that looks like this:
4486
- * function() {...};
4487
4266
  */
4488
4267
  export function unregister(callback: () => void): void;
4489
4268
  /**
4490
4269
  * Sends a message according to its contents.
4491
4270
  * @param message A message to send to the other party via GCM.
4492
4271
  * @param callback A function called after the message is successfully queued for sending. runtime.lastError should be checked, to ensure a message was sent without problems.
4493
- * The callback parameter should be a function that looks like this:
4494
- * function(string messageId) {...};
4495
4272
  * Parameter messageId: The ID of the message that the callback was issued for.
4496
4273
  */
4497
4274
  export function send(message: OutgoingMessage, callback: (messageId: string) => void): void;
@@ -4584,10 +4361,8 @@ declare namespace chrome.history {
4584
4361
  export function search(query: HistoryQuery): Promise<HistoryItem[]>;
4585
4362
  /**
4586
4363
  * Searches the history for the last visit time of each page matching the query.
4587
- * @param callback The callback parameter should be a function that looks like this:
4588
- * function(array of HistoryItem results) {...};
4589
4364
  */
4590
- export function search(query: HistoryQuery, callback?: (results: HistoryItem[]) => void): void;
4365
+ export function search(query: HistoryQuery, callback: (results: HistoryItem[]) => void): void;
4591
4366
  /**
4592
4367
  * Adds a URL to the history at the current time with a transition type of "link".
4593
4368
  * @return The `addUrl` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -4595,10 +4370,8 @@ declare namespace chrome.history {
4595
4370
  export function addUrl(details: Url): Promise<void>;
4596
4371
  /**
4597
4372
  * Adds a URL to the history at the current time with a transition type of "link".
4598
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4599
- * function() {...};
4600
4373
  */
4601
- export function addUrl(details: Url, callback?: () => void): void;
4374
+ export function addUrl(details: Url, callback: () => void): void;
4602
4375
  /**
4603
4376
  * Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.
4604
4377
  * @return The `deleteRange` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -4606,10 +4379,8 @@ declare namespace chrome.history {
4606
4379
  export function deleteRange(range: Range): Promise<void>;
4607
4380
  /**
4608
4381
  * Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.
4609
- * @param callback The callback parameter should be a function that looks like this:
4610
- * function() {...};
4611
4382
  */
4612
- export function deleteRange(range: Range, callback?: () => void): void;
4383
+ export function deleteRange(range: Range, callback: () => void): void;
4613
4384
  /**
4614
4385
  * Deletes all items from the history.
4615
4386
  * @return The `deleteAll` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -4617,8 +4388,6 @@ declare namespace chrome.history {
4617
4388
  export function deleteAll(): Promise<void>;
4618
4389
  /**
4619
4390
  * Deletes all items from the history.
4620
- * @param callback The callback parameter should be a function that looks like this:
4621
- * function() {...};
4622
4391
  */
4623
4392
  export function deleteAll(callback: () => void): void;
4624
4393
  /**
@@ -4628,8 +4397,6 @@ declare namespace chrome.history {
4628
4397
  export function getVisits(details: Url): Promise<VisitItem[]>;
4629
4398
  /**
4630
4399
  * Retrieves information about visits to a URL.
4631
- * @param callback The callback parameter should be a function that looks like this:
4632
- * function(array of VisitItem results) {...};
4633
4400
  */
4634
4401
  export function getVisits(details: Url, callback: (results: VisitItem[]) => void): void;
4635
4402
  /**
@@ -4639,10 +4406,8 @@ declare namespace chrome.history {
4639
4406
  export function deleteUrl(details: Url): Promise<void>;
4640
4407
  /**
4641
4408
  * Removes all occurrences of the given URL from the history.
4642
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
4643
- * function() {...};
4644
4409
  */
4645
- export function deleteUrl(details: Url, callback?: () => void): void;
4410
+ export function deleteUrl(details: Url, callback: () => void): void;
4646
4411
 
4647
4412
  /** Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded. */
4648
4413
  export var onVisited: HistoryVisitedEvent;
@@ -4686,8 +4451,6 @@ declare namespace chrome.i18n {
4686
4451
  export function getAcceptLanguages(): Promise<string[]>;
4687
4452
  /**
4688
4453
  * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage.
4689
- * @param callback The callback parameter should be a function that looks like this:
4690
- * function(array of string languages) {...};
4691
4454
  * Parameter languages: Array of the accept languages of the browser, such as en-US,en,zh-CN
4692
4455
  */
4693
4456
  export function getAcceptLanguages(callback: (languages: string[]) => void): void;
@@ -4711,7 +4474,6 @@ declare namespace chrome.i18n {
4711
4474
  export function detectLanguage(text: string): Promise<LanguageDetectionResult>;
4712
4475
  /** Detects the language of the provided text using CLD.
4713
4476
  * @param text User input string to be translated.
4714
- * @param callback The callback parameter should be a function that looks like this: function(object result) {...};
4715
4477
  */
4716
4478
  export function detectLanguage(text: string, callback: (result: LanguageDetectionResult) => void): void;
4717
4479
  }
@@ -4815,8 +4577,6 @@ declare namespace chrome.identity {
4815
4577
  * If `callback` is not provided, the function returns a Promise when the state has been cleared.
4816
4578
  * @since Chrome 87.
4817
4579
  * @param callback Called when the state has been cleared.
4818
- * The parameter should be a function that looks like this:
4819
- * () => {...};
4820
4580
  */
4821
4581
  export function clearAllCachedAuthTokens(): Promise<void>;
4822
4582
  export function clearAllCachedAuthTokens(callback: () => void): void;
@@ -4836,8 +4596,6 @@ declare namespace chrome.identity {
4836
4596
  * If `callback` is not provided, the function returns a Promise that resolves with the token.
4837
4597
  * @param details Token options.
4838
4598
  * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error.
4839
- * If you specify the callback parameter, it should be a function that looks like this:
4840
- * function(string token) {...};
4841
4599
  */
4842
4600
  export function getAuthToken(details: TokenDetails): Promise<GetAuthTokenResult>;
4843
4601
  export function getAuthToken(details: TokenDetails, callback: (token?: string, grantedScopes?: string[]) => void): void;
@@ -4861,8 +4619,6 @@ declare namespace chrome.identity {
4861
4619
  * If `callback` is not provided, the function returns a Promise when the state has been removed from the cache.
4862
4620
  * @param details Token information.
4863
4621
  * @param callback Called when the token has been removed from the cache.
4864
- * If you specify the callback parameter, it should be a function that looks like this:
4865
- * function() {...};
4866
4622
  */
4867
4623
  export function removeCachedAuthToken(details: TokenInformation): Promise<void>;
4868
4624
  export function removeCachedAuthToken(details: TokenInformation, callback: () => void): void;
@@ -4873,8 +4629,6 @@ declare namespace chrome.identity {
4873
4629
  * 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.
4874
4630
  * @param details WebAuth flow options.
4875
4631
  * @param callback Optional. Called with the URL redirected back to your application.
4876
- * The callback parameter should be a function that looks like this:
4877
- * function(string responseUrl) {...};
4878
4632
  */
4879
4633
  export function launchWebAuthFlow(details: WebAuthFlowOptions, callback: (responseUrl?: string) => void): void;
4880
4634
  export function launchWebAuthFlow(details: WebAuthFlowOptions): Promise<string | undefined>;
@@ -4910,8 +4664,6 @@ declare namespace chrome.idle {
4910
4664
  * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
4911
4665
  * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
4912
4666
  * Since Chrome 25.
4913
- * @param callback The callback parameter should be a function that looks like this:
4914
- * function( IdleState newState) {...};
4915
4667
  */
4916
4668
  export function queryState(detectionIntervalInSeconds: number, callback: (newState: IdleState) => void): void;
4917
4669
  /**
@@ -4922,8 +4674,6 @@ declare namespace chrome.idle {
4922
4674
  export function setDetectionInterval(intervalInSeconds: number): void;
4923
4675
  /**
4924
4676
  * Gets the time, in seconds, it takes until the screen is locked automatically while idle. Returns a zero duration if the screen is never locked automatically. Currently supported on Chrome OS only.
4925
- * @param callback The callback parameter should be a function that looks like this:
4926
- * function(integer delay) {...};
4927
4677
  * Parameter delay: Time, in seconds, until the screen is locked automatically while idle. This is zero if the screen never locks automatically.
4928
4678
  */
4929
4679
  export function getAutoLockDelay(callback: (delay: number) => void): void;
@@ -5257,44 +5007,32 @@ declare namespace chrome.input.ime {
5257
5007
 
5258
5008
  /**
5259
5009
  * Adds the provided menu items to the language menu when this IME is active.
5260
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5261
- * function() {...};
5262
5010
  */
5263
5011
  export function setMenuItems(parameters: ImeParameters, callback?: () => void): void;
5264
5012
  /**
5265
5013
  * Commits the provided text to the current input.
5266
5014
  * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
5267
- * If you specify the callback parameter, it should be a function that looks like this:
5268
- * function(boolean success) {...};
5269
5015
  */
5270
5016
  export function commitText(parameters: CommitTextParameters, callback?: (success: boolean) => void): void;
5271
5017
  /**
5272
5018
  * Sets the current candidate list. This fails if this extension doesn't own the active IME
5273
5019
  * @param callback Called when the operation completes.
5274
- * If you specify the callback parameter, it should be a function that looks like this:
5275
- * function(boolean success) {...};
5276
5020
  */
5277
5021
  export function setCandidates(parameters: CandidatesParameters, callback?: (success: boolean) => void): void;
5278
5022
  /**
5279
5023
  * Set the current composition. If this extension does not own the active IME, this fails.
5280
5024
  * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
5281
- * If you specify the callback parameter, it should be a function that looks like this:
5282
- * function(boolean success) {...};
5283
5025
  */
5284
5026
  export function setComposition(parameters: CompositionParameters, callback?: (success: boolean) => void): void;
5285
5027
  /**
5286
5028
  * Updates the state of the MenuItems specified
5287
5029
  * @param callback Called when the operation completes
5288
- * If you specify the callback parameter, it should be a function that looks like this:
5289
- * function() {...};
5290
5030
  */
5291
5031
  export function updateMenuItems(parameters: MenuItemParameters, callback?: () => void): void;
5292
5032
  /**
5293
5033
  * Shows/Hides an assistive window with the given properties.
5294
5034
  * @param parameters
5295
5035
  * @param callback Called when the operation completes.
5296
- * If you specify the callback parameter, it should be a function that looks like this:
5297
- * function(boolean success) {...};
5298
5036
  */
5299
5037
  export function setAssistiveWindowProperties(
5300
5038
  parameters: {
@@ -5307,8 +5045,6 @@ declare namespace chrome.input.ime {
5307
5045
  * Highlights/Unhighlights a button in an assistive window.
5308
5046
  * @param parameters
5309
5047
  * @param callback Called when the operation completes. On failure, chrome.runtime.lastError is set.
5310
- * If you specify the callback parameter, it should be a function that looks like this:
5311
- * function() {...};
5312
5048
  */
5313
5049
  export function setAssistiveWindowButtonHighlighted(
5314
5050
  parameters: {
@@ -5323,8 +5059,6 @@ declare namespace chrome.input.ime {
5323
5059
  /**
5324
5060
  * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
5325
5061
  * @param callback Called when the operation completes.
5326
- * If you specify the callback parameter, it should be a function that looks like this:
5327
- * function(boolean success) {...};
5328
5062
  */
5329
5063
  export function setCandidateWindowProperties(
5330
5064
  parameters: CandidateWindowParameter,
@@ -5333,8 +5067,6 @@ declare namespace chrome.input.ime {
5333
5067
  /**
5334
5068
  * Clear the current composition. If this extension does not own the active IME, this fails.
5335
5069
  * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
5336
- * If you specify the callback parameter, it should be a function that looks like this:
5337
- * function(boolean success) {...};
5338
5070
  */
5339
5071
  export function clearComposition(
5340
5072
  parameters: ClearCompositionParameters,
@@ -5343,8 +5075,6 @@ declare namespace chrome.input.ime {
5343
5075
  /**
5344
5076
  * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
5345
5077
  * @param callback Called when the operation completes
5346
- * If you specify the callback parameter, it should be a function that looks like this:
5347
- * function(boolean success) {...};
5348
5078
  */
5349
5079
  export function setCursorPosition(
5350
5080
  parameters: CursorPositionParameters,
@@ -5354,8 +5084,6 @@ declare namespace chrome.input.ime {
5354
5084
  * 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.
5355
5085
  * @since Chrome 33.
5356
5086
  * @param callback Called when the operation completes.
5357
- * If you specify the callback parameter, it should be a function that looks like this:
5358
- * function() {...};
5359
5087
  */
5360
5088
  export function sendKeyEvents(parameters: SendKeyEventParameters, callback?: () => void): void;
5361
5089
  /**
@@ -5574,10 +5302,8 @@ declare namespace chrome.management {
5574
5302
  * Enables or disables an app or extension.
5575
5303
  * @param id This should be the id from an item of management.ExtensionInfo.
5576
5304
  * @param enabled Whether this item should be enabled or disabled.
5577
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5578
- * function() {...};
5579
5305
  */
5580
- export function setEnabled(id: string, enabled: boolean, callback?: () => void): void;
5306
+ export function setEnabled(id: string, enabled: boolean, callback: () => void): void;
5581
5307
  /**
5582
5308
  * Returns a list of permission warnings for the given extension id.
5583
5309
  * @since Chrome 15.
@@ -5589,10 +5315,8 @@ declare namespace chrome.management {
5589
5315
  * Returns a list of permission warnings for the given extension id.
5590
5316
  * @since Chrome 15.
5591
5317
  * @param id The ID of an already installed extension.
5592
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5593
- * function(array of string permissionWarnings) {...};
5594
5318
  */
5595
- export function getPermissionWarningsById(id: string, callback?: (permissionWarnings: string[]) => void): void;
5319
+ export function getPermissionWarningsById(id: string, callback: (permissionWarnings: string[]) => void): void;
5596
5320
  /**
5597
5321
  * Returns information about the installed extension, app, or theme that has the given ID.
5598
5322
  * @since Chrome 9.
@@ -5604,10 +5328,8 @@ declare namespace chrome.management {
5604
5328
  * Returns information about the installed extension, app, or theme that has the given ID.
5605
5329
  * @since Chrome 9.
5606
5330
  * @param id The ID from an item of management.ExtensionInfo.
5607
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5608
- * function( ExtensionInfo result) {...};
5609
5331
  */
5610
- export function get(id: string, callback?: (result: ExtensionInfo) => void): void;
5332
+ export function get(id: string, callback: (result: ExtensionInfo) => void): void;
5611
5333
  /**
5612
5334
  * Returns a list of information about installed extensions and apps.
5613
5335
  * @return The `getAll` method provides its result via callback or returned as a `Promise` (MV3 only).
@@ -5615,10 +5337,8 @@ declare namespace chrome.management {
5615
5337
  export function getAll(): Promise<ExtensionInfo[]>;
5616
5338
  /**
5617
5339
  * Returns a list of information about installed extensions and apps.
5618
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5619
- * function(array of ExtensionInfo result) {...};
5620
5340
  */
5621
- export function getAll(callback?: (result: ExtensionInfo[]) => void): void;
5341
+ export function getAll(callback: (result: ExtensionInfo[]) => void): void;
5622
5342
  /**
5623
5343
  * Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.
5624
5344
  * @since Chrome 15.
@@ -5632,12 +5352,10 @@ declare namespace chrome.management {
5632
5352
  * Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.
5633
5353
  * @since Chrome 15.
5634
5354
  * @param manifestStr Extension manifest JSON string.
5635
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5636
- * function(array of string permissionWarnings) {...};
5637
5355
  */
5638
5356
  export function getPermissionWarningsByManifest(
5639
5357
  manifestStr: string,
5640
- callback?: (permissionwarnings: string[]) => void,
5358
+ callback: (permissionwarnings: string[]) => void,
5641
5359
  ): void;
5642
5360
  /**
5643
5361
  * Launches an application.
@@ -5648,10 +5366,8 @@ declare namespace chrome.management {
5648
5366
  /**
5649
5367
  * Launches an application.
5650
5368
  * @param id The extension id of the application.
5651
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5652
- * function() {...};
5653
5369
  */
5654
- export function launchApp(id: string, callback?: () => void): void;
5370
+ export function launchApp(id: string, callback: () => void): void;
5655
5371
  /**
5656
5372
  * Uninstalls a currently installed app or extension.
5657
5373
  * @since Chrome 21.
@@ -5663,10 +5379,9 @@ declare namespace chrome.management {
5663
5379
  * Uninstalls a currently installed app or extension.
5664
5380
  * @since Chrome 21.
5665
5381
  * @param id This should be the id from an item of management.ExtensionInfo.
5666
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5667
- * function() {...};
5668
5382
  */
5669
- export function uninstall(id: string, options?: UninstallOptions, callback?: () => void): void;
5383
+ export function uninstall(id: string, callback: () => void): void;
5384
+ export function uninstall(id: string, options: UninstallOptions, callback: () => void): void;
5670
5385
  /**
5671
5386
  * Uninstalls a currently installed app or extension.
5672
5387
  * @deprecated since Chrome 21. The options parameter was added to this function.
@@ -5678,10 +5393,8 @@ declare namespace chrome.management {
5678
5393
  * Uninstalls a currently installed app or extension.
5679
5394
  * @deprecated since Chrome 21. The options parameter was added to this function.
5680
5395
  * @param id This should be the id from an item of management.ExtensionInfo.
5681
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5682
- * function() {...};
5683
5396
  */
5684
- export function uninstall(id: string, callback?: () => void): void;
5397
+ export function uninstall(id: string, callback: () => void): void;
5685
5398
  /**
5686
5399
  * Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
5687
5400
  * @since Chrome 39.
@@ -5691,10 +5404,8 @@ declare namespace chrome.management {
5691
5404
  /**
5692
5405
  * Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
5693
5406
  * @since Chrome 39.
5694
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5695
- * function( ExtensionInfo result) {...};
5696
5407
  */
5697
- export function getSelf(callback?: (result: ExtensionInfo) => void): void;
5408
+ export function getSelf(callback: (result: ExtensionInfo) => void): void;
5698
5409
  /**
5699
5410
  * Uninstalls the calling extension.
5700
5411
  * Note: This function can be used without requesting the 'management' permission in the manifest.
@@ -5706,10 +5417,9 @@ declare namespace chrome.management {
5706
5417
  * Uninstalls the calling extension.
5707
5418
  * Note: This function can be used without requesting the 'management' permission in the manifest.
5708
5419
  * @since Chrome 26.
5709
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5710
- * function() {...};
5711
5420
  */
5712
- export function uninstallSelf(options?: UninstallOptions, callback?: () => void): void;
5421
+ export function uninstallSelf(callback: () => void): void;
5422
+ export function uninstallSelf(options: UninstallOptions, callback: () => void): void;
5713
5423
  /**
5714
5424
  * Uninstalls the calling extension.
5715
5425
  * Note: This function can be used without requesting the 'management' permission in the manifest.
@@ -5721,10 +5431,8 @@ declare namespace chrome.management {
5721
5431
  * Uninstalls the calling extension.
5722
5432
  * Note: This function can be used without requesting the 'management' permission in the manifest.
5723
5433
  * @since Chrome 26.
5724
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5725
- * function() {...};
5726
5434
  */
5727
- export function uninstallSelf(callback?: () => void): void;
5435
+ export function uninstallSelf(callback: () => void): void;
5728
5436
  /**
5729
5437
  * Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created.
5730
5438
  * @since Chrome 37.
@@ -5734,10 +5442,8 @@ declare namespace chrome.management {
5734
5442
  /**
5735
5443
  * Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created.
5736
5444
  * @since Chrome 37.
5737
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5738
- * function() {...};
5739
5445
  */
5740
- export function createAppShortcut(id: string, callback?: () => void): void;
5446
+ export function createAppShortcut(id: string, callback: () => void): void;
5741
5447
  /**
5742
5448
  * Set the launch type of an app.
5743
5449
  * @since Chrome 37.
@@ -5751,10 +5457,8 @@ declare namespace chrome.management {
5751
5457
  * @since Chrome 37.
5752
5458
  * @param id This should be the id from an app item of management.ExtensionInfo.
5753
5459
  * @param launchType The target launch type. Always check and make sure this launch type is in ExtensionInfo.availableLaunchTypes, because the available launch types vary on different platforms and configurations.
5754
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5755
- * function() {...};
5756
5460
  */
5757
- export function setLaunchType(id: string, launchType: string, callback?: () => void): void;
5461
+ export function setLaunchType(id: string, launchType: string, callback: () => void): void;
5758
5462
  /**
5759
5463
  * Generate an app for a URL. Returns the generated bookmark app.
5760
5464
  * @since Chrome 37.
@@ -5768,10 +5472,8 @@ declare namespace chrome.management {
5768
5472
  * @since Chrome 37.
5769
5473
  * @param url The URL of a web page. The scheme of the URL can only be "http" or "https".
5770
5474
  * @param title The title of the generated app.
5771
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
5772
- * function( ExtensionInfo result) {...};
5773
5475
  */
5774
- export function generateAppForLink(url: string, title: string, callback?: (result: ExtensionInfo) => void): void;
5476
+ export function generateAppForLink(url: string, title: string, callback: (result: ExtensionInfo) => void): void;
5775
5477
 
5776
5478
  /** Fired when an app or extension has been disabled. */
5777
5479
  export var onDisabled: ManagementDisabledEvent;
@@ -5814,8 +5516,6 @@ declare namespace chrome.networking.config {
5814
5516
  * Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list.
5815
5517
  * @param networks Network filters to set. Every NetworkInfo must either have the SSID or HexSSID set. Other fields will be ignored.
5816
5518
  * @param callback Called back when this operation is finished.
5817
- * The callback parameter should be a function that looks like this:
5818
- * function() {...};
5819
5519
  */
5820
5520
  export function setNetworkFilter(networks: NetworkInfo[], callback: () => void): void;
5821
5521
  /**
@@ -5827,8 +5527,6 @@ declare namespace chrome.networking.config {
5827
5527
  * rejected: The extension handled this network, tried to authenticate, however was rejected by the server.
5828
5528
  * failed: The extension handled this network, tried to authenticate, however failed due to an unspecified error.
5829
5529
  * @param callback Called back when this operation is finished.
5830
- * If you specify the callback parameter, it should be a function that looks like this:
5831
- * function() {...};
5832
5530
  */
5833
5531
  export function finishAuthentication(GUID: string, result: string, callback?: () => void): void;
5834
5532
 
@@ -5970,8 +5668,6 @@ declare namespace chrome.notifications {
5970
5668
  * @param options Contents of the notification.
5971
5669
  * @param callback Returns the notification id (either supplied or generated) that represents the created notification.
5972
5670
  * The callback is required before Chrome 42.
5973
- * If you specify the callback parameter, it should be a function that looks like this:
5974
- * function(string notificationId) {...};
5975
5671
  */
5976
5672
  export function create(
5977
5673
  notificationId: string,
@@ -5985,8 +5681,6 @@ declare namespace chrome.notifications {
5985
5681
  * @param options Contents of the notification.
5986
5682
  * @param callback Returns the notification id (either supplied or generated) that represents the created notification.
5987
5683
  * The callback is required before Chrome 42.
5988
- * If you specify the callback parameter, it should be a function that looks like this:
5989
- * function(string notificationId) {...};
5990
5684
  */
5991
5685
  export function create(options: NotificationOptions<true>, callback?: (notificationId: string) => void): void;
5992
5686
  /**
@@ -5995,8 +5689,6 @@ declare namespace chrome.notifications {
5995
5689
  * @param options Contents of the notification to update to.
5996
5690
  * @param callback Called to indicate whether a matching notification existed.
5997
5691
  * The callback is required before Chrome 42.
5998
- * If you specify the callback parameter, it should be a function that looks like this:
5999
- * function(boolean wasUpdated) {...};
6000
5692
  */
6001
5693
  export function update(
6002
5694
  notificationId: string,
@@ -6008,24 +5700,18 @@ declare namespace chrome.notifications {
6008
5700
  * @param notificationId The id of the notification to be cleared. This is returned by notifications.create method.
6009
5701
  * @param callback Called to indicate whether a matching notification existed.
6010
5702
  * The callback is required before Chrome 42.
6011
- * If you specify the callback parameter, it should be a function that looks like this:
6012
- * function(boolean wasCleared) {...};
6013
5703
  */
6014
5704
  export function clear(notificationId: string, callback?: (wasCleared: boolean) => void): void;
6015
5705
  /**
6016
5706
  * Retrieves all the notifications.
6017
5707
  * @since Chrome 29.
6018
5708
  * @param callback Returns the set of notification_ids currently in the system.
6019
- * The callback parameter should be a function that looks like this:
6020
- * function(object notifications) {...};
6021
5709
  */
6022
5710
  export function getAll(callback: (notifications: Object) => void): void;
6023
5711
  /**
6024
5712
  * Retrieves whether the user has enabled notifications from this app or extension.
6025
5713
  * @since Chrome 32.
6026
5714
  * @param callback Returns the current permission level.
6027
- * The callback parameter should be a function that looks like this:
6028
- * function( PermissionLevel level) {...};
6029
5715
  */
6030
5716
  export function getPermissionLevel(callback: (level: string) => void): void;
6031
5717
  }
@@ -6247,21 +5933,15 @@ declare namespace chrome.pageAction {
6247
5933
  /**
6248
5934
  * Gets the title of the page action.
6249
5935
  * @since Chrome 19.
6250
- * @param callback The callback parameter should be a function that looks like this:
6251
- * function(string result) {...};
6252
5936
  */
6253
5937
  export function getTitle(details: GetDetails, callback: (result: string) => void): void;
6254
5938
  /**
6255
5939
  * Gets the html document set as the popup for this page action.
6256
5940
  * @since Chrome 19.
6257
- * @param callback The callback parameter should be a function that looks like this:
6258
- * function(string result) {...};
6259
5941
  */
6260
5942
  export function getPopup(details: GetDetails, callback: (result: string) => void): void;
6261
5943
  /**
6262
5944
  * Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
6263
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
6264
- * function() {...};
6265
5945
  */
6266
5946
  export function setIcon(details: IconDetails, callback?: () => void): void;
6267
5947
 
@@ -6286,8 +5966,6 @@ declare namespace chrome.pageCapture {
6286
5966
  /**
6287
5967
  * Saves the content of the tab with given id as MHTML.
6288
5968
  * @param callback Called when the MHTML has been generated.
6289
- * The callback parameter should be a function that looks like this:
6290
- * function(binary mhtmlData) {...};
6291
5969
  * Parameter mhtmlData: The MHTML data as a Blob.
6292
5970
  */
6293
5971
  export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData?: Blob) => void): void;
@@ -6315,21 +5993,11 @@ declare namespace chrome.permissions {
6315
5993
  }
6316
5994
 
6317
5995
  export interface PermissionsRemovedEvent {
6318
- /**
6319
- * @param callback The callback parameter should be a function that looks like this:
6320
- * function( Permissions permissions) {...};
6321
- * Parameter permissions: The permissions that have been removed.
6322
- */
6323
- addListener(callback: (permissions: Permissions) => void): void;
5996
+ addListener(callback: (/** The permissions that have been removed*/ permissions: Permissions) => void): void;
6324
5997
  }
6325
5998
 
6326
5999
  export interface PermissionsAddedEvent {
6327
- /**
6328
- * @param callback The callback parameter should be a function that looks like this:
6329
- * function( Permissions permissions) {...};
6330
- * Parameter permissions: The newly acquired permissions.
6331
- */
6332
- addListener(callback: (permissions: Permissions) => void): void;
6000
+ addListener(callback: (/** The newly-acquired permissions*/ permissions: Permissions) => void): void;
6333
6001
  }
6334
6002
 
6335
6003
  /**
@@ -6339,8 +6007,6 @@ declare namespace chrome.permissions {
6339
6007
  export function contains(permissions: Permissions): Promise<boolean>;
6340
6008
  /**
6341
6009
  * Checks if the extension has the specified permissions.
6342
- * @param callback The callback parameter should be a function that looks like this:
6343
- * function(boolean result) {...};
6344
6010
  * Parameter result: True if the extension has the specified permissions.
6345
6011
  */
6346
6012
  export function contains(permissions: Permissions, callback: (result: boolean) => void): void;
@@ -6351,9 +6017,6 @@ declare namespace chrome.permissions {
6351
6017
  export function getAll(): Promise<Permissions>;
6352
6018
  /**
6353
6019
  * Gets the extension's current set of permissions.
6354
- * @param callback The callback parameter should be a function that looks like this:
6355
- * function( Permissions permissions) {...};
6356
- * Parameter permissions: The extension's active permissions.
6357
6020
  */
6358
6021
  export function getAll(callback: (permissions: Permissions) => void): void;
6359
6022
  /**
@@ -6363,8 +6026,6 @@ declare namespace chrome.permissions {
6363
6026
  export function request(permissions: Permissions): Promise<boolean>;
6364
6027
  /**
6365
6028
  * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
6366
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
6367
- * function(boolean granted) {...};
6368
6029
  * Parameter granted: True if the user granted the specified permissions.
6369
6030
  */
6370
6031
  export function request(permissions: Permissions, callback?: (granted: boolean) => void): void;
@@ -6375,8 +6036,6 @@ declare namespace chrome.permissions {
6375
6036
  export function remove(permissions: Permissions): Promise<boolean>;
6376
6037
  /**
6377
6038
  * Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
6378
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
6379
- * function(boolean removed) {...};
6380
6039
  * Parameter removed: True if the permissions were removed.
6381
6040
  */
6382
6041
  export function remove(permissions: Permissions, callback?: (removed: boolean) => void): void;
@@ -6442,8 +6101,6 @@ declare namespace chrome.platformKeys {
6442
6101
 
6443
6102
  /**
6444
6103
  * This function filters from a list of client certificates the ones that are known to the platform, match request and for which the extension has permission to access the certificate and its private key. If interactive is true, the user is presented a dialog where they can select from matching certificates and grant the extension access to the certificate. The selected/filtered client certificates will be passed to callback.
6445
- * @param callback The callback parameter should be a function that looks like this:
6446
- * function(array of Match matches) {...};
6447
6104
  * Parameter matches: The list of certificates that match the request, that the extension has permission for and, if interactive is true, that were selected by the user.
6448
6105
  */
6449
6106
  export function selectClientCertificates(
@@ -6455,8 +6112,6 @@ declare namespace chrome.platformKeys {
6455
6112
  * @param certificate The certificate of a Match returned by selectClientCertificates.
6456
6113
  * @param parameters Determines signature/hash algorithm parameters additionally to the parameters fixed by the key itself. The same parameters are accepted as by WebCrypto's importKey function, e.g. RsaHashedImportParams for a RSASSA-PKCS1-v1_5 key. For RSASSA-PKCS1-v1_5 keys, additionally the parameters { 'hash': { 'name': 'none' } } are supported. The sign function will then apply PKCS#1 v1.5 padding and but not hash the given data.
6457
6114
  * @param callback The public and private CryptoKey of a certificate which can only be used with platformKeys.subtleCrypto.
6458
- * The callback parameter should be a function that looks like this:
6459
- * function(object publicKey, object privateKey) {...};
6460
6115
  * Optional parameter privateKey: Might be null if this extension does not have access to it.
6461
6116
  */
6462
6117
  export function getKeyPair(
@@ -6470,8 +6125,6 @@ declare namespace chrome.platformKeys {
6470
6125
  * @param parameters Provides signature and hash algorithm parameters, in addition to those fixed by the key itself. The same parameters are accepted as by WebCrypto's importKey function, e.g. RsaHashedImportParams for a RSASSA-PKCS1-v1_5 key. For RSASSA-PKCS1-v1_5 keys, we need to also pass a "hash" parameter { "hash": { "name": string } }. The "hash" parameter represents the name of the hashing algorithm to be used in the digest operation before a sign. It is possible to pass "none" as the hash name, in which case the sign function will apply PKCS#1 v1.5 padding and but not hash the given data.
6471
6126
  * Currently, this function only supports the "RSASSA-PKCS1-v1_5" algorithm with one of the hashing algorithms "none", "SHA-1", "SHA-256", "SHA-384", and "SHA-512".
6472
6127
  * @param callback The public and private CryptoKey of a certificate which can only be used with platformKeys.subtleCrypto.
6473
- * The callback parameter should be a function that looks like this:
6474
- * function(object publicKey, object privateKey) {...};
6475
6128
  * Optional parameter privateKey: Might be null if this extension does not have access to it.
6476
6129
  * @since Chrome 85.
6477
6130
  */
@@ -6484,8 +6137,6 @@ declare namespace chrome.platformKeys {
6484
6137
  export function subtleCrypto(): SubtleCrypto;
6485
6138
  /**
6486
6139
  * Checks whether details.serverCertificateChain can be trusted for details.hostname according to the trust settings of the platform. Note: The actual behavior of the trust verification is not fully specified and might change in the future. The API implementation verifies certificate expiration, validates the certification path and checks trust by a known CA. The implementation is supposed to respect the EKU serverAuth and to support subject alternative names.
6487
- * @param callback The callback parameter should be a function that looks like this:
6488
- * function(object result) {...};
6489
6140
  */
6490
6141
  export function verifyTLSServerCertificate(
6491
6142
  details: ServerCertificateVerificationDetails,
@@ -6732,8 +6383,6 @@ declare namespace chrome.search {
6732
6383
  /**
6733
6384
  * Used to query the default search provider. In case of an error, runtime.lastError will be set.
6734
6385
  * @param options search configuration options.
6735
- * @param callback The callback parameter should be a function that looks like this:
6736
- * function() => {...}
6737
6386
  */
6738
6387
  export function query(options: QueryInfo, callback: () => void): void;
6739
6388
 
@@ -6844,8 +6493,6 @@ declare namespace chrome.serial {
6844
6493
  * @since Chrome 33.
6845
6494
  * @description Returns information about available serial devices on the system. The list is regenerated each time this method is called.
6846
6495
  * @param callback Called with the list of DeviceInfo objects.
6847
- * The callback parameter should be a function that looks like this:
6848
- * function(array of object ports) {...};
6849
6496
  */
6850
6497
  export function getDevices(callback: (ports: DeviceInfo[]) => void): void;
6851
6498
 
@@ -6855,8 +6502,6 @@ declare namespace chrome.serial {
6855
6502
  * @param path The system path of the serial port to open.
6856
6503
  * @param options Port configuration options.
6857
6504
  * @param callback Called when the connection has been opened.
6858
- * The callback parameter should be a function that looks like this:
6859
- * function( ConnectionInfo connectionInfo) {...};
6860
6505
  */
6861
6506
  export function connect(
6862
6507
  path: string,
@@ -6870,8 +6515,6 @@ declare namespace chrome.serial {
6870
6515
  * @param connectionId The id of the opened connection.
6871
6516
  * @param options Port configuration options.
6872
6517
  * @param callback Called when the configuation has completed.
6873
- * The callback parameter should be a function that looks like this:
6874
- * function(boolean result) {...};
6875
6518
  */
6876
6519
  export function update(connectionId: number, options: ConnectionOptions, callback: (result: boolean) => void): void;
6877
6520
 
@@ -6880,8 +6523,6 @@ declare namespace chrome.serial {
6880
6523
  * @description Disconnects from a serial port.
6881
6524
  * @param connectionId The id of the opened connection.
6882
6525
  * @param callback Called when the connection has been closed.
6883
- * The callback parameter should be a function that looks like this:
6884
- * function(boolean result) {...};
6885
6526
  */
6886
6527
  export function disconnect(connectionId: number, callback: (result: boolean) => void): void;
6887
6528
 
@@ -6891,8 +6532,6 @@ declare namespace chrome.serial {
6891
6532
  * @param connectionId The id of the opened connection.
6892
6533
  * @param paused Flag to indicate whether to pause or unpause.
6893
6534
  * @param callback Called when the connection has been successfully paused or unpaused.
6894
- * The callback parameter should be a function that looks like this:
6895
- * function() {...};
6896
6535
  */
6897
6536
  export function setPaused(connectionId: number, paused: boolean, callback: () => void): void;
6898
6537
 
@@ -6900,8 +6539,6 @@ declare namespace chrome.serial {
6900
6539
  * @since Chrome 33.
6901
6540
  * @description Retrieves the state of a given connection.
6902
6541
  * @param callback Called with connection state information when available.
6903
- * The callback parameter should be a function that looks like this:
6904
- * function( ConnectionInfo connectionInfo) {...};
6905
6542
  */
6906
6543
  export function getInfo(callback: (connectionInfos: ConnectionInfo[]) => void): void;
6907
6544
 
@@ -6909,8 +6546,6 @@ declare namespace chrome.serial {
6909
6546
  * @since Chrome 33.
6910
6547
  * @description Retrieves the list of currently opened serial port connections owned by the application.
6911
6548
  * @param callback Called with the list of connections when available.
6912
- * The callback parameter should be a function that looks like this:
6913
- * function(array of ConnectionInfo connectionInfos) {...};
6914
6549
  */
6915
6550
  export function getConnections(callback: (connectionInfos: ConnectionInfo[]) => void): void;
6916
6551
 
@@ -6920,8 +6555,6 @@ declare namespace chrome.serial {
6920
6555
  * @param connectionId The id of the connection.
6921
6556
  * @param data The data to send.
6922
6557
  * @param callback Called when the operation has completed.
6923
- * The callback parameter should be a function that looks like this:
6924
- * function(object sendInfo) {...};
6925
6558
  */
6926
6559
  export function send(connectionId: number, data: ArrayBuffer, callback: (sendInfo: object) => void): void;
6927
6560
 
@@ -6929,8 +6562,6 @@ declare namespace chrome.serial {
6929
6562
  * @description Flushes all bytes in the given connection's input and output buffers.
6930
6563
  * @param connectionId The id of the connection.
6931
6564
  * @param callback
6932
- * The callback parameter should be a function that looks like this:
6933
- * function(boolean result) {...};
6934
6565
  */
6935
6566
  export function flush(connectionId: number, callback: (result: boolean) => void): void;
6936
6567
 
@@ -6938,8 +6569,6 @@ declare namespace chrome.serial {
6938
6569
  * @description Retrieves the state of control signals on a given connection.
6939
6570
  * @param connectionId The id of the connection.
6940
6571
  * @param callback Called when the control signals are available.
6941
- * The callback parameter should be a function that looks like this:
6942
- * function(object signals) {...};
6943
6572
  */
6944
6573
  export function getControlSignals(connectionId: number, callback: (signals: object) => void): void;
6945
6574
 
@@ -6950,8 +6579,6 @@ declare namespace chrome.serial {
6950
6579
  * boolean: (optional) dtr - DTR (Data Terminal Ready).
6951
6580
  * boolean: (optional) rts - RTS (Request To Send).
6952
6581
  * @param callback Called once the control signals have been set.
6953
- * The callback parameter should be a function that looks like this:
6954
- * function(boolean result) {...};
6955
6582
  */
6956
6583
  export function setControlSignals(connectionId: number, signals: object, callback: (result: boolean) => void): void;
6957
6584
 
@@ -6960,8 +6587,6 @@ declare namespace chrome.serial {
6960
6587
  * @description Suspends character transmission on a given connection and places the transmission line in a break state until the clearBreak is called.
6961
6588
  * @param connectionId The id of the connection.
6962
6589
  * @param callback
6963
- * The callback parameter should be a function that looks like this:
6964
- * function(boolean result) {...};
6965
6590
  */
6966
6591
  export function setBreak(connectionId: number, callback: (result: boolean) => void): void;
6967
6592
 
@@ -6970,8 +6595,6 @@ declare namespace chrome.serial {
6970
6595
  * @description Restore character transmission on a given connection and place the transmission line in a nonbreak state.
6971
6596
  * @param connectionId The id of the connection.
6972
6597
  * @param callback
6973
- * The callback parameter should be a function that looks like this:
6974
- * function(boolean result) {...};
6975
6598
  */
6976
6599
  export function clearBreak(connectionId: number, callback: (result: boolean) => void): void;
6977
6600
  }
@@ -6988,8 +6611,6 @@ declare namespace chrome.serial.onReceive {
6988
6611
  * @since Chrome 33.
6989
6612
  * @description Event raised when data has been read from the connection.
6990
6613
  * @param callback
6991
- * The callback parameter should be a function that looks like this:
6992
- * function(OnReceiveInfo info) {...};
6993
6614
  */
6994
6615
  export function addListener(callback: (info: OnReceiveInfo) => void): void;
6995
6616
  }
@@ -7028,8 +6649,6 @@ declare namespace chrome.serial.onReceiveError {
7028
6649
  * @description Event raised when an error occurred while the runtime was waiting for data on the serial port.
7029
6650
  * Once this event is raised, the connection may be set to paused. A "timeout" error does not pause the connection.
7030
6651
  * @param callback
7031
- * The callback parameter should be a function that looks like this:
7032
- * function(OnReceiveErrorInfo info) {...};
7033
6652
  */
7034
6653
  export function addListener(callback: (info: OnReceiveErrorInfo) => void): void;
7035
6654
  }
@@ -7837,7 +7456,7 @@ declare namespace chrome.scripting {
7837
7456
  * @param callback
7838
7457
  * Invoked upon completion of the injection. The resulting array contains the result of execution for each frame where the injection succeeded.
7839
7458
  */
7840
- export function executeScript<Args extends any[], Result>(injection: ScriptInjection<Args, Result>, callback?: (results: InjectionResult<Awaited<Result>>[]) => void): void;
7459
+ export function executeScript<Args extends any[], Result>(injection: ScriptInjection<Args, Result>, callback: (results: InjectionResult<Awaited<Result>>[]) => void): void;
7841
7460
 
7842
7461
  /**
7843
7462
  * Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
@@ -7854,7 +7473,7 @@ declare namespace chrome.scripting {
7854
7473
  * @param callback
7855
7474
  * Invoked upon completion of the injection.
7856
7475
  */
7857
- export function insertCSS(injection: CSSInjection, callback?: () => void): void;
7476
+ export function insertCSS(injection: CSSInjection, callback: () => void): void;
7858
7477
 
7859
7478
  /**
7860
7479
  * Removes a CSS stylesheet that was previously inserted by this extension from a target context.
@@ -7877,7 +7496,7 @@ declare namespace chrome.scripting {
7877
7496
  * Invoked upon completion of the removal.
7878
7497
  * @since Chrome 90
7879
7498
  */
7880
- export function removeCSS(injection: CSSInjection, callback?: () => void): void;
7499
+ export function removeCSS(injection: CSSInjection, callback: () => void): void;
7881
7500
 
7882
7501
  /**
7883
7502
  * Registers one or more content scripts.
@@ -7890,7 +7509,7 @@ declare namespace chrome.scripting {
7890
7509
  * @param scripts
7891
7510
  * @param callback
7892
7511
  */
7893
- export function registerContentScripts(scripts: RegisteredContentScript[], callback?: () => void): void;
7512
+ export function registerContentScripts(scripts: RegisteredContentScript[], callback: () => void): void;
7894
7513
 
7895
7514
  /**
7896
7515
  * Unregister one or more content scripts.
@@ -7904,7 +7523,8 @@ declare namespace chrome.scripting {
7904
7523
  * @param filter
7905
7524
  * @param callback
7906
7525
  */
7907
- export function unregisterContentScripts(filter?: ContentScriptFilter, callback?: () => void): void;
7526
+ export function unregisterContentScripts(callback: () => void): void;
7527
+ export function unregisterContentScripts(filter: ContentScriptFilter, callback: () => void): void;
7908
7528
 
7909
7529
  /**
7910
7530
  * Returns all the content scripts registered with scripting.registerContentScripts()
@@ -7919,7 +7539,8 @@ declare namespace chrome.scripting {
7919
7539
  * @param filter
7920
7540
  * @param callback
7921
7541
  */
7922
- export function getRegisteredContentScripts(filter?: ContentScriptFilter, callback?: (scripts: RegisteredContentScript[]) => void): void;
7542
+ export function getRegisteredContentScripts(callback: (scripts: RegisteredContentScript[]) => void): void;
7543
+ export function getRegisteredContentScripts(filter: ContentScriptFilter, callback: (scripts: RegisteredContentScript[]) => void): void;
7923
7544
  }
7924
7545
 
7925
7546
  ////////////////////
@@ -8070,7 +7691,7 @@ declare namespace chrome.storage {
8070
7691
  * @param callback Optional.
8071
7692
  * Callback on success, or on failure (in which case runtime.lastError will be set).
8072
7693
  */
8073
- clear(callback?: () => void): void;
7694
+ clear(callback: () => void): void;
8074
7695
  /**
8075
7696
  * Sets multiple items.
8076
7697
  * @param items An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
@@ -8086,7 +7707,7 @@ declare namespace chrome.storage {
8086
7707
  * @param callback Optional.
8087
7708
  * Callback on success, or on failure (in which case runtime.lastError will be set).
8088
7709
  */
8089
- set(items: { [key: string]: any }, callback?: () => void): void;
7710
+ set(items: { [key: string]: any }, callback: () => void): void;
8090
7711
  /**
8091
7712
  * Removes one or more items from storage.
8092
7713
  * @param keys A single key or a list of keys for items to remove.
@@ -8101,7 +7722,7 @@ declare namespace chrome.storage {
8101
7722
  * @param callback Optional.
8102
7723
  * Callback on success, or on failure (in which case runtime.lastError will be set).
8103
7724
  */
8104
- remove(keys: string | string[], callback?: () => void): void;
7725
+ remove(keys: string | string[], callback: () => void): void;
8105
7726
  /**
8106
7727
  * Gets the entire contents of storage.
8107
7728
  * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
@@ -8844,7 +8465,7 @@ declare namespace chrome.system.display {
8844
8465
  * @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|.
8845
8466
  * @param [callback] Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried.
8846
8467
  */
8847
- export function setDisplayProperties(id: string, info: DisplayPropertiesInfo, callback?: () => void): void;
8468
+ export function setDisplayProperties(id: string, info: DisplayPropertiesInfo, callback: () => void): void;
8848
8469
 
8849
8470
  /**
8850
8471
  * requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
@@ -8870,7 +8491,7 @@ declare namespace chrome.system.display {
8870
8491
  * @param layouts The layout information, required for all displays except the primary display.
8871
8492
  * @param callback Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried.
8872
8493
  */
8873
- export function setDisplayLayout(layouts: DisplayLayout[], callback?: () => void): void;
8494
+ export function setDisplayLayout(layouts: DisplayLayout[], callback: () => void): void;
8874
8495
 
8875
8496
  /**
8876
8497
  * requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
@@ -9689,7 +9310,7 @@ declare namespace chrome.tabs {
9689
9310
  * @param callback Optional.
9690
9311
  * Parameter tab: Details about the created tab. Will contain the ID of the new tab.
9691
9312
  */
9692
- export function create(createProperties: CreateProperties, callback?: (tab: Tab) => void): void;
9313
+ export function create(createProperties: CreateProperties, callback: (tab: Tab) => void): void;
9693
9314
  /**
9694
9315
  * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
9695
9316
  * @param tabId The tab to move.
@@ -9702,7 +9323,7 @@ declare namespace chrome.tabs {
9702
9323
  * @param callback Optional.
9703
9324
  * Parameter tab: Details about the moved tab.
9704
9325
  */
9705
- export function move(tabId: number, moveProperties: MoveProperties, callback?: (tab: Tab) => void): void;
9326
+ export function move(tabId: number, moveProperties: MoveProperties, callback: (tab: Tab) => void): void;
9706
9327
  /**
9707
9328
  * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
9708
9329
  * @param tabIds The tabs to move.
@@ -9715,7 +9336,7 @@ declare namespace chrome.tabs {
9715
9336
  * @param callback Optional.
9716
9337
  * Parameter tabs: Details about the moved tabs.
9717
9338
  */
9718
- export function move(tabIds: number[], moveProperties: MoveProperties, callback?: (tabs: Tab[]) => void): void;
9339
+ export function move(tabIds: number[], moveProperties: MoveProperties, callback: (tabs: Tab[]) => void): void;
9719
9340
  /**
9720
9341
  * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
9721
9342
  * @return The `update` method provides its result via callback or returned as a `Promise` (MV3 only). Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
@@ -9726,7 +9347,7 @@ declare namespace chrome.tabs {
9726
9347
  * @param callback Optional.
9727
9348
  * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
9728
9349
  */
9729
- export function update(updateProperties: UpdateProperties, callback?: (tab?: Tab) => void): void;
9350
+ export function update(updateProperties: UpdateProperties, callback: (tab?: Tab) => void): void;
9730
9351
  /**
9731
9352
  * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
9732
9353
  * @param tabId Defaults to the selected tab of the current window.
@@ -9739,7 +9360,7 @@ declare namespace chrome.tabs {
9739
9360
  * @param callback Optional.
9740
9361
  * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
9741
9362
  */
9742
- export function update(tabId: number, updateProperties: UpdateProperties, callback?: (tab?: Tab) => void): void;
9363
+ export function update(tabId: number, updateProperties: UpdateProperties, callback: (tab?: Tab) => void): void;
9743
9364
  /**
9744
9365
  * Closes a tab.
9745
9366
  * @param tabId The tab to close.
@@ -9750,7 +9371,7 @@ declare namespace chrome.tabs {
9750
9371
  * Closes a tab.
9751
9372
  * @param tabId The tab to close.
9752
9373
  */
9753
- export function remove(tabId: number, callback?: Function): void;
9374
+ export function remove(tabId: number, callback: Function): void;
9754
9375
  /**
9755
9376
  * Closes several tabs.
9756
9377
  * @param tabIds The list of tabs to close.
@@ -9761,7 +9382,7 @@ declare namespace chrome.tabs {
9761
9382
  * Closes several tabs.
9762
9383
  * @param tabIds The list of tabs to close.
9763
9384
  */
9764
- export function remove(tabIds: number[], callback?: Function): void;
9385
+ export function remove(tabIds: number[], callback: Function): void;
9765
9386
  /**
9766
9387
  * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
9767
9388
  * @param callback
@@ -9844,7 +9465,7 @@ declare namespace chrome.tabs {
9844
9465
  * Reload the selected tab of the current window.
9845
9466
  * @since Chrome 16.
9846
9467
  */
9847
- export function reload(reloadProperties: ReloadProperties, callback?: () => void): void;
9468
+ export function reload(reloadProperties: ReloadProperties, callback: () => void): void;
9848
9469
  /**
9849
9470
  * Reload the selected tab of the current window.
9850
9471
  * @since Chrome 16.
@@ -9855,7 +9476,7 @@ declare namespace chrome.tabs {
9855
9476
  * Reload the selected tab of the current window.
9856
9477
  * @since Chrome 16.
9857
9478
  */
9858
- export function reload(callback?: () => void): void;
9479
+ export function reload(callback: () => void): void;
9859
9480
  /**
9860
9481
  * Duplicates a tab.
9861
9482
  * @since Chrome 23.
@@ -9870,7 +9491,7 @@ declare namespace chrome.tabs {
9870
9491
  * @param callback Optional.
9871
9492
  * Optional parameter tab: Details about the duplicated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
9872
9493
  */
9873
- export function duplicate(tabId: number, callback?: (tab?: Tab) => void): void;
9494
+ export function duplicate(tabId: number, callback: (tab?: Tab) => void): void;
9874
9495
  /**
9875
9496
  * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
9876
9497
  * @since Chrome 20.
@@ -9922,7 +9543,7 @@ declare namespace chrome.tabs {
9922
9543
  * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
9923
9544
  * @param callback Optional. Called when all the CSS has been inserted.
9924
9545
  */
9925
- export function insertCSS(details: InjectDetails, callback?: Function): void;
9546
+ export function insertCSS(details: InjectDetails, callback: Function): void;
9926
9547
  /**
9927
9548
  * Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
9928
9549
  * @param tabId Optional. The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
@@ -9936,7 +9557,7 @@ declare namespace chrome.tabs {
9936
9557
  * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
9937
9558
  * @param callback Optional. Called when all the CSS has been inserted.
9938
9559
  */
9939
- export function insertCSS(tabId: number, details: InjectDetails, callback?: Function): void;
9560
+ export function insertCSS(tabId: number, details: InjectDetails, callback: Function): void;
9940
9561
  /**
9941
9562
  * Highlights the given tabs.
9942
9563
  * @since Chrome 16.
@@ -9949,7 +9570,7 @@ declare namespace chrome.tabs {
9949
9570
  * @param callback Optional.
9950
9571
  * Parameter window: Contains details about the window whose tabs were highlighted.
9951
9572
  */
9952
- export function highlight(highlightInfo: HighlightInfo, callback?: (window: chrome.windows.Window) => void): void;
9573
+ export function highlight(highlightInfo: HighlightInfo, callback: (window: chrome.windows.Window) => void): void;
9953
9574
  /**
9954
9575
  * Gets all tabs that have the specified properties, or all tabs if no properties are specified.
9955
9576
  * @since Chrome 16.
@@ -9998,7 +9619,7 @@ declare namespace chrome.tabs {
9998
9619
  * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
9999
9620
  * @param callback Optional. Called after the zoom factor has been changed.
10000
9621
  */
10001
- export function setZoom(zoomFactor: number, callback?: () => void): void;
9622
+ export function setZoom(zoomFactor: number, callback: () => void): void;
10002
9623
  /**
10003
9624
  * Zooms a specified tab.
10004
9625
  * @since Chrome 42.
@@ -10014,7 +9635,7 @@ declare namespace chrome.tabs {
10014
9635
  * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
10015
9636
  * @param callback Optional. Called after the zoom factor has been changed.
10016
9637
  */
10017
- export function setZoom(tabId: number, zoomFactor: number, callback?: () => void): void;
9638
+ export function setZoom(tabId: number, zoomFactor: number, callback: () => void): void;
10018
9639
  /**
10019
9640
  * Gets the current zoom factor of a specified tab.
10020
9641
  * @since Chrome 42.
@@ -10056,7 +9677,7 @@ declare namespace chrome.tabs {
10056
9677
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
10057
9678
  * @param callback Optional. Called after the zoom settings have been changed.
10058
9679
  */
10059
- export function setZoomSettings(zoomSettings: ZoomSettings, callback?: () => void): void;
9680
+ export function setZoomSettings(zoomSettings: ZoomSettings, callback: () => void): void;
10060
9681
  /**
10061
9682
  * 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.
10062
9683
  * @since Chrome 42.
@@ -10072,7 +9693,7 @@ declare namespace chrome.tabs {
10072
9693
  * @param zoomSettings Defines how zoom changes are handled and at what scope.
10073
9694
  * @param callback Optional. Called after the zoom settings have been changed.
10074
9695
  */
10075
- export function setZoomSettings(tabId: number, zoomSettings: ZoomSettings, callback?: () => void): void;
9696
+ export function setZoomSettings(tabId: number, zoomSettings: ZoomSettings, callback: () => void): void;
10076
9697
  /**
10077
9698
  * Gets the current zoom settings of a specified tab.
10078
9699
  * @since Chrome 42.
@@ -10114,7 +9735,8 @@ declare namespace chrome.tabs {
10114
9735
  * @param tabId Optional. The ID of the tab to be discarded. If specified, the tab will be discarded unless it's active or already discarded. If omitted, the browser will discard the least important tab. This can fail if no discardable tabs exist.
10115
9736
  * @param callback Called after the operation is completed.
10116
9737
  */
10117
- export function discard(tabId?: number, callback?: (tab: Tab) => void): void;
9738
+ export function discard(callback: (tab: Tab) => void): void;
9739
+ export function discard(tabId: number, callback: (tab: Tab) => void): void;
10118
9740
  /**
10119
9741
  * Go foward to the next page, if one is available.
10120
9742
  * @since Chrome 72.
@@ -10126,7 +9748,7 @@ declare namespace chrome.tabs {
10126
9748
  * @since Chrome 72.
10127
9749
  * @param callback Optional. Called after the operation is completed.
10128
9750
  */
10129
- export function goForward(callback?: () => void): void;
9751
+ export function goForward(callback: () => void): void;
10130
9752
  /**
10131
9753
  * Go foward to the next page, if one is available.
10132
9754
  * @since Chrome 72.
@@ -10140,7 +9762,7 @@ declare namespace chrome.tabs {
10140
9762
  * @param tabId Optional. The ID of the tab to navigate forward; defaults to the selected tab of the current window.
10141
9763
  * @param callback Optional. Called after the operation is completed.
10142
9764
  */
10143
- export function goForward(tabId: number, callback?: () => void): void;
9765
+ export function goForward(tabId: number, callback: () => void): void;
10144
9766
  /**
10145
9767
  * Go back to the previous page, if one is available.
10146
9768
  * @since Chrome 72.
@@ -10152,7 +9774,7 @@ declare namespace chrome.tabs {
10152
9774
  * @since Chrome 72.
10153
9775
  * @param callback Optional. Called after the operation is completed.
10154
9776
  */
10155
- export function goBack(callback?: () => void): void;
9777
+ export function goBack(callback: () => void): void;
10156
9778
  /**
10157
9779
  * Go back to the previous page, if one is available.
10158
9780
  * @since Chrome 72.
@@ -10166,7 +9788,7 @@ declare namespace chrome.tabs {
10166
9788
  * @param tabId Optional. The ID of the tab to navigate back; defaults to the selected tab of the current window.
10167
9789
  * @param callback Optional. Called after the operation is completed.
10168
9790
  */
10169
- export function goBack(tabId: number, callback?: () => void): void;
9791
+ export function goBack(tabId: number, callback: () => void): void;
10170
9792
  /**
10171
9793
  * Adds one or more tabs to a specified group, or if no group is specified, adds the given tabs to a newly created group.
10172
9794
  * @since Chrome 88
@@ -10187,7 +9809,7 @@ declare namespace chrome.tabs {
10187
9809
  * @param options Configurations object
10188
9810
  * @param callback Optional.
10189
9811
  */
10190
- export function group(options: GroupOptions, callback?: (groupId: number) => void): void
9812
+ export function group(options: GroupOptions, callback: (groupId: number) => void): void
10191
9813
  /**
10192
9814
  * Removes one or more tabs from their respective groups. If any groups become empty, they are deleted
10193
9815
  * @since Chrome 88
@@ -10201,7 +9823,7 @@ declare namespace chrome.tabs {
10201
9823
  * @param tabIds The tabs to ungroup.
10202
9824
  * @param callback Optional. Called after the operation is completed.
10203
9825
  */
10204
- export function ungroup(tabIds: number | number[], callback?: () => void): void
9826
+ export function ungroup(tabIds: number | number[], callback: () => void): void
10205
9827
  /**
10206
9828
  * Fired when the highlighted or selected tabs in a window changes.
10207
9829
  * @since Chrome 18.
@@ -10342,7 +9964,7 @@ declare namespace chrome.tabGroups {
10342
9964
  * @param moveProperties Information on how to move the group.
10343
9965
  * @param callback Optional.
10344
9966
  */
10345
- export function move(groupId: number, moveProperties: MoveProperties, callback?: (group: TabGroup) => void): void;
9967
+ export function move(groupId: number, moveProperties: MoveProperties, callback: (group: TabGroup) => void): void;
10346
9968
 
10347
9969
  /**
10348
9970
  * Gets all groups that have the specified properties, or all groups if no properties are specified.
@@ -10372,7 +9994,7 @@ declare namespace chrome.tabGroups {
10372
9994
  * @param updateProperties Information on how to update the group.
10373
9995
  * @param callback Optional.
10374
9996
  */
10375
- export function update(groupId: number, updateProperties: UpdateProperties, callback?: (group: TabGroup) => void): void;
9997
+ export function update(groupId: number, updateProperties: UpdateProperties, callback: (group: TabGroup) => void): void;
10376
9998
 
10377
9999
  export interface TabGroupCreatedEvent extends chrome.events.Event<(group: TabGroup) => void> { }
10378
10000
  export interface TabGroupMovedEvent extends chrome.events.Event<(group: TabGroup) => void> { }
@@ -11642,7 +11264,7 @@ declare namespace chrome.windows {
11642
11264
  * @param callback
11643
11265
  * Optional parameter window: Contains details about the created window.
11644
11266
  */
11645
- export function create(callback?: (window?: chrome.windows.Window) => void): void;
11267
+ export function create(callback: (window?: chrome.windows.Window) => void): void;
11646
11268
  /**
11647
11269
  * Creates (opens) a new browser with any optional sizing, position or default URL provided.
11648
11270
  * @param CreateData
@@ -11655,7 +11277,7 @@ declare namespace chrome.windows {
11655
11277
  * @param callback
11656
11278
  * Optional parameter window: Contains details about the created window.
11657
11279
  */
11658
- export function create(createData: CreateData, callback?: (window?: chrome.windows.Window) => void): void;
11280
+ export function create(createData: CreateData, callback: (window?: chrome.windows.Window) => void): void;
11659
11281
  /**
11660
11282
  * Gets all windows.
11661
11283
  */
@@ -11688,7 +11310,7 @@ declare namespace chrome.windows {
11688
11310
  export function update(
11689
11311
  windowId: number,
11690
11312
  updateInfo: UpdateInfo,
11691
- callback?: (window: chrome.windows.Window) => void,
11313
+ callback: (window: chrome.windows.Window) => void,
11692
11314
  ): void;
11693
11315
  /**
11694
11316
  * Removes (closes) a window, and all the tabs inside it
@@ -11696,7 +11318,7 @@ declare namespace chrome.windows {
11696
11318
  */
11697
11319
  export function remove(windowId: number): Promise<void>;
11698
11320
  /** Removes (closes) a window, and all the tabs inside it. */
11699
- export function remove(windowId: number, callback?: Function): void;
11321
+ export function remove(windowId: number, callback: Function): void;
11700
11322
  /**
11701
11323
  * Gets the window that was most recently focused — typically the window 'on top'.
11702
11324
  */