Closed Sodininkas closed 4 years ago
I find that they haven't @types/projecrt, so how can we use it with vue/typescript?
You can use a quick workaround by creating a new file in your project's root directory:
// vue-particles.d.ts
declare module "vue-particles" {
let VueParticles: any;
export = VueParticles;
}
You can use a quick workaround by creating a new file in your project's root directory:
// vue-particles.d.ts declare module "vue-particles" { let VueParticles: any; export = VueParticles; }
@idaviddesmet Could you be a little more specific on your solution? I'm running into the same issue.
@musicteachj sure! You create a new file named vue-particles.d.ts
(or any other name, it must end with .d.ts
) in your root directory (next to your package.json
, tsconfig.json
...) and that’s it. 😉
@idaviddesmet thank you for your response! It looks like I didn't need the .d.ts file after all (they must have updated the lib to not need it), it turns out I was missing the root tag with the id="app" attribute. I am using Vuetify, the installation deletes this tag when adding it to a Vue CLI creation.
How to run vue-particles with typescript?