##// END OF EJS Templates
added provided and configure methods to the fluent container configuration, added applyConfig method to the container
added provided and configure methods to the fluent container configuration, added applyConfig method to the container

File last commit:

r115:691199f665e0 ioc ts support
r142:be7edf08a115 v1.4.0-rc3 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);
}
}