mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.47k stars 1.14k forks source link

Property '$papa' does not exist on type #883

Open nishad-bdg opened 3 years ago

nishad-bdg commented 3 years ago

Typescript Property '$papa' does not exist on type. I have added import VuePapaParse from 'vue-papa-parse' Vue.use(VuePapaParse)

in the main.ts

but still getting the error while declared this.$papa.parse

janisdd commented 3 years ago

This issue is not related to papaparse. You can open an issue here: https://github.com/twickstrom/vue-papa-parse It seems that the vue plugin does not come with typescript support (.d.ts file). Maybe you can add the type yourself (something like https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation but I haven't tried type augmentation yet).

A quick and dirty fix would be (this.$papa as any).parse or use papaparse directly ;)