It is pretty easy to use helmet from pure js per documentation:
const express = require('express')
const helmet = require('helmet')
const app = express()
app.use(helmet())
But how can I use it from typescript? Typings file exports a bunch of stuff, one of which is helmet interface, which cannot be called as a function.. I can import it like this, but have no idea what to do next, what should I pass to app.use?
import * as helmet from 'helmet'
I have imported the latest version of both helmet and typings:
"@types/helmet": "0.0.43",
"helmet": "^3.18.0"