124
);
125
}
127
>
}
128
>
129
>
if (!didRunTransaction) {
130
>
getLogger()?.handleObservableUpdated(this, { oldValue, newValue, change: undefined, didChange, hadValue: this._hasValue });
131
>
}
132
>
};
133
134
protected override onLastObserverRemoved(): void {
136
>
this._subscription = undefined;
137
>
this._hasValue = false;
138
>
this._value = undefined;
139
>
}
140
141
public get(): T {
142
if (this._subscription) {
144
>
this.handleEvent(undefined);
145
>
}
146
>
return this._value!;
147
} else {
148
// no cache, as there are no subscribers to keep it updated