# alarms Documentation: [Chrome Alarms API](https://developer.chrome.com/docs/extensions/reference/alarms) A promise-based wrapper for the Chrome `alarms` API. ## Methods - [clearAlarm(name)](#clearAlarm) - [clearAllAlarm()](#clearAllAlarm) - [createAlarm(name, info)](#createAlarm) - [getAlarm(name)](#getAlarm) - [getAllAlarm()](#getAllAlarm) ## Events - [onAlarm(callback)](#onAlarm) ### clearAlarm ``` clearAlarm(name: string): Promise ``` Clears the alarm with the specified name, returning `true` if an existing alarm was found and cleared. ### clearAllAlarm ``` clearAllAlarm(): Promise ``` Clears all alarms, returning `true` if any alarms were found and cleared. ### createAlarm ``` createAlarm(name: string, info: chrome.alarms.AlarmCreateInfo): Promise ``` Creates a new alarm or updates an existing one with the given name and scheduling options. ### getAlarm ``` getAlarm(name: string): Promise ``` Retrieves details for the alarm with the specified name, or `undefined` if it does not exist. ### getAllAlarm ``` getAllAlarm(): Promise ``` Retrieves all set alarms. ### onAlarm ``` onAlarm(callback: (alarm: chrome.alarms.Alarm) => void): () => void ``` Adds a listener that triggers when an alarm goes off. Returns an unsubscribe function.