Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new Slackhook() returns 'any' in Typescript #7

Closed
techieshark opened this issue Feb 26, 2020 · 3 comments
Closed

new Slackhook() returns 'any' in Typescript #7

techieshark opened this issue Feb 26, 2020 · 3 comments

Comments

@techieshark
Copy link

Getting error when using the suggested code:

const slackLogger = winston.createLogger({
  level: "info", 
  transports: [
    new SlackHook({ 
      webhookUrl: "https://hooks.slack.com/services/xxx/xxx/xxx"
    })
  ]
});

'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.ts(7009)

image

Probably due to " "noImplicitAny": true, " in tsconfig.json. But I think the types are wrong, no?

@TheAppleFreak
Copy link
Owner

Yeah, looks like I made a mistake while writing the types. I'll take a closer look at this over the next day or two and get that all patched up. Thank you for bringing this to my attention!

@techieshark
Copy link
Author

Super, thanks!

@TheAppleFreak
Copy link
Owner

Alright, just published version 1.2.1 that has an updated typings file. Thank you once again for informing me of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants