apify / got-scraping

HTTP client made for scraping based on got.
422 stars 32 forks source link

Using gotScraping.extend results in incorrect type information #106

Closed lisxck closed 9 months ago

lisxck commented 9 months ago
import { gotScraping } from 'got-scraping';

const instance = gotScraping.extend();

const response = await instance.get('https://api.apify.com/v2/browser-info', {
    responseType: 'json',
    proxyUrl: 'proxy'
});
console.log(response.body);

I had no doubt that I could write something like this, but when I actually run this code in TypeScript, it prints an error due to type information.

I ran the same code in Javascript, but the only thing that is wrong is the type information because Proxy worked properly