From d5e73f8a2e6595ce0bd2bd1f60bb9eda5e3d19d0 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sat, 16 Jul 2022 13:30:54 -0700 Subject: [PATCH 01/18] fix: Fix enum usage --- src/web/assets/src/vue/@types/confetti.d.ts | 42 +++++++++++---------- src/web/assets/src/vue/ConfettiParty.vue | 5 ++- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/web/assets/src/vue/@types/confetti.d.ts b/src/web/assets/src/vue/@types/confetti.d.ts index 70c2c7b..e9cc6e9 100644 --- a/src/web/assets/src/vue/@types/confetti.d.ts +++ b/src/web/assets/src/vue/@types/confetti.d.ts @@ -1,32 +1,34 @@ declare module "vue-confetti/src/confetti.js"; interface ConfettiInterface { - start(opts: Partial): void, - update(opts: Partial): void, - stop(): void, + start(opts: Partial): void, + + update(opts: Partial): void, + + stop(): void, } -enum ParticlesType { - circle = "circle", - rect = "rect", - heart = "heart", - image = "image", +export enum ParticlesType { + circle = "circle", + rect = "rect", + heart = "heart", + image = "image", } interface ParticlesConfig { - type : ParticlesType, - size : number, - dropRate : number, - colors : string[], - url : string | null, + type: ParticlesType, + size: number, + dropRate: number, + colors: string[], + url: string | null, } interface ConfettiConfig { - particles : Partial[], - defaultType : ParticlesType, - defaultSize : number, - defaultDropRate : number, - defaultColors : string[], - canvasId : number, - particlesPerFrame : number, + particles: Partial[], + defaultType: ParticlesType, + defaultSize: number, + defaultDropRate: number, + defaultColors: string[], + canvasId: number, + particlesPerFrame: number, } diff --git a/src/web/assets/src/vue/ConfettiParty.vue b/src/web/assets/src/vue/ConfettiParty.vue index 991b253..28d766a 100644 --- a/src/web/assets/src/vue/ConfettiParty.vue +++ b/src/web/assets/src/vue/ConfettiParty.vue @@ -3,11 +3,12 @@