mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 11:07:43 +00:00
chore: add typescript definitions for custom types (#486)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import playerLib, {PlaySound} from 'play-sound';
|
||||
import {config} from '../config';
|
||||
import fs from 'fs';
|
||||
import {logger} from '../logger';
|
||||
import playerLib from 'play-sound';
|
||||
|
||||
let player: any;
|
||||
let player: PlaySound;
|
||||
|
||||
if (config.notifications.playSound) {
|
||||
player = playerLib();
|
||||
@@ -11,7 +11,7 @@ if (config.notifications.playSound) {
|
||||
if (player.player === null) {
|
||||
logger.warn('✖ couldn\'t find sound player');
|
||||
} else {
|
||||
const playerName: string = player.player;
|
||||
const playerName = player.player;
|
||||
logger.info(`✔ sound player found: ${playerName}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user