chore: add typescript definitions for custom types (#486)

This commit is contained in:
Andrew Mackrodt
2020-10-10 17:06:38 +01:00
committed by GitHub
parent 5c61333df0
commit 0cdf6657bf
8 changed files with 168 additions and 11 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import {Link, Store} from '../store/model';
import {Print, logger} from '../logger';
import Push from 'pushover-notifications';
import Push, {PushoverMessage} from 'pushover-notifications';
import {config} from '../config';
const pushover = config.notifications.pushover;
@@ -13,7 +13,7 @@ export function sendPushoverNotification(link: Link, store: Store) {
if (pushover.token && pushover.username) {
logger.debug('↗ sending pushover message');
const message = {
const message: PushoverMessage = {
message: link.cartUrl ? link.cartUrl : link.url,
priority: pushover.priority,
title: Print.inStock(link, store)