Better peertube definitions.
This commit is contained in:
parent
c215a3f97c
commit
0edc81ec62
35
client/peertube.d.ts
vendored
35
client/peertube.d.ts
vendored
@ -1,6 +1,37 @@
|
||||
// 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: any
|
||||
peertubeHelpers: any
|
||||
registerHook: (options: RegisterClientHookOptions) => void
|
||||
peertubeHelpers: RegisterClientHelpers
|
||||
}
|
||||
|
||||
interface Video {
|
||||
|
Loading…
x
Reference in New Issue
Block a user