Moving peertube definition files to @types directory.

This commit is contained in:
John Livingston
2021-04-12 16:41:18 +02:00
parent f0fc7148aa
commit 6bc1f66cf1
2 changed files with 0 additions and 0 deletions

42
client/@types/peertube.d.ts vendored Normal file
View File

@ -0,0 +1,42 @@
// TODO: import @types/peertube when available
interface RegisterClientHookOptions {
target: string // FIXME
handler: Function
priority?: number
}
interface RegisterClientHelpers {
getBaseStaticRoute: () => string
isLoggedIn: () => boolean
getSettings: () => Promise<{ [ name: string ]: string }>
notifier: {
info: (text: string, title?: string, timeout?: number) => void
error: (text: string, title?: string, timeout?: number) => void
success: (text: string, title?: string, timeout?: number) => void
}
showModal: (input: {
title: string
content: string
close?: boolean
cancel?: { value: string, action?: () => void }
confirm?: { value: string, action?: () => void }
}) => void
markdownRenderer: {
textMarkdownToHTML: (textMarkdown: string) => Promise<string>
enhancedMarkdownToHTML: (enhancedMarkdown: string) => Promise<string>
}
translate: (toTranslate: string) => Promise<string>
}
interface RegisterOptions {
registerHook: (options: RegisterClientHookOptions) => void
peertubeHelpers: RegisterClientHelpers
}
interface Video {
isLive: boolean
isLocal: boolean
originInstanceUrl: string
uuid: string
}