https://github.com/js2me/disposer-util
https://github.com/js2me/disposer-util
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/js2me/disposer-util
- Owner: js2me
- License: mit
- Created: 2024-07-18T08:15:30.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-06T09:21:36.000Z (about 1 year ago)
- Last Synced: 2025-12-28T22:46:27.277Z (6 months ago)
- Language: TypeScript
- Size: 298 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# disposer-util
Disposer class and Disposable interface
## usage
```ts
import { Disposable, Disposer } from "disposer-util";
export class SomeModel implements Disposable {
private disposer = new Disposer();
constructor(){
this.disposer.add(
reaction(() => this.someProp, console.log)
);
}
dispose() {
this.disposer.dispose();
}
}
```