Huge refactoring of the feature pipeline, WIP

This commit is contained in:
Pieter Vander Vennet 2021-09-20 17:14:55 +02:00
parent 7793297348
commit 973b5d8bbe
25 changed files with 522 additions and 591 deletions

View file

@ -1,19 +0,0 @@
import FeatureSource from "./FeatureSource";
import {UIEventSource} from "../UIEventSource";
import State from "../../State";
export default class RegisteringFeatureSource implements FeatureSource {
public readonly features: UIEventSource<{ feature: any; freshness: Date }[]>;
public readonly name;
constructor(source: FeatureSource) {
this.features = source.features;
this.name = "RegisteringSource of " + source.name;
this.features.addCallbackAndRunD(features => {
for (const feature of features) {
State.state.allElements.addOrGetElement(feature.feature)
}
})
}
}