hilla icon indicating copy to clipboard operation
hilla copied to clipboard

[Full-Stack Signals] ValueSignal with Java library support

Open platosha opened this issue 7 months ago • 9 comments

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) {
  // ...
}

platosha avatar Apr 29 '25 11:04 platosha