@apollo/client
Version:
A fully-featured caching GraphQL client.
23 lines • 535 B
JavaScript
import { dep } from "optimism";
export class StreamArrayState {
truncate = false;
_streamPosition = 0;
path;
dep = dep();
constructor(path) {
this.path = path;
}
depend() {
this.dep(this.path);
}
get streamPosition() {
return this._streamPosition;
}
set streamPosition(value) {
if (value !== this._streamPosition) {
this._streamPosition = value;
this.dep.dirty(this.path);
}
}
}
//# sourceMappingURL=StreamArrayState.js.map