projects/common/data/async-state/create-manual-state.ts
Create a fully manual async state — no HTTP, no automatic loading.
Use for local operations: heavy computations, Web Workers, complex local processes. Does not require an injection context — uses only signal() and computed().
signal()
computed()
readonly processState = createManualState<ProcessResult>(); async handleProcess(): Promise<void> { this.processState.set('loading'); this.processState.setProgress(0); const result = await heavyComputation((p) => this.processState.setProgress(p)); this.processState.setSuccess(result); }
createManualState()
ManualAsyncState