1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Create types for model enums

This commit is contained in:
Chocobozzz 2017-06-16 10:36:18 +02:00
parent 70c065d64c
commit ee9e7b61f5
21 changed files with 89 additions and 29 deletions

View file

@ -2,7 +2,7 @@ import * as Sequelize from 'sequelize'
import * as Bluebird from 'bluebird'
// Don't use barrel, import just what we need
import { User as FormatedUser } from '../../../shared/models/user.model'
import { UserRole, User as FormatedUser } from '../../../shared/models/user.model'
export namespace UserMethods {
export type IsPasswordMatchCallback = (err: Error, same: boolean) => void
@ -51,7 +51,7 @@ export interface UserAttributes {
username: string
email: string
displayNSFW?: boolean
role: string
role: UserRole
}
export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance<UserAttributes> {