From 00a6998f4e16aa2009ca5545768151d0e7ab7998 Mon Sep 17 00:00:00 2001 From: Daniel Pereira Date: Tue, 16 Aug 2016 10:10:39 -0500 Subject: [PATCH] Move interfaces in the 'electron-notify' module, and export them --- electron-notify/electron-notify.d.ts | 50 +++++++++++++--------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/electron-notify/electron-notify.d.ts b/electron-notify/electron-notify.d.ts index 3ad6906205..b29efa0e50 100644 --- a/electron-notify/electron-notify.d.ts +++ b/electron-notify/electron-notify.d.ts @@ -5,29 +5,10 @@ /// -declare namespace ElectronNotify { +/** Nice and simple notifications for electron apps */ +declare module 'electron-notify' { - interface ICloseNotificationEvent { - event: 'close' | 'show' | 'click', - id: number - } - - interface INotificationEvent extends ICloseNotificationEvent { - closeNotification: (reason: any) => void, - } - - interface INotification { - title: string, - text?: string, - image?: string, - url?: string, - sound?: string, - onClickFunc?: (event: INotificationEvent) => void, - onShowFunc?: (event: INotificationEvent) => void, - onCloseFunc?: (event: ICloseNotificationEvent) => void - } - - interface IConfiguration { + export interface ICustomConfig { width?: number, height?: number, padding?: number, @@ -47,16 +28,31 @@ declare namespace ElectronNotify { defaultStyleText?: any } -} + export interface ICloseNotificationEvent { + event: 'close' | 'show' | 'click', + id: number + } -/** Nice and simple notifications for electron apps */ -declare module 'electron-notify' { + export interface INotificationEvent extends ICloseNotificationEvent { + closeNotification: (reason: any) => void, + } + + export interface INotification { + title: string, + text?: string, + image?: string, + url?: string, + sound?: string, + onClickFunc?: (event: INotificationEvent) => void, + onShowFunc?: (event: INotificationEvent) => void, + onCloseFunc?: (event: ICloseNotificationEvent) => void + } /** Change some config options. Can be run multiple times, also between notify()-calls to change electron-notifys behaviour. */ - export function setConfig(customConfig: ElectronNotify.IConfiguration): void; + export function setConfig(customConfig: ICustomConfig): void; /** Displays new notification. */ - export function notify(notification: ElectronNotify.INotification): void; + export function notify(notification: INotification): void; /** Clears the animation queue and closes all windows opened by electron-notify. Call this to clean up before quiting your app. */ export function closeAll(): void;