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

@@ -26,16 +26,16 @@ export class FileUtils {
static flatten(folder: any): Promise<FileInfo[]> {
let reader = folder.createReader();
let files: FileInfo[] = [];
return new Promise(resolve => {
return new Promise((resolve) => {
let iterations = [];
(function traverse() {
reader.readEntries((entries) => {
if (!entries.length) {
Promise.all(iterations).then(result => resolve(files));
Promise.all(iterations).then(() => resolve(files));
} else {
iterations.push(Promise.all(entries.map(entry => {
iterations.push(Promise.all(entries.map((entry) => {
if (entry.isFile) {
return new Promise(resolveFile => {
return new Promise((resolveFile) => {
entry.file(function (file: File) {
files.push({
entry: entry,
@@ -46,7 +46,7 @@ export class FileUtils {
});
});
} else {
return FileUtils.flatten(entry).then(result => {
return FileUtils.flatten(entry).then((result) => {
files.push(...result);
});
}

View File

@@ -48,7 +48,7 @@ export class MomentDateAdapter extends DateAdapter<Moment> {
case 'short':
return this.localeData.monthsShort();
case 'narrow':
return this.localeData.monthsShort().map(month => month[0]);
return this.localeData.monthsShort().map((month) => month[0]);
default :
return;
}

View File

@@ -50,8 +50,8 @@ export class ObjectUtils {
static merge(...objects): any {
let result = {};
objects.forEach(source => {
Object.keys(source).forEach(prop => {
objects.forEach((source) => {
Object.keys(source).forEach((prop) => {
if (prop in result && Array.isArray(result[prop])) {
result[prop] = result[prop].concat(source[prop]);
} else if (prop in result && typeof result[prop] === 'object') {