winston-cloudwatch icon indicating copy to clipboard operation
winston-cloudwatch copied to clipboard

Document the mandatory `name` constructor option

Open timotheeg opened this issue 4 years ago • 2 comments
trafficstars

Hi there,

The typescript definition states name is mandatory as a constructor option, but the construction samples in the readme do not use it, which is a little confusing.

In the readme, name is listed as name - string with no indication of what it is for or that it is mandatory.

This is causing typescript compilation failure on code that was previously working, so documentation to know how to proceed would be great :)

Thank you!

timotheeg avatar Sep 02 '21 02:09 timotheeg

Plus it looks like the constructor supplies a default value, so I'm not sure why the parameter is mandatory in the typescript definition? https://github.com/lazywithclass/winston-cloudwatch/blob/d77124fbba1a5986605e805c62938549aa7e1ad3/index.js#L17

timotheeg avatar Sep 02 '21 02:09 timotheeg

I should put that as optional, I cannot remember why this name attribute is there to be honest with you, I believe it was being used in an older version of the package. I will have a look at this and then push out a fix as it seems trivial.

lazywithclass avatar Sep 07 '21 21:09 lazywithclass