tooot/src/@types/react-navigation.d.ts

102 lines
2.7 KiB
TypeScript
Raw Normal View History

2021-01-07 22:18:14 +01:00
declare namespace Nav {
type RootStackParamList = {
'Screen-Local': undefined
'Screen-Public': undefined
'Screen-Post': undefined
'Screen-Notifications': undefined
'Screen-Me': undefined
}
type SharedStackParamList = {
'Screen-Shared-Account': {
2021-01-24 02:25:43 +01:00
account: Mastodon.Account | Mastodon.Mention
2021-01-07 22:18:14 +01:00
}
'Screen-Shared-Announcements': { showAll?: boolean }
2021-01-16 00:00:31 +01:00
'Screen-Shared-Attachments': { account: Mastodon.Account }
2021-01-07 22:18:14 +01:00
'Screen-Shared-Compose':
| {
2021-01-24 02:25:43 +01:00
type: 'edit'
2021-01-07 22:18:14 +01:00
incomingStatus: Mastodon.Status
2021-01-14 22:53:01 +01:00
queryKey?: [
'Timeline',
{
page: App.Pages
hashtag?: Mastodon.Tag['name']
list?: Mastodon.List['id']
toot?: Mastodon.Status['id']
account?: Mastodon.Account['id']
}
]
2021-01-07 22:18:14 +01:00
}
2021-01-24 02:25:43 +01:00
| {
type: 'reply'
incomingStatus: Mastodon.Status
accts: Mastodon.Account['acct'][]
queryKey?: [
'Timeline',
{
page: App.Pages
hashtag?: Mastodon.Tag['name']
list?: Mastodon.List['id']
toot?: Mastodon.Status['id']
account?: Mastodon.Account['id']
}
]
}
| {
type: 'conversation'
accts: Mastodon.Account['acct'][]
}
2021-01-07 22:18:14 +01:00
| undefined
'Screen-Shared-Hashtag': {
hashtag: Mastodon.Tag['name']
}
'Screen-Shared-ImagesViewer': {
2021-01-23 02:41:50 +01:00
imageUrls: ({
url: string
width?: number
height?: number
originUrl?: string
props?: any
} & {
2021-01-07 22:18:14 +01:00
preview_url: Mastodon.AttachmentImage['preview_url']
remote_url: Mastodon.AttachmentImage['remote_url']
imageIndex: number
})[]
imageIndex: number
}
'Screen-Shared-Relationships': {
account: Mastodon.Account
initialType: 'following' | 'followers'
}
'Screen-Shared-Search': undefined
'Screen-Shared-Toot': {
toot: Mastodon.Status
}
}
type LocalStackParamList = {
'Screen-Local-Root': undefined
} & SharedStackParamList
type RemoteStackParamList = {
'Screen-Remote-Root': undefined
} & SharedStackParamList
type NotificationsStackParamList = {
'Screen-Notifications-Root': undefined
} & SharedStackParamList
type MeStackParamList = {
2021-01-12 00:12:44 +01:00
'Screen-Me-Root': { navigateAway?: 'Screen-Me-Settings-UpdateRemote' }
2021-01-07 22:18:14 +01:00
'Screen-Me-Bookmarks': undefined
'Screen-Me-Conversations': undefined
'Screen-Me-Favourites': undefined
'Screen-Me-Lists': undefined
'Screen-Me-Lists-List': undefined
'Screen-Me-Settings': undefined
'Screen-Me-Settings-UpdateRemote': undefined
'Screen-Me-Switch': undefined
} & SharedStackParamList
}