mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
refactor(canvas-confetti): add typing
This commit is contained in:
parent
dd8b8a4906
commit
a9833d256e
2 changed files with 5 additions and 1 deletions
|
|
@ -21,3 +21,5 @@ interface Shape {
|
|||
matrix: DOMMatrix;
|
||||
bitmap?: ImageBitmap;
|
||||
}
|
||||
|
||||
export type CanvasConfetti = (props: ConfettiConfig) => Promise<void> | null;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ export class ConfettiService {
|
|||
private readonly _configService = inject(GlobalConfigService);
|
||||
|
||||
async createConfetti(props: ConfettiConfig): Promise<void> {
|
||||
if (this._configService.misc()?.isDisableAnimations) {
|
||||
const misc = this._configService.misc();
|
||||
|
||||
if (misc && misc.isDisableAnimations) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue