Closed MarkoH17 closed 3 years ago
Just to follow up on this - it appears that setting lang="ts"
on the main script tag of the example component triggers the same issue on the component:
Closing this issue, as I was able to solve the issue. I modified the declaration of FilePond
to include the type (VueFilePondComponent) - e.g:
const FilePond = vueFilePond(
FilePondPluginFileValidateType,
FilePondPluginImagePreview,
) as VueFilePondComponent;
Describe the bug Using vue-filepond doesn't work within Typescript components that export it using
defineComponent
.Logs Not applicable. See the Stacktraces section below.
To Reproduce tl;dr: Refer to the gist with the two modifications below.
Reproduce the issue using the example component in the repository:
lang="ts"
.export default { name:...};
toexport default defineComponent({ name: ...});
.Expected behavior The vue-filepond component works great with
export default { name: ... };
andexport default defineComponent({ name: ...});
. However, once the language of the component's script is changed to TypeScriptlang="ts"
, vue-filepond is unusable. Vue-Filepond should support Vue3 + TypeScript.Stacktraces
Error on line 74 for component registration
``` No overload matches this call. The last overload gave the following error. Type 'ComponentOptionsInformation about your project:
Application package versions: Vue 3.1.4, TypeScript: 4.1.5
Your operating system: macOS 11.5
FilePond versions: FilePond 4.28.2 and Vue-FilePond 7.0.0