minbrowser / min

A fast, minimal browser that protects your privacy
https://minbrowser.org/
Apache License 2.0
7.9k stars 704 forks source link

TS2538: Type 'string[]' cannot be used as an index type #2187

Open raphael10-collab opened 1 year ago

raphael10-collab commented 1 year ago

Here: https://github.com/minbrowser/min/blob/master/main/download.js#L69 we have

responseHeaders[Object.keys(details.responseHeaders).filter(k => k.toLowerCase() === 'content-type')]

So.... : inside [ ] should be of index type

But:

Object.keys(details.responseHeaders).filter(k => k.toLowerCase() === 'content-type') is of type string[]