-
Notifications
You must be signed in to change notification settings - Fork 6
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
Typescript 4.8.4 shows an error in IDE #3
Comments
Facing same issue here. Works on browser, but |
Same here... Any good news? |
Hi, I found the solution for this error. Just turn off TS and use JS. Here is my config: tsconfig.json
Create a SFC to wrap the Confetti component and only use Confetti.vue
and thats all, let me know if this solution work for you |
You can use <template>
<component :is="ConfettiExplosion"/>
</template>
<script setup lang="ts">
import ConfettiExplosion from "vue-confetti-explosion";
</script> |
The issue happens because TS is not being used to define the type of the different props, despite the setup script being used for the component having A patch that wouldn't require disabling typescript entirely for the project is to simply create a vue-confetti-explosion.d.ts declare module 'vue-confetti-explosion' {
import { DefineComponent } from 'vue';
const ConfettiExplosion: DefineComponent<{}, {}, any>;
export default ConfettiExplosion;
} Ideally, this library should be updated to use the composition API to define the component and properly use Typescript to define the prop typing with |
Any news on this? |
@Psycarlo Idk if he's gonna update it, but my forked version works |
If still relevant: I switched over to https://github.com/PuruVJ/neoconfetti, since its close to a 1:1 replacement, but without those typescript issues |
Using the basic setup:
I get the following usage error on template: (it was working fine until today)
Relevant dependencies:
One last thing: the project compiles correctly, the above error appears only in IDE (VS Code with Volar extension)
The text was updated successfully, but these errors were encountered: