Skip to content

Commit

Permalink
fix: fixed React/Preact/Inferno component properties/state definition,
Browse files Browse the repository at this point in the history
…closes #922
  • Loading branch information
matteobruni committed Oct 6, 2020
1 parent 0f67407 commit 6da46b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/inferno/index.d.ts
Expand Up @@ -4,7 +4,7 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="inferno" />
import type { IParticlesProps, ParticlesProps } from "./src/";
import type { IParticlesProps, IParticlesState, ParticlesProps } from "./src/";
import type { ISourceOptions } from "tsparticles";
import type { Component } from "inferno";

Expand All @@ -13,7 +13,7 @@ export type IParticlesParams = IParticlesProps;
export * from "tsparticles/dist/Enums";
export type { ISourceOptions, IParticlesProps, ParticlesProps };

type Particles = Component<IParticlesProps>;
type Particles = Component<IParticlesProps, IParticlesState>;

declare const Particles: Particles;

Expand Down
4 changes: 2 additions & 2 deletions components/preact/index.d.ts
Expand Up @@ -3,7 +3,7 @@
// Definitions by: Matteo Bruni <https://github.com/matteobruni>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { PureComponent } from "preact/compat";
import type { IParticlesProps, ParticlesProps } from "./src/";
import type { IParticlesProps, IParticlesState, ParticlesProps } from "./src/";
import type { ISourceOptions } from "tsparticles";

export type IParticlesParams = IParticlesProps;
Expand All @@ -12,7 +12,7 @@ export * from "tsparticles/dist/Enums";

export type { ISourceOptions, IParticlesProps, ParticlesProps };

type Particles = PureComponent<IParticlesProps>;
type Particles = PureComponent<IParticlesProps, IParticlesState>;

declare const Particles: Particles;

Expand Down
4 changes: 2 additions & 2 deletions components/react/index.d.ts
Expand Up @@ -5,7 +5,7 @@

/// <reference types="react" />
import { ComponentClass } from "react";
import type { IParticlesProps, ParticlesProps } from "./src/";
import type { IParticlesProps, IParticlesState, ParticlesProps } from "./src/";
import type { ISourceOptions } from "tsparticles";

export type IParticlesParams = IParticlesProps;
Expand All @@ -14,7 +14,7 @@ export * from "tsparticles/dist/Enums";

export { ISourceOptions, IParticlesProps, ParticlesProps };

type Particles = ComponentClass<IParticlesProps>;
type Particles = ComponentClass<IParticlesProps, IParticlesState>;

declare const Particles: Particles;

Expand Down

0 comments on commit 6da46b2

Please sign in to comment.