mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 16:10:06 -06:00
Fix lint errors
This commit is contained in:
parent
c87b7252b6
commit
6b53d38a8f
@ -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
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user