Fix lint errors

This commit is contained in:
Ron Buckton
2017-12-19 17:35:20 -08:00
parent c87b7252b6
commit 6b53d38a8f
3 changed files with 155 additions and 186 deletions

View File

@@ -216,14 +216,6 @@ export class Arg {
return <any>new Arg(value => conditions.every(condition => condition._validate(value)), conditions.map(condition => condition._message).join(" and "));
}
/**
* Combines conditions, where no condition may be `true`.
*/
public static nand<T = any>(...args: ((T & Arg) | T)[]): T & Arg {
const conditions = args.map(Arg.from);
return <any>new Arg(value => !conditions.every(condition => condition._validate(value)), "not " + conditions.map(condition => condition._message).join(" and "));
}
/**
* Combines conditions, where any conditions may be `true`.
*/
@@ -232,14 +224,6 @@ export class Arg {
return <any>new Arg(value => conditions.some(condition => condition._validate(value)), conditions.map(condition => condition._message).join(" or "));
}
/**
* Combines conditions, where all conditions must be `true`.
*/
public static nor<T = any>(...args: ((T & Arg) | T)[]): T & Arg {
const conditions = args.map(Arg.from);
return <any>new Arg(value => !conditions.some(condition => condition._validate(value)), "neither " + conditions.map(condition => condition._message).join(" nor "));
}
/**
* Ensures the value is a `Condition`
* @param value The value to coerce