Browse Source

Bump `tslint-xo`

iss58
Sindre Sorhus 7 years ago
parent
commit
7114ab3bd1
  1. 2
      package.json
  2. 4
      source/lib/operators/not.ts

2
package.json

@ -59,7 +59,7 @@
"lodash.isequal": "^4.5.0", "lodash.isequal": "^4.5.0",
"nyc": "^11.2.1", "nyc": "^11.2.1",
"tslint": "^5.8.0", "tslint": "^5.8.0",
"tslint-xo": "^0.3.0", "tslint-xo": "^0.4.0",
"typedoc": "^0.9.0", "typedoc": "^0.9.0",
"typescript": "^2.6.2", "typescript": "^2.6.2",
"vali-date": "^1.0.0", "vali-date": "^1.0.0",

4
source/lib/operators/not.ts

@ -1,4 +1,4 @@
import {Predicate, Validator, validatorSymbol} from '../predicates/predicate'; import {Predicate, validatorSymbol} from '../predicates/predicate';
/** /**
* Operator which inverts all the validations. * Operator which inverts all the validations.
@ -7,7 +7,7 @@ import {Predicate, Validator, validatorSymbol} from '../predicates/predicate';
* @param predictate Predicate to wrap inside the operator. * @param predictate Predicate to wrap inside the operator.
*/ */
export const not = <T extends Predicate>(predicate: T) => { export const not = <T extends Predicate>(predicate: T) => {
predicate.addValidator = (validator: Validator<any>) => { predicate.addValidator = validator => {
const fn = validator.validator; const fn = validator.validator;
const message = validator.message; const message = validator.message;

Loading…
Cancel
Save