fix(core): update

This commit is contained in:
2018-12-11 01:36:14 +01:00
parent 2dfa96bbc5
commit fafd9867ad
7 changed files with 526 additions and 341 deletions

View File

@ -1,6 +1,6 @@
import * as plugins from './lik.plugins';
import { InterestMap, IInterestComparisonFunc} from './lik.interestmap';
import { InterestMap, IInterestComparisonFunc } from './lik.interestmap';
export class Interest<DTInterestId, DTInterestFullfillment> {
private interestMapRef: InterestMap<DTInterestId, DTInterestFullfillment>;
@ -21,7 +21,9 @@ export class Interest<DTInterestId, DTInterestFullfillment> {
return this.comparisonFunc(this.originalInterest);
}
private interestDeferred: plugins.smartpromise.Deferred<DTInterestFullfillment> = new plugins.smartpromise.Deferred();
private interestDeferred: plugins.smartpromise.Deferred<
DTInterestFullfillment
> = new plugins.smartpromise.Deferred();
public interestFullfilled = this.interestDeferred.promise;
/**
@ -73,4 +75,4 @@ export class Interest<DTInterestId, DTInterestFullfillment> {
public renew() {
this.destructionTimer.reset();
}
}
}

View File

@ -7,8 +7,6 @@ import { Interest } from './lik.interestmap.interest';
export type IInterestComparisonFunc<T> = (objectArg: T) => string;
export class InterestMap<DTInterestId, DTInterestFullfillment> {
/**
* stores interests that are currently fullfilled by the cache
@ -93,14 +91,13 @@ export class InterestMap<DTInterestId, DTInterestFullfillment> {
/**
* inform lost interest
* @param interestId
* @param interestId
*/
public informLostInterest (interestId: DTInterestId) {
public informLostInterest(interestId: DTInterestId) {
const wantedInterest = this.findInterest(interestId);
if (wantedInterest) {
wantedInterest.markLost();
}
}
/**

View File

@ -14,12 +14,7 @@ import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrx from '@pushrocks/smartrx';
import * as smarttime from '@pushrocks/smarttime';
export {
smartdelay,
smartpromise,
smartrx,
smarttime
};
export { smartdelay, smartpromise, smartrx, smarttime };
// ==============
// third party