question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No Typescript types for react-tsparticles

See original GitHub issue

When importing the particle component as described in the docs:

import Particles from "react-tsparticles";

I don’t get any types for the props of the component. I can however import like the following:

import Particles, {IParticlesParams} from "react-tsparticles";

and then use those types for the options, but it’s not ideal.

Typescript Version: 4.0.3 react-tsparticles Version: 1.17.22

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
matteobrunicommented, Oct 7, 2020

I’ve done more tests with VSCode, the demo project inside this repository was working fine, but I’ve found some tricks to make it work for other projects by adding some JSDoc comments.

I’ll release it later today with the fix, this should be the definitive solution (at least I hope it is)

1reaction
BjoernRavecommented, Oct 6, 2020

@matteobruni Great, thanks alot for that 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-tsparticles - npm
Official tsParticles React Component - Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds ...
Read more >
tsParticles - v2.6.0 - JS.ORG
A lightweight TypeScript library for creating particles. Dependency free (*), browser ready and compatible with React.js, Vue.js (2.x and 3.x), Angular, ...
Read more >
reactjs - Module not found: Can't resolve 'tsparticles' in '/home ...
I think this time its working fine. Here is my Particle component. import React from 'react' import Particles ...
Read more >
react-particles-js - npm Package Health Analysis - Snyk
Since this library is not actively maintained, it has been deprecated in favor of react-tsparticles which shares the same core functionality of this...
Read more >
tsParticles React and Vue packages are changing!
Starting from today the official tsParticles React.js and Vue.js ... react-particles , starting from 2.1.3 , no different version numbers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found