refactor: Moving to svelteless, added Jenkinsfile
Some checks failed
Gitea djledda.de/arne-drums/pipeline/head There was a failure building this commit
Some checks failed
Gitea djledda.de/arne-drums/pipeline/head There was a failure building this commit
This commit is contained in:
20
src/Store.ts
20
src/Store.ts
@@ -1,20 +0,0 @@
|
||||
import type BeatUnit from "./BeatUnit";
|
||||
import Beat, {BeatInitOptions} from "./Beat";
|
||||
|
||||
export default class Store {
|
||||
private beat: Beat;
|
||||
constructor(options: BeatInitOptions) {
|
||||
this.beat = new Beat(options);
|
||||
}
|
||||
|
||||
getBeat() {
|
||||
return this.beat;
|
||||
}
|
||||
|
||||
subscribeBeatUnit(schemaKey: string, index: number, callback: (unit: BeatUnit) => void): BeatUnit {
|
||||
this.beat.onUnitUpdate(() => {
|
||||
callback(this.beat.getUnit(schemaKey, index));
|
||||
});
|
||||
return this.beat.getUnit(schemaKey, index);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user