Move types to global app file
This commit is contained in:
52
src/app.d.ts
vendored
52
src/app.d.ts
vendored
@@ -34,3 +34,55 @@ declare type PhotoGridAbout = {
|
||||
title: string
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Notifcation
|
||||
*/
|
||||
declare interface Notification {
|
||||
title: string
|
||||
name: string
|
||||
image: string
|
||||
timeout?: number
|
||||
id?: number
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Smooth Scroll Options
|
||||
*/
|
||||
declare interface smoothScrollOptions {
|
||||
hash: string
|
||||
changeHash?: boolean
|
||||
event?: MouseEvent
|
||||
callback?: Function
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Swipe options
|
||||
*/
|
||||
interface SwipeOptions {
|
||||
travelX?: number
|
||||
travelY?: number
|
||||
timeframe?: number
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reveal Animation
|
||||
*/
|
||||
declare interface RevealOptions {
|
||||
enable?: boolean
|
||||
options?: TransitionOptions
|
||||
children?: string | HTMLElement
|
||||
animation: any
|
||||
}
|
||||
// Options interface
|
||||
declare interface TransitionOptions {
|
||||
threshold?: number
|
||||
duration?: number
|
||||
stagger?: number
|
||||
delay?: number
|
||||
easing?: any
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { easeInOutQuart } from './easing'
|
||||
import { quartInOutFunc } from '$animations/easings'
|
||||
|
||||
|
||||
/**
|
||||
@@ -200,9 +200,3 @@ export const smoothScroll = async ({ hash, callback, changeHash = true, event }:
|
||||
callback && callback()
|
||||
})
|
||||
}
|
||||
type smoothScrollOptions = {
|
||||
hash: string
|
||||
changeHash?: boolean
|
||||
event?: MouseEvent
|
||||
callback?: Function
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -84,13 +84,3 @@ export const swipe = (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Types
|
||||
*/
|
||||
interface SwipeOptions {
|
||||
travelX?: number
|
||||
travelY?: number
|
||||
timeframe?: number
|
||||
}
|
||||
Reference in New Issue
Block a user