Using types declarations from the official @peertube/peertube-types package.
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import type { RegisterClientOptions } from '@peertube/peertube-types/client'
|
||||
import type { Video } from '@peertube/peertube-types'
|
||||
import { logger } from './logger'
|
||||
import { getIframeUri, UriOptions } from './uri'
|
||||
import { isAutoColorsAvailable } from 'shared/lib/autocolors'
|
||||
@ -10,7 +12,7 @@ interface ShareForm {
|
||||
autoColors?: HTMLInputElement
|
||||
}
|
||||
|
||||
async function shareChatUrl (registerOptions: RegisterOptions, settings: any, video: Video): Promise<void> {
|
||||
async function shareChatUrl (registerOptions: RegisterClientOptions, settings: any, video: Video): Promise<void> {
|
||||
const peertubeHelpers = registerOptions.peertubeHelpers
|
||||
|
||||
const [
|
||||
|
@ -1,3 +1,5 @@
|
||||
import type { RegisterClientOptions } from '@peertube/peertube-types/client'
|
||||
import type { Video } from '@peertube/peertube-types'
|
||||
import type { ChatType } from 'shared/lib/types'
|
||||
import { AutoColors, isAutoColorsAvailable } from 'shared/lib/autocolors'
|
||||
import { logger } from './logger'
|
||||
@ -9,7 +11,7 @@ interface UriOptions {
|
||||
permanent?: boolean
|
||||
}
|
||||
|
||||
function getBaseRoute ({ peertubeHelpers }: RegisterOptions, permanent: boolean = false): string {
|
||||
function getBaseRoute ({ peertubeHelpers }: RegisterClientOptions, permanent: boolean = false): string {
|
||||
if (permanent) {
|
||||
return '/plugins/livechat/router'
|
||||
}
|
||||
@ -23,7 +25,7 @@ function getBaseRoute ({ peertubeHelpers }: RegisterOptions, permanent: boolean
|
||||
}
|
||||
|
||||
function getIframeUri (
|
||||
registerOptions: RegisterOptions, settings: any, video: Video, uriOptions: UriOptions = {}
|
||||
registerOptions: RegisterClientOptions, settings: any, video: Video, uriOptions: UriOptions = {}
|
||||
): string | null {
|
||||
if (!settings) {
|
||||
logger.error('Settings are not initialized, too soon to compute the iframeUri')
|
||||
|
Reference in New Issue
Block a user