Open cduff opened 19 hours ago
Library version 2.0.0
Describe the bug UAParser(req.headers) results in TypeScript compile error.
UAParser(req.headers)
To Reproduce Try following the withClientHints example from https://docs.uaparser.dev/intro/quick-start/using-node-js.html.
withClientHints
Expected behavior Compiling code.
Screenshots
Additional context
ua-parser-js
headers
Record<string, string>
req.headers
@types/node@22.9.1
IncomingHttpHeaders
NodeJS.Dict<string | string[]>
Library version 2.0.0
Describe the bug
UAParser(req.headers)
results in TypeScript compile error.To Reproduce Try following the
withClientHints
example from https://docs.uaparser.dev/intro/quick-start/using-node-js.html.Expected behavior Compiling code.
Screenshots
Additional context
ua-parser-js
definesheaders
with typeRecord<string, string>
.req.headers
from@types/node@22.9.1
has interfaceIncomingHttpHeaders
which extendsNodeJS.Dict<string | string[]>
.