mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-12-09 14:04:20 +00:00
* feat: config database view effects * chore: add tests * chore: config jest * chore: config jest windows * ci: wanrings * chore: config folder effect
18 lines
288 B
TypeScript
18 lines
288 B
TypeScript
import { Subject } from 'rxjs';
|
|
|
|
export class ChangeNotifier<T> {
|
|
private subject = new Subject<T>();
|
|
|
|
notify(value: T) {
|
|
this.subject.next(value);
|
|
}
|
|
|
|
get observer() {
|
|
return this.subject.asObservable();
|
|
}
|
|
|
|
unsubscribe = () => {
|
|
this.subject.unsubscribe();
|
|
};
|
|
}
|