forked from MapComplete/MapComplete
More work on the opening hours picker
This commit is contained in:
parent
4d139b45e6
commit
6563298d16
15 changed files with 321 additions and 100 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue