1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 09:13:19 +01:00

window.umami typing

This commit is contained in:
Matthias Kretschmann 2022-11-20 20:10:45 +00:00
parent 2de52ab1bd
commit cfd6858f6e
2 changed files with 17 additions and 32 deletions

View File

@ -1,32 +0,0 @@
interface Dimensions {
dimension1?: string
dimension2?: string
dimension3?: string
dimension4?: string
dimension5?: string
dimension6?: string
dimension7?: string
dimension8?: string
dimension9?: string
dimension10?: string
}
declare global {
interface Window {
_paq?:
| (
| Dimensions
| number[]
| string[]
| number
| string
| null
| undefined
)[][]
| null
}
}
window._paq = window._paq || {}
export {}

17
src/@types/umami.d.ts vendored Normal file
View File

@ -0,0 +1,17 @@
declare global {
interface Window {
umami?: (eventName: string) => void | {
trackEvent: (
event_name: string,
event_data?: { [key: string]: string },
url?: string,
website_id?: string
) => void
trackView: (url: string, referrer?: string, website_id?: string) => void
}
}
}
window.umami = window.umami || {}
export {}