mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
tslint arrow-parens rule (#4003)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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') {
|
||||
|
Reference in New Issue
Block a user