1
0
Fork 0
peertube/shared/models/plugins/server/plugin-constant-manager.model.ts
lutangar dc3d902234 Introduce generic video constant manager for plugins
Allow a plugin developer to get back constants values,
and reset constants deletions or additions.
2021-07-16 17:49:40 +02:00

7 lines
261 B
TypeScript

export interface ConstantManager <K extends string | number> {
addConstant: (key: K, label: string) => boolean
deleteConstant: (key: K) => boolean
getConstantValue: (key: K) => string
getConstants: () => Record<K, string>
resetConstants: () => void
}