Open haveamission opened 4 years ago
Facing the same issue.
Try installing types npm i -D @types/express-useragent
Facing same issue I tried creating a global types file as well and this doesn't solve it, neither does @narendra67 answer.
import express from "express"
export default interface IRequest extends express.Request {
useragent?: any;
}
Creating a separate file and importing it higher up solved this issue:
declare global {
namespace Express {
interface Request {
useragent?: any
}
}
}
Trying to use express-useragent with NodeJS/Express/TypeScript and getting this error.
Code: