-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
types.ts
54 lines (46 loc) · 1.11 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import type { ParsedContent } from "@nuxt/content/dist/runtime/types/index.js"
type ParsedContentPreview = Omit<ParsedContent, 'body' | 'excerpt'>
type TalkBase = {
title: string
eventName?: string
location?: string
date: string
eventUrl?: string
slidesUrl?: string
videoUrl?: string
podcastUrl?: string
type: 'talk' | 'podcast'
topics: string[]
}
export type Talk = TalkBase & ParsedContent
export type TalkPreview = TalkBase & ParsedContentPreview
type ArticleBase = {
title: string
dateModified: string,
datePublished: string,
imageSrc?: string,
imageAlt?: string,
topics: string[]
}
export type Article = ArticleBase & ParsedContent
export type ArticlePreview = ArticleBase & ParsedContentPreview
type BodyBlockLink = {
type: 'link',
href: string,
text?: string
}
type BodyBlockText = {
type: 'text',
text: string
}
type BodyBlock = BodyBlockLink | BodyBlockText
export type AppNotification = {
id: string
heading: string
body: string | BodyBlock[],
/** Set it to 0 to always show */
durationInMs?: number,
iconName?: string
iconClass?: string,
onRemove?: () => void
}