Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
Mecanografiado papaparse Ninguna sobrecarga coincide con esta llamada

Uso Papaparse lib en mecanografiado.

 import Papa from 'papaparse'; Papa.parse(filePath, { download: true, header: true, dynamicTyping: true, skipEmptyLines: true, };

filepath de archivo es string

Recibo un error en filePath:

 No overload matches this call. The last overload generated the following error. The 'string' type argument is not assignable to the 'unique symbol' type parameter.

En @types/papaparse , hay

 /** * Parse local files * @param file a File object obtained from the DOM. * @param config a config object which contains a callback. * @returns Doesn't return anything. Results are provided asynchronously to a callback function. */ // tslint:disable-next-line: no-unnecessary-generics export function parse<T, TFile extends LocalFile = LocalFile>(file: TFile, config: ParseLocalConfig<T, TFile>): void; /** * Parse remote files * @param url the path or URL to the file to download. * @param config a config object. * @returns Doesn't return anything. Results are provided asynchronously to a callback function. */ // tslint:disable-next-line: no-unnecessary-generics export function parse<T>(url: string, config: ParseRemoteConfig<T>): void;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Agregué la función complete y actualicé mi código así:

 import { parse, ParseResult } from 'papaparse'; parse(filePath, { download: true, header: true, dynamicTyping: true, skipEmptyLines: true, complete: function (results: ParseResult<Record<string, unknown>>) { /* ...code stuff... */ } };

y funciona. gracias

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!