hilla
hilla copied to clipboard
[Full-Stack Signals] ValueSignal with Java library support
As a first step integrating with the Java Full-Stack Signals library, let's make a new ValueSignal TypeScript client following the structure of the Java library:
- Uses the same command format.
- Supports for latency compensation.
- Provides transactions, see example below.
const s = MyEndpoint.valueSignal(0);
type Result = {
readonly successful: true;
};
type Error = {
readonly successful: false;
};
type ResultOrError = Result | Error;
const result = await s.replace(0, 1).result;
if (result.successful) {
// ...
}