File tree Expand file tree Collapse file tree 2 files changed +12
-25
lines changed Expand file tree Collapse file tree 2 files changed +12
-25
lines changed Original file line number Diff line number Diff line change 11import chromep from 'chrome-promise'
22
3- // Type definitions for @extend -chrome/notify
4- // Definitions by: Jack and Amy Steam <https://jackandamy.rocks>
5- /// <reference types="chrome" />
6-
7- // TODO: fix NotifyOptions
8- // export interface NotifyOptions
9- // extends chrome.notifications.NotificationOptions {
10- // message: string
11- // /**
12- // * This only works if the background page is persistent.
13- // */
14- // onClick?: (id: string) => void
15- // /**
16- // * This only works if the background page is persistent.
17- // */
18- // buttons?: [(id: string) => void, (id: string) => void]
19- // }
20-
21- export function notify ( message : string ) : Promise < string >
22- export namespace notify {
23- /**
24- * Resolves to the notification id (either supplied or generated) that represents the created notification.
25- */
26- export function create ( NotifyOptions ) : Promise < string >
3+ export interface NotifyOptions
4+ extends Partial < chrome . notifications . NotificationOptions > {
5+ message : string
276}
7+
8+ export const notify : ( ( message : string ) => Promise < string > ) &
9+ typeof chromep . notifications & {
10+ /**
11+ * Resolves to the notification id (either supplied or generated) that represents the created notification.
12+ */
13+ create ( options : NotifyOptions ) : Promise < string >
14+ }
Original file line number Diff line number Diff line change @@ -48,4 +48,4 @@ const create = ({
4848
4949export const notify = ( message : string ) : Promise < string > => create ( { message } )
5050
51- Object . assign ( notify , chrome . notifications , chromep . notifications , { create } )
51+ Object . assign ( notify , chromep . notifications , { create } )
You can’t perform that action at this time.
0 commit comments