@foundatiofx/fetchclient
Version:
A typed JSON fetch client with middleware support for Deno, Node and the browser.
37 lines (36 loc) • 843 B
JavaScript
import { ObjectEvent } from "./ObjectEvent.js";
/**
* Represents a counter that can be incremented and decremented.
*/
export class Counter {
/**
* Gets the current count.
*/
get count() {
return this.
}
/**
* Gets an event that is triggered when the count changes.
*/
get changed() {
return this.
}
/**
* Increments the count by 1.
*/
increment() {
const previous = this.
this.
this.
}
/**
* Decrements the count by 1.
*/
decrement() {
const previous = this.
this.
this.
}
}