Skip to content

Commit 670da78

Browse files
committed
refactor: Add ParticlesType
1 parent b3577d9 commit 670da78

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/vue/@types/confetti.d.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
declare module "vue-confetti/src/confetti.js";
22

3+
interface ConfettiInterface {
4+
start(opts: Partial<ConfettiConfig>): void,
5+
update(opts: Partial<ConfettiConfig>): void,
6+
stop(): void,
7+
}
8+
9+
enum ParticlesType {
10+
circle = "circle",
11+
rect = "rect",
12+
heart = "heart",
13+
image = "image",
14+
}
15+
316
interface ParticlesConfig {
4-
type : string,
17+
type : ParticlesType,
518
size : number,
619
dropRate : number,
720
colors : string[],
@@ -10,7 +23,7 @@ interface ParticlesConfig {
1023

1124
interface ConfettiConfig {
1225
particles : Partial<ParticlesConfig>[],
13-
defaultType : string,
26+
defaultType : ParticlesType,
1427
defaultSize : number,
1528
defaultDropRate : number,
1629
defaultColors : string[],

0 commit comments

Comments
 (0)