exadel-inc/esl

View on GitHub
packages/esl/src/esl-utils/async/promise/defered.ts

Summary

Maintainability
A
1 hr
Test Coverage

Showing 2 of 2 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

public resolve(arg: T): Deferred<T> {
if (this._status === 'pending') {
this._value = arg;
this._status = 'resolved';
this._callbacks && this._callbacks[0](arg);
Severity: Minor
Found in packages/esl/src/esl-utils/async/promise/defered.ts and 1 other location - About 50 mins to fix
packages/esl/src/esl-utils/async/promise/defered.ts on lines 30..37

Similar blocks of code found in 2 locations. Consider refactoring.
Open

public reject(arg?: any): Deferred<T> {
if (this._status === 'pending') {
this._value = arg;
this._status = 'rejected';
this._callbacks && this._callbacks[1](arg);
Severity: Minor
Found in packages/esl/src/esl-utils/async/promise/defered.ts and 1 other location - About 50 mins to fix
packages/esl/src/esl-utils/async/promise/defered.ts on lines 20..27
Category
Status