-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
The provided typescript usage produces a typescript error:
import * as basicAuth from 'express-basic-auth'
app.use(basicAuth(options), (req: basicAuth.IBasicAuthedRequest, res, next) => {
res.end(`Welcome ${req.auth.user} (your password is ${req.auth.password})`)
next()
})
Produces this error:
This expression is not callable.
Type 'typeof expressBasicAuth' has no call signatures.ts(2349)
service.ts(6, 1): Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.
stephanschielke, DarkLite1, crasu, pierresh, damirsehic and 2 morequaos
Metadata
Metadata
Assignees
Labels
No labels