Open HamedOsama opened 1 year ago
If I run multiple scrappers with different filters and push it all in array like this:
scraper.on(events.scraper.data, (data) => { jobs.push({ id: data.jobId, title: data.title, company: data.company, link: data.applyLink ? data.applyLink : data.link, logo: data.companyImgLink || '', deadline: data.date, skills: '', experience: '', });
In this case I can't access the experience which is filter I had already set but it does not exist on type 'IData'
const scrappers = queryArr.map((q) => { return [ { query: q, options: { ...options, filters: { ...filters, experience: [experienceLevelFilter.INTERNSHIP], } } }, { query: q, options: { ...options, filters: { ...filters, experience: [experienceLevelFilter.ENTRY_LEVEL], } } } ] })
IData type
export interface IData { query: string; location: string; jobId: string; jobIndex: number; // Job index during search, only useful for debug link: string; applyLink?: string; title: string; company: string; companyLink?: string; companyImgLink?: string; place: string; date: string; description: string; descriptionHTML: string; insights: string[]; }
If I run multiple scrappers with different filters and push it all in array like this:
In this case I can't access the experience which is filter I had already set but it does not exist on type 'IData'
IData type