Skip to content

Commit

Permalink
fix: fixed svelte typings, closes #4131
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobruni committed May 24, 2022
1 parent cd18a30 commit 27f1bdb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/svelte/src/index.d.ts
@@ -1,21 +1,21 @@
import type { SvelteComponentTyped } from "svelte";
import type { ISourceOptions, Engine, Container } from "tsparticles";
import type { ISourceOptions, Engine, Container } from "tsparticles-engine";

declare module "svelte-particles"
{
declare module "svelte-particles" {
type CustomEventWrapper<T> = {
[K in keyof T]: CustomEvent<T[K]>;
};
type ParticlesProps = {
options?: ISourceOptions;
url?: string;
id?: string;
particlesInit: (engine: Engine) => Promise<void>;
};
type ParticlesEvents = CustomEventWrapper<{
particlesInit: Engine;
particlesLoaded: {
particles?: Container;
};
}>;
export default class extends SvelteComponentTyped<ParticlesProps, ParticlesEvents, {}> {}
export default class extends SvelteComponentTyped<ParticlesProps, ParticlesEvents, {}> {
}
}

0 comments on commit 27f1bdb

Please sign in to comment.