##// END OF EJS Templates
Added childContainer service to container services, ServiceContaier is destroyable, fixed browser Uuid version
Added childContainer service to container services, ServiceContaier is destroyable, fixed browser Uuid version

File last commit:

r115:691199f665e0 ioc ts support
r146:f3f5c56d3b3e v1.4.0-rc5 default
Show More
ObservableValue.ts
35 lines | 816 B | video/mp2t | TypeScriptLexer
/ src / main / ts / ObservableValue.ts
cin
Added ObservableValue...
r80 import { Observable } from "./Observable";
import { IDestroyable } from "./interfaces";
import { argumentNotNull } from "./safe";
type Handler<T> = (x: T) => void;
export class ObservableValue<T> extends Observable<T> {
private _value: T;
constructor(initial: T) {
super();
this._value = initial;
}
getValue() {
return this._value;
}
setValue(value: T) {
cin
corrected code to support ts strict mode...
r115 if (this._value !== value) {
this._value = value;
this._notifyNext(value);
}
cin
Added ObservableValue...
r80 }
on(next: Handler<T>, error?: Handler<any>, complete?: () => void): IDestroyable {
argumentNotNull(next, "next");
try {
next(this._value);
} catch {
// suppress error
}
return super.on(next, error, complete);
}
}