More work on the opening hours picker

This commit is contained in:
Pieter Vander Vennet 2020-10-06 01:37:02 +02:00
parent 4d139b45e6
commit 6563298d16
15 changed files with 321 additions and 100 deletions

View file

@ -9,6 +9,10 @@ export class UIEventSource<T>{
public addCallback(callback: ((latestData: T) => void)): UIEventSource<T> {
if(callback === console.log){
// This ^^^ actually works!
throw "Don't add console.log directly as a callback - you'll won't be able to find it afterwards. Wrap it in a lambda instead."
}
this._callbacks.push(callback);
return this;
}