peertube-plugin-livechat/server/lib/diagnostic/utils.ts

28 lines
505 B
TypeScript
Raw Normal View History

type nextValue = 'backend' | 'webchat-video' | 'prosody'
2021-05-02 14:16:19 +00:00
interface MessageWithLevel {
level: 'info' | 'warning' | 'error'
message: string
}
export interface TestResult {
label?: string
2021-05-02 14:16:19 +00:00
messages: Array<string | MessageWithLevel>
2021-04-14 14:14:56 +00:00
debug: Array<{
title: string
message: string
}>
next: nextValue | null
ok: boolean
test: string
}
export function newResult (test: string): TestResult {
return {
test: test,
ok: false,
messages: [],
2021-04-14 14:14:56 +00:00
debug: [],
next: null
}
}