refactor: use new typescript types to to able to remove eslint-disable comment
This commit is contained in:
parent
2cd9531f3b
commit
8d91b5fb3c
|
@ -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}`
|
||||
|
|
Loading…
Reference in New Issue