diff --git a/src/main/entities/decorators/percent-check.ts b/src/main/entities/decorators/percent-check.ts index 3bfb05f..ec1efef 100644 --- a/src/main/entities/decorators/percent-check.ts +++ b/src/main/entities/decorators/percent-check.ts @@ -6,8 +6,7 @@ export const maxValue = Number.MAX_SAFE_INTEGER; /** * @param column the column which needs to be checked */ -// eslint-disable-next-line @typescript-eslint/ban-types -- the type would be "(classOrObject: object, propertyName: string) => object" but typeorm does not provide it -export function PercentCheck(column: string): Function { +export function PercentCheck(column: string): ClassDecorator & PropertyDecorator { return Check( `${column} needs to be between ${minValue} and ${maxValue}`, `${column} >= ${minValue} AND ${column} <= ${maxValue}`