fix: mark abstractModel and abstractService abstract

This commit is contained in:
Dominik Pschenitschni 2022-08-14 12:12:05 +02:00
parent 2445f0eec8
commit d36577c04e
No known key found for this signature in database
GPG key ID: B257AC0149F43A77
2 changed files with 3 additions and 3 deletions

View file

@ -3,10 +3,10 @@ import {omitBy, isNil} from '@/helpers/utils'
import type {Right} from '@/constants/rights' import type {Right} from '@/constants/rights'
export interface IAbstract { export interface IAbstract {
maxRight: Right | null maxRight: Right | null // FIXME: should this be readonly?
} }
export default class AbstractModel implements IAbstract { export default abstract class AbstractModel<Model extends IAbstract = IAbstract> implements IAbstract {
/** /**
* The max right the user has on this object, as returned by the x-max-right header from the api. * The max right the user has on this object, as returned by the x-max-right header from the api.

View file

@ -40,7 +40,7 @@ function prepareParams(params: Record<string, unknown | unknown[]>) {
return objectToSnakeCase(params) return objectToSnakeCase(params)
} }
export default class AbstractService<Model extends IAbstract = IAbstract> { export default abstract class AbstractService<Model extends IAbstract = IAbstract> {
///////////////////////////// /////////////////////////////
// Initial variable definitions // Initial variable definitions