free-proxy icon indicating copy to clipboard operation
free-proxy copied to clipboard

typescript error in constructor definition

Open ericblade opened this issue 2 years ago • 0 comments

Documentation says to do this:

import ProxyList from 'free-proxy';
const proxyList = new ProxyList();

which results in this

image

works fine with a @ts-ignore but that's not really a good thing to be doing.

also, it's not clear why it's intended to be used in this fashion, as it performs a get() before doing any operations, so it's not like it needs to be constructed to maintain it's own internal cache or something (although i do see that there is a cache, it looks like it's not really implemented), and it could just be a module. of course, modules can implement their own internal things.

ericblade avatar Dec 29 '22 20:12 ericblade