mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-622] No implicit returns (#5157)
* enable noImplicitReturns rule * type fixes * fix return types * fix return value * fix tests * fix visibility service * update tests * add missing types * fix test
This commit is contained in:
@@ -249,7 +249,7 @@ export class WidgetVisibilityService {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
evaluateLogicalOperation(logicOp, previousValue, newValue): boolean {
|
||||
evaluateLogicalOperation(logicOp: string, previousValue: any, newValue: any): boolean | undefined {
|
||||
switch (logicOp) {
|
||||
case 'and':
|
||||
return previousValue && newValue;
|
||||
@@ -260,12 +260,12 @@ export class WidgetVisibilityService {
|
||||
case 'or-not':
|
||||
return previousValue || !newValue;
|
||||
default:
|
||||
this.logService.error('NO valid operation! wrong op request : ' + logicOp);
|
||||
break;
|
||||
this.logService.error(`Invalid operator: ${logicOp}`);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
evaluateCondition(leftValue, rightValue, operator): boolean {
|
||||
evaluateCondition(leftValue: any, rightValue: any, operator: string): boolean | undefined {
|
||||
switch (operator) {
|
||||
case '==':
|
||||
return leftValue + '' === rightValue + '';
|
||||
@@ -284,10 +284,9 @@ export class WidgetVisibilityService {
|
||||
case '!empty':
|
||||
return leftValue ? leftValue !== '' : false;
|
||||
default:
|
||||
this.logService.error('NO valid operation!');
|
||||
break;
|
||||
this.logService.error(`Invalid operator: ${operator}`);
|
||||
return undefined;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
cleanProcessVariable() {
|
||||
|
Reference in New Issue
Block a user