@fliklab/react-push-notification
Version:
Simple and easy-to-use web push notification library for React
13 lines (12 loc) • 514 B
TypeScript
/**
* 브라우저 알림 권한을 요청합니다.
* @returns {Promise<boolean>} 권한이 허용되면 true, 그렇지 않으면 false를 반환합니다.
*/
export declare const requestNotificationPermission: () => Promise<boolean>;
/**
* 푸시 알림을 표시합니다.
* @param {string} title - 알림 제목
* @param {NotificationOptions} options - 알림 옵션
* @returns {Promise<void>}
*/
export declare const showNotification: (title: string, options?: NotificationOptions) => Promise<void>;