diff --git a/node-irc/node-irc-tests.ts b/node-irc/node-irc-tests.ts index a4af82d803..62d105acca 100644 --- a/node-irc/node-irc-tests.ts +++ b/node-irc/node-irc-tests.ts @@ -8,15 +8,15 @@ var bot = new irc.Client('irc.dollyfish.net.nz', 'nodebot', { channels: ['#blah', '#test'] }); -bot.addListener('error', ((message) => { +bot.addListener('error', ((message: irc.IMessage) => { console.error('ERROR: %s: %s', message.command, message.args.join(' ')); })); -bot.addListener('message#blah', ((from, message) => { +bot.addListener('message#blah', ((from: string, message: string) => { console.log('<%s> %s', from, message); })); -bot.addListener('message', ((from, to, message) => { +bot.addListener('message', ((from: string, to: string, message: string) => { console.log('%s => %s: %s', from, to, message); if (to.match(/^[#&]/)) { @@ -37,18 +37,18 @@ bot.addListener('message', ((from, to, message) } })); -bot.addListener('pm', ((nick, message) => { +bot.addListener('pm', ((nick: string, message: string) => { console.log('Got private message from %s: %s', nick, message); })); -bot.addListener('join', ((channel, who) => { +bot.addListener('join', ((channel: string, who: string) => { console.log('%s has joined %s', who, channel); })); -bot.addListener('part', ((channel, who, reason) => { +bot.addListener('part', ((channel: string, who: string, reason: string) => { console.log('%s has left %s: %s', who, channel, reason); })); -bot.addListener('kick', ((channel, who, by, reason) => { +bot.addListener('kick', ((channel: string, who: string, by: string, reason: string) => { console.log('%s was kicked from %s by %s: %s', who, channel, by, reason); }));