Move types to global app file

This commit is contained in:
2022-08-13 23:38:06 +02:00
parent f688928757
commit 222db0c478
4 changed files with 54 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
import { easeInOutQuart } from './easing'
import { quartInOutFunc } from '$animations/easings'
/**
@@ -32,7 +32,7 @@ export const debounce = (func: Function, timeout: number) => {
* @description Split a string into words or characters
* @returns string[]
*/
export const splitText = (text: string, mode: string = 'words'): string[] => {
export const splitText = (text: string, mode: string = 'words'): string[] => {
// Split by words
if (mode === 'words') {
const words = text
@@ -199,10 +199,4 @@ export const smoothScroll = async ({ hash, callback, changeHash = true, event }:
if (changeHash) location.hash = hash
callback && callback()
})
}
type smoothScrollOptions = {
hash: string
changeHash?: boolean
event?: MouseEvent
callback?: Function
}

View File

@@ -1,13 +1,5 @@
import { cartNotifications } from '$utils/stores/shop'
interface Notification {
title: string
name: string
image: string
timeout?: number
id?: number
}
/**
* Add a notification