@types/chrome 0.0.319 → 0.0.321

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (https://developer.chrome.com/
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sun, 04 May 2025 20:34:17 GMT
11
+ * Last updated: Fri, 09 May 2025 14:02:26 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
 
14
14
  # Credits
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-wrapper-object-types */
1
2
  declare namespace chrome {
2
3
  ////////////////////
3
4
  // Cast
@@ -110,7 +111,7 @@ declare namespace chrome {
110
111
  */
111
112
  export function initialize(
112
113
  apiConfig: chrome.cast.ApiConfig,
113
- successCallback: Function,
114
+ successCallback: () => void,
114
115
  errorCallback: (error: chrome.cast.Error) => void,
115
116
  ): void;
116
117
 
@@ -158,7 +159,7 @@ declare namespace chrome {
158
159
  */
159
160
  export function setCustomReceivers(
160
161
  receivers: chrome.cast.Receiver[],
161
- successCallback: Function,
162
+ successCallback: () => void,
162
163
  errorCallback: (error: chrome.cast.Error) => void,
163
164
  ): void;
164
165
 
@@ -169,7 +170,7 @@ declare namespace chrome {
169
170
  */
170
171
  export function setReceiverDisplayStatus(
171
172
  receiver: chrome.cast.Receiver,
172
- successCallback: Function,
173
+ successCallback: () => void,
173
174
  errorCallback: (error: chrome.cast.Error) => void,
174
175
  ): void;
175
176
 
@@ -292,7 +293,7 @@ declare namespace chrome {
292
293
  */
293
294
  setReceiverVolumeLevel(
294
295
  newLevel: number,
295
- successCallback: Function,
296
+ successCallback: () => void,
296
297
  errorCallback: (error: chrome.cast.Error) => void,
297
298
  ): void;
298
299
 
@@ -303,7 +304,7 @@ declare namespace chrome {
303
304
  */
304
305
  setReceiverMuted(
305
306
  muted: boolean,
306
- successCallback: Function,
307
+ successCallback: () => void,
307
308
  errorCallback: (error: chrome.cast.Error) => void,
308
309
  ): void;
309
310
 
@@ -311,13 +312,13 @@ declare namespace chrome {
311
312
  * @param successCallback
312
313
  * @param errorCallback
313
314
  */
314
- leave(successCallback: Function, errorCallback: (error: chrome.cast.Error) => void): void;
315
+ leave(successCallback: () => void, errorCallback: (error: chrome.cast.Error) => void): void;
315
316
 
316
317
  /**
317
318
  * @param successCallback
318
319
  * @param errorCallback
319
320
  */
320
- stop(successCallback: Function, errorCallback: (error: chrome.cast.Error) => void): void;
321
+ stop(successCallback: () => void, errorCallback: (error: chrome.cast.Error) => void): void;
321
322
 
322
323
  /**
323
324
  * @param namespace
@@ -328,7 +329,7 @@ declare namespace chrome {
328
329
  sendMessage(
329
330
  namespace: string,
330
331
  message: string | object,
331
- successCallback: Function,
332
+ successCallback: () => void,
332
333
  errorCallback: (error: chrome.cast.Error) => void,
333
334
  ): void;
334
335
 
@@ -885,7 +886,7 @@ declare namespace chrome {
885
886
  */
886
887
  getStatus(
887
888
  getStatusRequest: chrome.cast.media.GetStatusRequest,
888
- successCallback: Function,
889
+ successCallback: () => void,
889
890
  errorCallback: (error: chrome.cast.Error) => void,
890
891
  ): void;
891
892
 
@@ -896,7 +897,7 @@ declare namespace chrome {
896
897
  */
897
898
  play(
898
899
  playRequest: chrome.cast.media.PlayRequest,
899
- successCallback: Function,
900
+ successCallback: () => void,
900
901
  errorCallback: (error: chrome.cast.Error) => void,
901
902
  ): void;
902
903
 
@@ -907,7 +908,7 @@ declare namespace chrome {
907
908
  */
908
909
  pause(
909
910
  pauseRequest: chrome.cast.media.PauseRequest,
910
- successCallback: Function,
911
+ successCallback: () => void,
911
912
  errorCallback: (error: chrome.cast.Error) => void,
912
913
  ): void;
913
914
 
@@ -918,7 +919,7 @@ declare namespace chrome {
918
919
  */
919
920
  seek(
920
921
  seekRequest: chrome.cast.media.SeekRequest,
921
- successCallback: Function,
922
+ successCallback: () => void,
922
923
  errorCallback: (error: chrome.cast.Error) => void,
923
924
  ): void;
924
925
 
@@ -929,7 +930,7 @@ declare namespace chrome {
929
930
  */
930
931
  stop(
931
932
  stopRequest: chrome.cast.media.StopRequest,
932
- successCallback: Function,
933
+ successCallback: () => void,
933
934
  errorCallback: (error: chrome.cast.Error) => void,
934
935
  ): void;
935
936
 
@@ -940,7 +941,7 @@ declare namespace chrome {
940
941
  */
941
942
  setVolume(
942
943
  volumeRequest: chrome.cast.media.VolumeRequest,
943
- successCallback: Function,
944
+ successCallback: () => void,
944
945
  errorCallback: (error: chrome.cast.Error) => void,
945
946
  ): void;
946
947
 
@@ -951,7 +952,7 @@ declare namespace chrome {
951
952
  */
952
953
  editTracksInfo(
953
954
  editTracksInfoRequest: chrome.cast.media.EditTracksInfoRequest,
954
- successCallback: Function,
955
+ successCallback: () => void,
955
956
  errorCallback: (error: chrome.cast.Error) => void,
956
957
  ): void;
957
958
 
@@ -984,7 +985,7 @@ declare namespace chrome {
984
985
  */
985
986
  queueAppendItem(
986
987
  item: chrome.cast.media.QueueItem,
987
- successCallback: Function,
988
+ successCallback: () => void,
988
989
  errorCallback: (error: chrome.cast.Error) => void,
989
990
  ): void;
990
991
 
@@ -995,7 +996,7 @@ declare namespace chrome {
995
996
  */
996
997
  queueInsertItems(
997
998
  queueInsertItemsRequest: chrome.cast.media.QueueInsertItemsRequest,
998
- successCallback: Function,
999
+ successCallback: () => void,
999
1000
  errorCallback: (error: chrome.cast.Error) => void,
1000
1001
  ): void;
1001
1002
 
@@ -1006,7 +1007,7 @@ declare namespace chrome {
1006
1007
  */
1007
1008
  queueJumpToItem(
1008
1009
  itemId: number,
1009
- successCallback: Function,
1010
+ successCallback: () => void,
1010
1011
  errorCallback: (error: chrome.cast.Error) => void,
1011
1012
  ): void;
1012
1013
 
@@ -1019,7 +1020,7 @@ declare namespace chrome {
1019
1020
  queueMoveItemToNewIndex(
1020
1021
  itemId: number,
1021
1022
  newIndex: number,
1022
- successCallback: Function,
1023
+ successCallback: () => void,
1023
1024
  errorCallback: (error: chrome.cast.Error) => void,
1024
1025
  ): void;
1025
1026
 
@@ -1027,13 +1028,13 @@ declare namespace chrome {
1027
1028
  * @param successCallback
1028
1029
  * @param errorCallback
1029
1030
  */
1030
- queueNext(successCallback: Function, errorCallback: (error: chrome.cast.Error) => void): void;
1031
+ queueNext(successCallback: () => void, errorCallback: (error: chrome.cast.Error) => void): void;
1031
1032
 
1032
1033
  /**
1033
1034
  * @param successCallback
1034
1035
  * @param errorCallback
1035
1036
  */
1036
- queuePrev(successCallback: Function, errorCallback: (error: chrome.cast.Error) => void): void;
1037
+ queuePrev(successCallback: () => void, errorCallback: (error: chrome.cast.Error) => void): void;
1037
1038
 
1038
1039
  /**
1039
1040
  * @param itemId
@@ -1042,7 +1043,7 @@ declare namespace chrome {
1042
1043
  */
1043
1044
  queueRemoveItem(
1044
1045
  itemId: number,
1045
- successCallback: Function,
1046
+ successCallback: () => void,
1046
1047
  errorCallback: (error: chrome.cast.Error) => void,
1047
1048
  ): void;
1048
1049
 
@@ -1053,7 +1054,7 @@ declare namespace chrome {
1053
1054
  */
1054
1055
  queueReorderItems(
1055
1056
  queueReorderItemsRequest: chrome.cast.media.QueueReorderItemsRequest,
1056
- successCallback: Function,
1057
+ successCallback: () => void,
1057
1058
  errorCallback: (error: chrome.cast.Error) => void,
1058
1059
  ): void;
1059
1060
 
@@ -1064,7 +1065,7 @@ declare namespace chrome {
1064
1065
  */
1065
1066
  queueSetRepeatMode(
1066
1067
  repeatMode: chrome.cast.media.RepeatMode,
1067
- successCallback: Function,
1068
+ successCallback: () => void,
1068
1069
  errorCallback: (error: chrome.cast.Error) => void,
1069
1070
  ): void;
1070
1071
 
@@ -1075,7 +1076,7 @@ declare namespace chrome {
1075
1076
  */
1076
1077
  queueUpdateItems(
1077
1078
  queueUpdateItemsRequest: chrome.cast.media.QueueUpdateItemsRequest,
1078
- successCallback: Function,
1079
+ successCallback: () => void,
1079
1080
  errorCallback: (error: chrome.cast.Error) => void,
1080
1081
  ): void;
1081
1082
  }
chrome/index.d.ts CHANGED
@@ -1180,7 +1180,7 @@ declare namespace chrome {
1180
1180
  /**
1181
1181
  * 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.
1182
1182
  */
1183
- export function setIcon(details: TabIconDetails, callback?: Function): void;
1183
+ export function setIcon(details: TabIconDetails, callback?: () => void): void;
1184
1184
 
1185
1185
  /** Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. */
1186
1186
  export var onClicked: BrowserClickedEvent;
@@ -2355,13 +2355,13 @@ declare namespace chrome {
2355
2355
  export function sendCommand(
2356
2356
  target: DebuggerSession,
2357
2357
  method: string,
2358
- commandParams?: Object,
2359
- ): Promise<Object | undefined>;
2358
+ commandParams?: { [key: string]: unknown },
2359
+ ): Promise<object | undefined>;
2360
2360
  export function sendCommand(
2361
2361
  target: DebuggerSession,
2362
2362
  method: string,
2363
- commandParams?: Object,
2364
- callback?: (result?: Object) => void,
2363
+ commandParams?: { [key: string]: unknown },
2364
+ callback?: (result?: object) => void,
2365
2365
  ): void;
2366
2366
 
2367
2367
  /**
@@ -2375,7 +2375,7 @@ declare namespace chrome {
2375
2375
  /** Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab. */
2376
2376
  export const onDetach: chrome.events.Event<(source: Debuggee, reason: `${DetachReason}`) => void>;
2377
2377
  /** Fired whenever debugging target issues instrumentation event. */
2378
- export const onEvent: chrome.events.Event<(source: DebuggerSession, method: string, params?: Object) => void>;
2378
+ export const onEvent: chrome.events.Event<(source: DebuggerSession, method: string, params?: object) => void>;
2379
2379
  }
2380
2380
 
2381
2381
  export { _debugger as debugger };
@@ -2585,7 +2585,7 @@ declare namespace chrome {
2585
2585
  filter: RequestCookie;
2586
2586
  }
2587
2587
 
2588
- export interface RequestedEvent extends chrome.events.Event<Function> {}
2588
+ export interface RequestedEvent extends chrome.events.Event<() => void> {}
2589
2589
 
2590
2590
  export var onRequest: RequestedEvent;
2591
2591
  }
@@ -2669,7 +2669,7 @@ declare namespace chrome {
2669
2669
  /**
2670
2670
  * Set to undefined if the resource content was set successfully; describes error otherwise.
2671
2671
  */
2672
- error?: Object,
2672
+ error?: object,
2673
2673
  ) => void,
2674
2674
  ): void;
2675
2675
  }
@@ -2942,13 +2942,13 @@ declare namespace chrome {
2942
2942
  * @param rootTitle An optional title for the root of the expression tree.
2943
2943
  * @param callback A callback invoked after the sidebar is updated with the object.
2944
2944
  */
2945
- setObject(jsonObject: Object, rootTitle?: string, callback?: () => void): void;
2945
+ setObject(jsonObject: { [key: string]: unknown }, rootTitle?: string, callback?: () => void): void;
2946
2946
  /**
2947
2947
  * Sets a JSON-compliant object to be displayed in the sidebar pane.
2948
2948
  * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
2949
2949
  * @param callback A callback invoked after the sidebar is updated with the object.
2950
2950
  */
2951
- setObject(jsonObject: Object, callback?: () => void): void;
2951
+ setObject(jsonObject: { [key: string]: unknown }, callback?: () => void): void;
2952
2952
  /**
2953
2953
  * Sets an HTML page to be displayed in the sidebar pane.
2954
2954
  * @param path Relative path of an extension page to display within the sidebar.
@@ -3035,19 +3035,19 @@ declare namespace chrome {
3035
3035
  * @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
3036
3036
  * @since Chrome 112
3037
3037
  */
3038
- replay?(recording: object): void;
3038
+ replay?(recording: { [key: string]: unknown }): void;
3039
3039
 
3040
3040
  /**
3041
3041
  * Converts a recording from the Recorder panel format into a string.
3042
3042
  * @param recording A recording of the user interaction with the page. This should match [Puppeteer's recording schema](https://github.com/puppeteer/replay/blob/main/docs/api/interfaces/Schema.UserFlow.md).
3043
3043
  */
3044
- stringify?(recording: object): void;
3044
+ stringify?(recording: { [key: string]: unknown }): void;
3045
3045
 
3046
3046
  /**
3047
3047
  * Converts a step of the recording from the Recorder panel format into a string.
3048
3048
  * @param step A step of the recording of a user interaction with the page. This should match [Puppeteer's step schema](https://github.com/puppeteer/replay/blob/main/docs/api/modules/Schema.md#step).
3049
3049
  */
3050
- stringifyStep?(step: object): void;
3050
+ stringifyStep?(step: { [key: string]: unknown }): void;
3051
3051
  }
3052
3052
 
3053
3053
  /**
@@ -4291,7 +4291,7 @@ declare namespace chrome {
4291
4291
  originAndPathMatches?: string | undefined;
4292
4292
  }
4293
4293
 
4294
- export interface Event<T extends Function> {
4294
+ export interface Event<T extends (...args: any) => void> {
4295
4295
  /**
4296
4296
  * Registers an event listener callback to an event.
4297
4297
  * @param callback Called when an event occurs. The parameters of this function depend on the type of event.
@@ -4516,7 +4516,7 @@ declare namespace chrome {
4516
4516
 
4517
4517
  export interface SelectionResult {
4518
4518
  /** Optional. Selected file entry. It will be null if a file hasn't been selected. */
4519
- entry?: Object | null | undefined;
4519
+ entry?: object | null | undefined;
4520
4520
  /** Whether the file has been selected. */
4521
4521
  success: boolean;
4522
4522
  }
@@ -5397,7 +5397,7 @@ declare namespace chrome {
5397
5397
  /**
5398
5398
  * Sets the default font size.
5399
5399
  */
5400
- export function setDefaultFontSize(details: DefaultFontSizeDetails, callback: Function): void;
5400
+ export function setDefaultFontSize(details: DefaultFontSizeDetails, callback: () => void): void;
5401
5401
  /**
5402
5402
  * Gets the font for a given script and generic font family.
5403
5403
  * @return The `getFont` method provides its result via callback or returned as a `Promise` (MV3 only).
@@ -5412,25 +5412,25 @@ declare namespace chrome {
5412
5412
  * @param details This parameter is currently unused.
5413
5413
  * @return The `getDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
5414
5414
  */
5415
- export function getDefaultFontSize(details?: Object): Promise<FontSizeDetails>;
5415
+ export function getDefaultFontSize(details?: unknown): Promise<FontSizeDetails>;
5416
5416
  /**
5417
5417
  * Gets the default font size.
5418
5418
  * @param details This parameter is currently unused.
5419
5419
  */
5420
5420
  export function getDefaultFontSize(callback: (options: FontSizeDetails) => void): void;
5421
- export function getDefaultFontSize(details: Object, callback: (options: FontSizeDetails) => void): void;
5421
+ export function getDefaultFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
5422
5422
  /**
5423
5423
  * Gets the minimum font size.
5424
5424
  * @param details This parameter is currently unused.
5425
5425
  * @return The `getMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
5426
5426
  */
5427
- export function getMinimumFontSize(details?: object): Promise<FontSizeDetails>;
5427
+ export function getMinimumFontSize(details?: unknown): Promise<FontSizeDetails>;
5428
5428
  /**
5429
5429
  * Gets the minimum font size.
5430
5430
  * @param details This parameter is currently unused.
5431
5431
  */
5432
5432
  export function getMinimumFontSize(callback: (options: FontSizeDetails) => void): void;
5433
- export function getMinimumFontSize(details: object, callback: (options: FontSizeDetails) => void): void;
5433
+ export function getMinimumFontSize(details: unknown, callback: (options: FontSizeDetails) => void): void;
5434
5434
  /**
5435
5435
  * Sets the minimum font size.
5436
5436
  * @return The `setMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -5439,31 +5439,31 @@ declare namespace chrome {
5439
5439
  /**
5440
5440
  * Sets the minimum font size.
5441
5441
  */
5442
- export function setMinimumFontSize(details: SetFontSizeDetails, callback: Function): void;
5442
+ export function setMinimumFontSize(details: SetFontSizeDetails, callback: () => void): void;
5443
5443
  /**
5444
5444
  * Gets the default size for fixed width fonts.
5445
5445
  * @param details This parameter is currently unused.
5446
5446
  * @return The `getDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only).
5447
5447
  */
5448
- export function getDefaultFixedFontSize(details?: Object): Promise<FontSizeDetails>;
5448
+ export function getDefaultFixedFontSize(details?: unknown): Promise<FontSizeDetails>;
5449
5449
  /**
5450
5450
  * Gets the default size for fixed width fonts.
5451
5451
  * @param details This parameter is currently unused.
5452
5452
  */
5453
5453
  export function getDefaultFixedFontSize(callback: (details: FontSizeDetails) => void): void;
5454
- export function getDefaultFixedFontSize(details: Object, callback: (details: FontSizeDetails) => void): void;
5454
+ export function getDefaultFixedFontSize(details: unknown, callback: (details: FontSizeDetails) => void): void;
5455
5455
  /**
5456
5456
  * Clears the default font size set by this extension, if any.
5457
5457
  * @param details This parameter is currently unused.
5458
5458
  * @return The `clearDefaultFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
5459
5459
  */
5460
- export function clearDefaultFontSize(details?: Object): Promise<void>;
5460
+ export function clearDefaultFontSize(details?: unknown): Promise<void>;
5461
5461
  /**
5462
5462
  * Clears the default font size set by this extension, if any.
5463
5463
  * @param details This parameter is currently unused.
5464
5464
  */
5465
- export function clearDefaultFontSize(callback: Function): void;
5466
- export function clearDefaultFontSize(details: Object, callback: Function): void;
5465
+ export function clearDefaultFontSize(callback: () => void): void;
5466
+ export function clearDefaultFontSize(details: unknown, callback: () => void): void;
5467
5467
  /**
5468
5468
  * Sets the default size for fixed width fonts.
5469
5469
  * @return The `setDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -5472,7 +5472,7 @@ declare namespace chrome {
5472
5472
  /**
5473
5473
  * Sets the default size for fixed width fonts.
5474
5474
  */
5475
- export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback: Function): void;
5475
+ export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback: () => void): void;
5476
5476
  /**
5477
5477
  * Clears the font set by this extension, if any.
5478
5478
  * @return The `clearFont` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -5481,7 +5481,7 @@ declare namespace chrome {
5481
5481
  /**
5482
5482
  * Clears the font set by this extension, if any.
5483
5483
  */
5484
- export function clearFont(details: FontDetails, callback: Function): void;
5484
+ export function clearFont(details: FontDetails, callback: () => void): void;
5485
5485
  /**
5486
5486
  * Sets the font for a given script and generic font family.
5487
5487
  * @return The `setFont` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
@@ -5490,19 +5490,19 @@ declare namespace chrome {
5490
5490
  /**
5491
5491
  * Sets the font for a given script and generic font family.
5492
5492
  */
5493
- export function setFont(details: SetFontDetails, callback: Function): void;
5493
+ export function setFont(details: SetFontDetails, callback: () => void): void;
5494
5494
  /**
5495
5495
  * Clears the minimum font size set by this extension, if any.
5496
5496
  * @param details This parameter is currently unused.
5497
5497
  * @return The `clearMinimumFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
5498
5498
  */
5499
- export function clearMinimumFontSize(details?: Object): Promise<void>;
5499
+ export function clearMinimumFontSize(details?: unknown): Promise<void>;
5500
5500
  /**
5501
5501
  * Clears the minimum font size set by this extension, if any.
5502
5502
  * @param details This parameter is currently unused.
5503
5503
  */
5504
- export function clearMinimumFontSize(callback: Function): void;
5505
- export function clearMinimumFontSize(details: Object, callback: Function): void;
5504
+ export function clearMinimumFontSize(callback: () => void): void;
5505
+ export function clearMinimumFontSize(details: unknown, callback: () => void): void;
5506
5506
  /**
5507
5507
  * Gets a list of fonts on the system.
5508
5508
  * @return The `getFontList` method provides its result via callback or returned as a `Promise` (MV3 only).
@@ -5517,12 +5517,12 @@ declare namespace chrome {
5517
5517
  * @param details This parameter is currently unused.
5518
5518
  * @return The `clearDefaultFixedFontSize` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
5519
5519
  */
5520
- export function clearDefaultFixedFontSize(details: Object): Promise<void>;
5520
+ export function clearDefaultFixedFontSize(details: unknown): Promise<void>;
5521
5521
  /**
5522
5522
  * Clears the default fixed font size set by this extension, if any.
5523
5523
  * @param details This parameter is currently unused.
5524
5524
  */
5525
- export function clearDefaultFixedFontSize(details: Object, callback: Function): void;
5525
+ export function clearDefaultFixedFontSize(details: unknown, callback: () => void): void;
5526
5526
 
5527
5527
  /** Fired when the default fixed font size setting changes. */
5528
5528
  export var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
@@ -5551,12 +5551,12 @@ declare namespace chrome {
5551
5551
  /** Optional. Time-to-live of the message in seconds. If it is not possible to send the message within that time, an onSendError event will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 86400 seconds (1 day). */
5552
5552
  timeToLive?: number | undefined;
5553
5553
  /** Message data to send to the server. Case-insensitive goog. and google, as well as case-sensitive collapse_key are disallowed as key prefixes. Sum of all key/value pairs should not exceed gcm.MAX_MESSAGE_SIZE. */
5554
- data: Object;
5554
+ data: { [key: string]: unknown };
5555
5555
  }
5556
5556
 
5557
5557
  export interface IncomingMessage {
5558
5558
  /** The message data. */
5559
- data: Object;
5559
+ data: { [key: string]: unknown };
5560
5560
  /**
5561
5561
  * Optional.
5562
5562
  * The sender who issued the message.
@@ -5576,7 +5576,7 @@ declare namespace chrome {
5576
5576
  /** Optional. The ID of the message with this error, if error is related to a specific message. */
5577
5577
  messageId?: string | undefined;
5578
5578
  /** Additional details related to the error, when available. */
5579
- detail: Object;
5579
+ detail: object;
5580
5580
  }
5581
5581
 
5582
5582
  export interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {}
@@ -6245,7 +6245,7 @@ declare namespace chrome {
6245
6245
  }
6246
6246
 
6247
6247
  export interface MenuItemParameters {
6248
- items: Object[];
6248
+ items: MenuItem[];
6249
6249
  engineId: string;
6250
6250
  }
6251
6251
 
@@ -7186,7 +7186,7 @@ declare namespace chrome {
7186
7186
  * @since Chrome 29
7187
7187
  * @param callback Returns the set of notification_ids currently in the system.
7188
7188
  */
7189
- export function getAll(callback: (notifications: Object) => void): void;
7189
+ export function getAll(callback: (notifications: { [key: string]: true }) => void): void;
7190
7190
  /**
7191
7191
  * Retrieves whether the user has enabled notifications from this app or extension.
7192
7192
  * @since Chrome 32
@@ -7626,7 +7626,7 @@ declare namespace chrome {
7626
7626
  */
7627
7627
  export function getKeyPair(
7628
7628
  certificate: ArrayBuffer,
7629
- parameters: Object,
7629
+ parameters: { [key: string]: unknown },
7630
7630
  callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
7631
7631
  ): void;
7632
7632
  /**
@@ -7640,7 +7640,7 @@ declare namespace chrome {
7640
7640
  */
7641
7641
  export function getKeyPairBySpki(
7642
7642
  publicKeySpkiDer: ArrayBuffer,
7643
- parameters: Object,
7643
+ parameters: { [key: string]: unknown },
7644
7644
  callback: (publicKey: CryptoKey, privateKey: CryptoKey | null) => void,
7645
7645
  ): void;
7646
7646
  /** An implementation of WebCrypto's SubtleCrypto that allows crypto operations on keys of client certificates that are available to this extension. */
@@ -7716,7 +7716,7 @@ declare namespace chrome {
7716
7716
  /** The print job title. */
7717
7717
  title: string;
7718
7718
  /** Print ticket in CJT format. */
7719
- ticket: Object;
7719
+ ticket: { [key: string]: unknown };
7720
7720
  /** The document content type. Supported formats are "application/pdf" and "image/pwg-raster". */
7721
7721
  contentType: string;
7722
7722
  /** Blob containing the document data to print. Format must match |contentType|. */
@@ -9508,7 +9508,7 @@ declare namespace chrome {
9508
9508
  */
9509
9509
  export function sendNativeMessage(
9510
9510
  application: string,
9511
- message: Object,
9511
+ message: object,
9512
9512
  responseCallback: (response: any) => void,
9513
9513
  ): void;
9514
9514
  /**
@@ -9519,7 +9519,7 @@ declare namespace chrome {
9519
9519
  */
9520
9520
  export function sendNativeMessage(
9521
9521
  application: string,
9522
- message: Object,
9522
+ message: object,
9523
9523
  ): Promise<any>;
9524
9524
  /**
9525
9525
  * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
@@ -10205,7 +10205,11 @@ declare namespace chrome {
10205
10205
  address: string;
10206
10206
  }
10207
10207
 
10208
- export function create(type: string, options?: Object, callback?: (createInfo: CreateInfo) => void): void;
10208
+ export function create(
10209
+ type: string,
10210
+ options?: { [key: string]: unknown },
10211
+ callback?: (createInfo: CreateInfo) => void,
10212
+ ): void;
10209
10213
  export function destroy(socketId: number): void;
10210
10214
  export function connect(
10211
10215
  socketId: number,
@@ -11690,7 +11694,7 @@ declare namespace chrome {
11690
11694
  * Closes a tab.
11691
11695
  * @param tabId The tab to close.
11692
11696
  */
11693
- export function remove(tabId: number, callback: Function): void;
11697
+ export function remove(tabId: number, callback: () => void): void;
11694
11698
  /**
11695
11699
  * Closes several tabs.
11696
11700
  * @param tabIds The list of tabs to close.
@@ -11701,7 +11705,7 @@ declare namespace chrome {
11701
11705
  * Closes several tabs.
11702
11706
  * @param tabIds The list of tabs to close.
11703
11707
  */
11704
- export function remove(tabIds: number[], callback: Function): void;
11708
+ export function remove(tabIds: number[], callback: () => void): void;
11705
11709
  /**
11706
11710
  * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
11707
11711
  * @param callback
@@ -11881,7 +11885,7 @@ declare namespace chrome {
11881
11885
  * @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.
11882
11886
  * @param callback Optional. Called when all the CSS has been inserted.
11883
11887
  */
11884
- export function insertCSS(details: InjectDetails, callback: Function): void;
11888
+ export function insertCSS(details: InjectDetails, callback: () => void): void;
11885
11889
  /**
11886
11890
  * Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
11887
11891
  * @param tabId Optional. The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
@@ -11895,7 +11899,7 @@ declare namespace chrome {
11895
11899
  * @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.
11896
11900
  * @param callback Optional. Called when all the CSS has been inserted.
11897
11901
  */
11898
- export function insertCSS(tabId: number, details: InjectDetails, callback: Function): void;
11902
+ export function insertCSS(tabId: number, details: InjectDetails, callback: () => void): void;
11899
11903
  /**
11900
11904
  * Highlights the given tabs.
11901
11905
  * @since Chrome 16
@@ -12840,7 +12844,7 @@ declare namespace chrome {
12840
12844
  export interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {}
12841
12845
 
12842
12846
  export interface VpnConfigCreationEvent
12843
- extends chrome.events.Event<(id: string, name: string, data: Object) => void>
12847
+ extends chrome.events.Event<(id: string, name: string, data: { [key: string]: unknown }) => void>
12844
12848
  {}
12845
12849
 
12846
12850
  export interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {}
@@ -12857,19 +12861,19 @@ declare namespace chrome {
12857
12861
  * @param id ID of the VPN configuration to destroy.
12858
12862
  * @param callback Optional. Called when the configuration is destroyed or if there is an error.
12859
12863
  */
12860
- export function destroyConfig(id: string, callback?: Function): void;
12864
+ export function destroyConfig(id: string, callback?: () => void): void;
12861
12865
  /**
12862
12866
  * Sets the parameters for the VPN session. This should be called immediately after "connected" is received from the platform. This will succeed only when the VPN session is owned by the extension.
12863
12867
  * @param parameters The parameters for the VPN session.
12864
12868
  * @param callback Called when the parameters are set or if there is an error.
12865
12869
  */
12866
- export function setParameters(parameters: VpnSessionParameters, callback: Function): void;
12870
+ export function setParameters(parameters: VpnSessionParameters, callback?: () => void): void;
12867
12871
  /**
12868
12872
  * Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.
12869
12873
  * @param data The IP packet to be sent to the platform.
12870
12874
  * @param callback Optional. Called when the packet is sent or if there is an error.
12871
12875
  */
12872
- export function sendPacket(data: ArrayBuffer, callback?: Function): void;
12876
+ export function sendPacket(data: ArrayBuffer, callback?: () => void): void;
12873
12877
  /**
12874
12878
  * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
12875
12879
  * @param state The VPN session state of the VPN client.
@@ -12877,7 +12881,7 @@ declare namespace chrome {
12877
12881
  * failure: VPN connection failed.
12878
12882
  * @param callback Optional. Called when the notification is complete or if there is an error.
12879
12883
  */
12880
- export function notifyConnectionStateChanged(state: string, callback?: Function): void;
12884
+ export function notifyConnectionStateChanged(state: string, callback?: () => void): void;
12881
12885
 
12882
12886
  /** Triggered when a message is received from the platform for a VPN configuration owned by the extension. */
12883
12887
  export var onPlatformMessage: VpnPlatformMessageEvent;
@@ -13150,7 +13154,7 @@ declare namespace chrome {
13150
13154
  * Manifest: "host_permissions"
13151
13155
  */
13152
13156
  export namespace webRequest {
13153
- interface WebRequestEvent<T extends Function, U extends string[]>
13157
+ interface WebRequestEvent<T extends (...args: any) => void, U extends string[]>
13154
13158
  extends Omit<chrome.events.Event<T>, "addListener">
13155
13159
  {
13156
13160
  addListener(callback: T, filter: RequestFilter, extraInfoSpec?: U): void;
@@ -13407,7 +13411,7 @@ declare namespace chrome {
13407
13411
  * Can return its result via Promise in Manifest V3 or later since Chrome 116.
13408
13412
  */
13409
13413
  export function handlerBehaviorChanged(): Promise<void>;
13410
- export function handlerBehaviorChanged(callback: Function): void;
13414
+ export function handlerBehaviorChanged(callback: () => void): void;
13411
13415
 
13412
13416
  /** Fired when a request is about to occur. */
13413
13417
  export const onBeforeRequest: WebRequestBodyEvent;
@@ -13741,7 +13745,7 @@ declare namespace chrome {
13741
13745
  */
13742
13746
  export function remove(windowId: number): Promise<void>;
13743
13747
  /** Removes (closes) a window, and all the tabs inside it. */
13744
- export function remove(windowId: number, callback: Function): void;
13748
+ export function remove(windowId: number, callback: () => void): void;
13745
13749
  /**
13746
13750
  * Gets the window that was most recently focused — typically the window 'on top'.
13747
13751
  */
@@ -14568,7 +14572,7 @@ declare namespace chrome {
14568
14572
  export function isRegexSupported(regexOptions: RegexOptions): Promise<IsRegexSupportedResult>;
14569
14573
 
14570
14574
  /** Configures if the action count for tabs should be displayed as the extension action's badge text and provides a way for that action count to be incremented. */
14571
- export function setExtensionActionOptions(options: ExtensionActionOptions, callback: Function): void;
14575
+ export function setExtensionActionOptions(options: ExtensionActionOptions, callback: () => void): void;
14572
14576
 
14573
14577
  /**
14574
14578
  * Configures if the action count for tabs should be displayed as the extension action's badge text and provides a way for that action count to be incremented.
@@ -14600,7 +14604,7 @@ declare namespace chrome {
14600
14604
  * In case of an error, runtime.lastError will be set and no change will be made to the rule set.
14601
14605
  * This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, internal errors, and others.
14602
14606
  */
14603
- export function updateDynamicRules(options: UpdateRuleOptions, callback: Function): void;
14607
+ export function updateDynamicRules(options: UpdateRuleOptions, callback: () => void): void;
14604
14608
 
14605
14609
  /** Modifies the current set of dynamic rules for the extension.
14606
14610
  * The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
@@ -14626,7 +14630,7 @@ declare namespace chrome {
14626
14630
  * In case of an error, runtime.lastError will be set and no change will be made to set of enabled rulesets.
14627
14631
  * This can happen for multiple reasons, such as invalid ruleset IDs, rule count limit exceeded, or internal errors.
14628
14632
  */
14629
- export function updateEnabledRulesets(options: UpdateRulesetOptions, callback: Function): void;
14633
+ export function updateEnabledRulesets(options: UpdateRulesetOptions, callback: () => void): void;
14630
14634
 
14631
14635
  /** Updates the set of enabled static rulesets for the extension.
14632
14636
  * The rulesets with IDs listed in options.disableRulesetIds are first removed, and then the rulesets listed in options.enableRulesetIds are added.
@@ -14651,7 +14655,7 @@ declare namespace chrome {
14651
14655
  * In case of an error, runtime.lastError will be set and no change will be made to the rule set.
14652
14656
  * This can happen for multiple reasons, such as invalid rule format, duplicate rule ID, rule count limit exceeded, and others.
14653
14657
  */
14654
- export function updateSessionRules(options: UpdateRuleOptions, callback: Function): void;
14658
+ export function updateSessionRules(options: UpdateRuleOptions, callback: () => void): void;
14655
14659
 
14656
14660
  /** Modifies the current set of session scoped rules for the extension.
14657
14661
  * The rules with IDs listed in options.removeRuleIds are first removed, and then the rules given in options.addRules are added.
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.319",
3
+ "version": "0.0.321",
4
4
  "description": "TypeScript definitions for chrome",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -94,6 +94,6 @@
94
94
  "@types/har-format": "*"
95
95
  },
96
96
  "peerDependencies": {},
97
- "typesPublisherContentHash": "5b84f59dbd2c9c131afffbd07c9297dd648ea3d02b07634fa0b450b0e0715363",
97
+ "typesPublisherContentHash": "33d65645ce9ffaef274abbe355db02d4c5dcdaa8cae6dbb749c23fe8472eb113",
98
98
  "typeScriptVersion": "5.1"
99
99
  }