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. SparkState

spark.SparkState

export interface SparkState {
  /** Any exposed value can be accessed by key */
  [key: string]: unknown;
}

Generic state object mapping keys to exposed values.

Used for type-safe access to exposed state in the UI via spark.use().

Previous
SparkSetMessage
Next
SparkStatus