Skip to content

Commit 5316df8

Browse files
cdupuisatomist-bot
authored andcommitted
Autofix: tslint
[atomist:generated] [atomist:autofix=tslint]
1 parent 4e0cf00 commit 5316df8

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lib/Ops.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export class Alt implements MatchingLogic {
149149

150150
constructor(a: any, b: any, ...matchers: any[]) {
151151
const matchObjects = [a, b].concat(matchers);
152-
this.matchers = matchObjects.map(m => toMatchingLogic(m));
152+
this.matchers = matchObjects.map(toMatchingLogic);
153153
}
154154

155155
// tslint:disable-next-line:member-ordering

lib/PatternMatch.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export abstract class PatternMatch {
4444
}
4545

4646
export function isPatternMatch(mpr: PatternMatch | DismatchReport): mpr is PatternMatch {
47-
return mpr != null && mpr !== undefined && (mpr as PatternMatch).$value !== undefined;
47+
return mpr != undefined && mpr !== undefined && (mpr as PatternMatch).$value !== undefined;
4848
}
4949

5050
/**
@@ -66,7 +66,7 @@ export abstract class TreePatternMatch extends PatternMatch {
6666
}
6767

6868
export function isTreePatternMatch(om: PatternMatch): om is TreePatternMatch {
69-
return om != null && (om as TreePatternMatch).submatches !== undefined;
69+
return om != undefined && (om as TreePatternMatch).submatches !== undefined;
7070
}
7171

7272
/**
@@ -82,7 +82,7 @@ export function isSpecialMember(name: string) {
8282

8383
function justTheData(match: object): any {
8484
if (Array.isArray(match)) {
85-
return match.map(m => justTheData(m));
85+
return match.map(justTheData);
8686
}
8787

8888
if (typeof match !== "object") {

lib/internal/MatcherPrinter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ function isConcat(ml: MatchingLogic): ml is Concat {
2727
export function print(ml: MatchingLogic): string {
2828
if (isConcat(ml)) {
2929
const matcherSteps: Matcher[] =
30-
ml.matchSteps.filter(s => isMatcher(s)).map(m => m as Matcher);
31-
return matcherSteps.map(s => print(s)).join(" ");
30+
ml.matchSteps.filter(isMatcher).map(m => m as Matcher);
31+
return matcherSteps.map(print).join(" ");
3232
} else if (isLiteral(ml)) {
3333
return ml.literal;
3434
} else if (isNamedMatcher(ml)) {

lib/matchers/Concat.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class Concat implements Concatenation, LazyMatchingLogic, WhiteSpaceHandl
161161
}
162162
}
163163
}
164-
this.firstMatcher = this.matchSteps.filter(s => isMatcher(s))[0] as Matcher;
164+
this.firstMatcher = this.matchSteps.filter(isMatcher)[0] as Matcher;
165165
}
166166
}
167167

0 commit comments

Comments
 (0)