tslint arrow-parens rule (#4003)

This commit is contained in:
Eugenio Romano
2018-11-23 01:06:56 +00:00
committed by GitHub
parent 51bb6a420f
commit 34a30c0f14
194 changed files with 725 additions and 723 deletions

View File

@@ -50,7 +50,7 @@ export abstract class CardViewBaseItemModel {
}
return this.validators
.map(validator => validator.isValid(newValue))
.map((validator) => validator.isValid(newValue))
.reduce((isValidUntilNow, isValid) => isValidUntilNow && isValid, true);
}
@@ -59,6 +59,6 @@ export abstract class CardViewBaseItemModel {
return [];
}
return this.validators.filter(validator => !validator.isValid(value)).map(validator => validator.message);
return this.validators.filter((validator) => !validator.isValid(value)).map((validator) => validator.message);
}
}

View File

@@ -38,7 +38,7 @@ describe('CardViewSelectItemModel', () => {
it('should return the value if it is present', async(() => {
const itemModel = new CardViewSelectItemModel(properties);
itemModel.displayValue.subscribe(value => {
itemModel.displayValue.subscribe((value) => {
expect(value).toBe(mockData[1].label);
});
}));

View File

@@ -34,8 +34,8 @@ export class CardViewSelectItemModel<T> extends CardViewBaseItemModel implements
get displayValue() {
return this.options$.pipe(
switchMap(options => {
const option = options.find(o => o.key === this.value);
switchMap((options) => {
const option = options.find((o) => o.key === this.value);
return of(option ? option.label : '');
})
);