From be0c58c744e0491a1dd59153547cdc8b2765104e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Tue, 26 Jul 2022 23:42:41 +0200 Subject: [PATCH] Code cleanup and add types on stores --- src/utils/functions/index.ts | 2 +- src/utils/stores/index.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/functions/index.ts b/src/utils/functions/index.ts index 4d992cc..3cafec7 100644 --- a/src/utils/functions/index.ts +++ b/src/utils/functions/index.ts @@ -62,7 +62,7 @@ export const capitalizeFirstLetter = (string: string) => { /** * Create a delay */ -export function sleep (milliseconds: number) { +export const sleep = (milliseconds: number) => { return new Promise(resolve => setTimeout(resolve, milliseconds)) } diff --git a/src/utils/stores/index.ts b/src/utils/stores/index.ts index 223e573..f3d1026 100644 --- a/src/utils/stores/index.ts +++ b/src/utils/stores/index.ts @@ -1,4 +1,4 @@ -import { writable } from 'svelte/store' +import { writable, type Writable } from 'svelte/store' -export const pageLoading = writable(false) -export const previousPage = writable('') \ No newline at end of file +export const pageLoading: Writable = writable(false) +export const previousPage: Writable = writable('') \ No newline at end of file