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

File diff suppressed because it is too large Load Diff

View File

@ -1403,7 +1403,7 @@ namespace ts.tscWatch {
writeFileSpy1
.verify(_ => _("/a/b/projects/myProject/dist/file1.js", file1Output, Arg.any()), Times.once())
.verify(_ => _("/a/b/projects/myProject/dist/file2.js", file2Output, Arg.any()), Times.once())
.verify(_ => _(Arg.nor("/a/b/projects/myProject/dist/file1.js", "/a/b/projects/myProject/dist/file2.js"), Arg.string(), Arg.any()), Times.none())
.verify(_ => _(Arg.not(Arg.or("/a/b/projects/myProject/dist/file1.js", "/a/b/projects/myProject/dist/file2.js")), Arg.string(), Arg.any()), Times.none())
.revoke();
// spy on calls to writeFile when triggering synchronization