Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'transform' does not exist in type 'PapaParseConfig'.ts #698

Closed
SalmaTofaily opened this issue Aug 13, 2019 · 1 comment
Closed

'transform' does not exist in type 'PapaParseConfig'.ts #698

SalmaTofaily opened this issue Aug 13, 2019 · 1 comment

Comments

@SalmaTofaily
Copy link

SalmaTofaily commented Aug 13, 2019

Argument of type '{ header: true; skipEmptyLines: true; dynamicTyping: true; transform: (value: any) => void; complete: (result: PapaParseResult) => void; }' is not assignable to parameter of type 'PapaParseConfig'.
Object literal may only specify known properties, and 'transform' does not exist in type 'PapaParseConfig'.ts(2345)

code:

this.papa.parse(this.fileSelected, { header:true, skipEmptyLines:true, dynamicTyping:true, transform: function (value) { } , complete: (result) => { console.log("papa parse complete."); //to json done console.log('Parsed: ', result);//todo display html //csv json parsing errors (in case count is not the same) if(result.errors.length!=0) { result.errors.forEach(element => { console.log("Papaparse>>csv parsing error of type: "+element.type+" ,code: "+element.code+" ,row: "+element.row+" , message: "+ element.message); }); } else validate(result.data); } });

@pokoli
Copy link
Collaborator

pokoli commented Sep 13, 2019

Currently the typescript defintions are managed here https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/papaparse So you should update them there.

See #545

@pokoli pokoli closed this as completed Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants