@types/chrome 0.0.225 → 0.0.227

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 +21 -4
  3. chrome/package.json +2 -2
chrome/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Chrome extension development (http://
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 23 Mar 2023 22:02:39 GMT
11
+ * Last updated: Wed, 29 Mar 2023 16:33:07 GMT
12
12
  * Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
13
13
  * Global values: `chrome`
14
14
 
chrome/index.d.ts CHANGED
@@ -367,13 +367,30 @@ declare namespace chrome.alarms {
367
367
 
368
368
  export interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> { }
369
369
 
370
+ /**
371
+ * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
372
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
373
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
374
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
375
+ * @return The `create` method provides its result via callback or returned as a `Promise` (MV3 only).
376
+ */
377
+ export function create(alarmInfo: AlarmCreateInfo): Promise<void>;
378
+ /**
379
+ * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
380
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
381
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
382
+ * @param name Optional name to identify this alarm. Defaults to the empty string.
383
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
384
+ * @return The `create` method provides its result via callback or returned as a `Promise` (MV3 only).
385
+ */
386
+ export function create(name: string, alarmInfo: AlarmCreateInfo): Promise<void>;
370
387
  /**
371
388
  * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
372
389
  * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
373
390
  * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
374
391
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
375
392
  */
376
- export function create(alarmInfo: AlarmCreateInfo): void;
393
+ export function create(alarmInfo: AlarmCreateInfo, callback: () => void): void;
377
394
  /**
378
395
  * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
379
396
  * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
@@ -381,7 +398,7 @@ declare namespace chrome.alarms {
381
398
  * @param name Optional name to identify this alarm. Defaults to the empty string.
382
399
  * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
383
400
  */
384
- export function create(name: string, alarmInfo: AlarmCreateInfo): void;
401
+ export function create(name: string, alarmInfo: AlarmCreateInfo, callback: () => void): void;
385
402
  /**
386
403
  * Gets an array of all the alarms.
387
404
  */
@@ -4783,7 +4800,7 @@ declare namespace chrome.input.ime {
4783
4800
  altgrKey?: boolean | undefined;
4784
4801
  /**
4785
4802
  * Optional.
4786
- * The ID of the request.
4803
+ * The ID of the request. Use the requestId param from the onKeyEvent event instead.
4787
4804
  * @deprecated since Chrome 79.
4788
4805
  */
4789
4806
  requestId?: string | undefined;
@@ -5060,7 +5077,7 @@ declare namespace chrome.input.ime {
5060
5077
  export interface CandidateClickedEvent
5061
5078
  extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void> { }
5062
5079
 
5063
- export interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent) => void> { }
5080
+ export interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent, requestId: string) => void> { }
5064
5081
 
5065
5082
  export interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> { }
5066
5083
 
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.0.225",
3
+ "version": "0.0.227",
4
4
  "description": "TypeScript definitions for Chrome extension development",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
6
6
  "license": "MIT",
@@ -93,6 +93,6 @@
93
93
  "@types/filesystem": "*",
94
94
  "@types/har-format": "*"
95
95
  },
96
- "typesPublisherContentHash": "0eb1f0fa6c9b66f12a8825bc9660f97957852f954bc47b83269027074345f634",
96
+ "typesPublisherContentHash": "b26234ae73e8db17ff390aa67f6c0f27d176b5ed25a562c4ea728735fa49dfbf",
97
97
  "typeScriptVersion": "4.3"
98
98
  }