"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeadlineValidator = void 0;
const integer_validator_1 = require("./integer.validator");
/**
 * Deadline validator
 */
class DeadlineValidator {
    /**
     * Validates if deadline(ms) is a non-negative integer.
     * @param {string} value - number.
     * @returns {true | string}
     */
    validate(value) {
        if (new integer_validator_1.IntegerStringValidator().validate(value) === true && Number.parseInt(value) > -1) {
            return true;
        }
        else {
            return 'Deadline(ms) should be a non-negative integer';
        }
    }
}
exports.DeadlineValidator = DeadlineValidator;
