Closed omrilotan closed 3 years ago
Using Typescript and Express, using the Request.get method interface returns string or undefined. This does not match the interface of isbot (string).
Accept undefined to allow simpler usage
undefined
Currently while using isbot(req.get('user-agent')) we have compilation exception
isbot(req.get('user-agent'))
Steps to reproduce
Using Typescript and Express, using the Request.get method interface returns string or undefined. This does not match the interface of isbot (string).
Expected behaviour
Accept
undefined
to allow simpler usageActual behaviour
Currently while using
isbot(req.get('user-agent'))
we have compilation exceptionAdditional details