Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Documentation
IntroductionType SafetyTensor ExpressionsTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformancePyTorch CompatibilityBenchmarksDType Coverage
torch.js· 2026
LegalTerms of UsePrivacy Policy
/
/
  1. docs
  2. Spark
  3. spark
  4. SparkUpdateMessage

spark.SparkUpdateMessage

export interface SparkUpdateMessage {
  type: 'update';
  /** Key of the updated value */
  key: string;
  /** New value */
  value: unknown;
  /** Timestamp of the update */
  timestamp: number;
}
type('update')
key(string)
– Key of the updated value
value(unknown)
– New value
timestamp(number)
– Timestamp of the update

Message sent when a value changes in the worker.

Triggers UI updates in the React component.

Previous
SparkStatus
Next
SparkWorkerApi