@types/chrome 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. chrome/README.md +1 -1
  2. chrome/index.d.ts +46 -13
  3. chrome/package.json +2 -2
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: Sat, 20 Jun 2026 14:44:50 GMT
11
+ * Last updated: Wed, 01 Jul 2026 21:01:32 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
chrome/index.d.ts CHANGED
@@ -381,22 +381,53 @@ declare namespace chrome {
381
381
  * Permissions: "alarms"
382
382
  */
383
383
  export namespace alarms {
384
- interface AlarmCreateInfo {
385
- /** Length of time in minutes after which the {@link onAlarm} event should fire. */
386
- delayInMinutes?: number | undefined;
387
- /** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
388
- periodInMinutes?: number | undefined;
389
- /** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
390
- when?: number | undefined;
391
- }
384
+ type AlarmCreateInfo =
385
+ & {
386
+ /**
387
+ * Whether the alarm should persist across sessions (browser restarts). In Chrome, this defaults to true to match historical behavior, but you should set this explicitly to maximize compatibility across browsers.
388
+ * @since Chrome 150
389
+ */
390
+ persistAcrossSessions?: boolean | undefined;
391
+ }
392
+ & (
393
+ | {
394
+ /** Length of time in minutes after which the {@link onAlarm} event should fire. */
395
+ delayInMinutes: number;
396
+ /** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
397
+ periodInMinutes?: number | undefined;
398
+ /** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
399
+ when?: never | undefined;
400
+ }
401
+ | {
402
+ /** Length of time in minutes after which the {@link onAlarm} event should fire. */
403
+ delayInMinutes?: number | undefined;
404
+ /** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
405
+ periodInMinutes: number;
406
+ /** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
407
+ when?: number | undefined;
408
+ }
409
+ | {
410
+ /** Length of time in minutes after which the {@link onAlarm} event should fire. */
411
+ delayInMinutes?: never | undefined;
412
+ /** If set, the onAlarm event should fire every `periodInMinutes` minutes after the initial event specified by `when` or `delayInMinutes`. If not set, the alarm will only fire once. */
413
+ periodInMinutes?: number | undefined;
414
+ /** Time at which the alarm should fire, in milliseconds past the epoch (e.g. `Date.now() + n`). */
415
+ when: number;
416
+ }
417
+ );
392
418
 
393
419
  interface Alarm {
420
+ /** Name of this alarm. */
421
+ name: string;
394
422
  /** If not null, the alarm is a repeating alarm and will fire again in `periodInMinutes` minutes. */
395
423
  periodInMinutes?: number;
424
+ /**
425
+ * Whether the alarm should persist across sessions (browser restarts).
426
+ * @since Chrome 150
427
+ */
428
+ persistAcrossSessions: boolean;
396
429
  /** Time at which this alarm was scheduled to fire, in milliseconds past the epoch (e.g. `Date.now() + n`). For performance reasons, the alarm may have been delayed an arbitrary amount beyond this. */
397
430
  scheduledTime: number;
398
- /** Name of this alarm. */
399
- name: string;
400
431
  }
401
432
 
402
433
  /**
@@ -7604,7 +7635,7 @@ declare namespace chrome {
7604
7635
  * Creates a new offscreen document for the extension.
7605
7636
  * @param parameters The parameters describing the offscreen document to create.
7606
7637
  *
7607
- * Can return its result via Promise in Manifest V3.
7638
+ * Can return its result via Promise.
7608
7639
  */
7609
7640
  function createDocument(parameters: CreateParameters): Promise<void>;
7610
7641
  function createDocument(parameters: CreateParameters, callback: () => void): void;
@@ -7612,7 +7643,7 @@ declare namespace chrome {
7612
7643
  /**
7613
7644
  * Closes the currently-open offscreen document for the extension.
7614
7645
  *
7615
- * Can return its result via Promise in Manifest V3.
7646
+ * Can return its result via Promise.
7616
7647
  */
7617
7648
  function closeDocument(): Promise<void>;
7618
7649
  function closeDocument(callback: () => void): void;
@@ -7620,7 +7651,8 @@ declare namespace chrome {
7620
7651
  /**
7621
7652
  * Determines whether the extension has an active document.
7622
7653
  *
7623
- * Can return its result via Promise in Manifest V3.
7654
+ * Can return its result via Promise.
7655
+ * @since Chrome 150
7624
7656
  */
7625
7657
  function hasDocument(): Promise<boolean>;
7626
7658
  function hasDocument(callback: (result: boolean) => void): void;
@@ -9182,6 +9214,7 @@ declare namespace chrome {
9182
9214
  | "identity"
9183
9215
  | "identity.email"
9184
9216
  | "idle"
9217
+ | "input"
9185
9218
  | "loginState"
9186
9219
  | "management"
9187
9220
  | "nativeMessaging"
chrome/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/chrome",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
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": "1d1d517ed45196c095ef5696a00f7e76653f02d2855a463a18166cda428a35fd",
97
+ "typesPublisherContentHash": "0d223956ef9cea82c44d7fd4098f895ea9af206ae06ba356723fa7280327552c",
98
98
  "typeScriptVersion": "5.6"
99
99
  }