Skip to main content

Introduction to the Temporal TypeScript SDK

Welcome to the Temporal TypeScript SDK developer's guide!

Temporal TypeScript SDK API reference

The Temporal TypeScript SDK released on July 26, 2022. The TypeScript SDK provides access to the Temporal programming model using idiomatic JavaScript and TypeScript programming paradigms.

The Temporal TypeScript SDK only supports the Node.js runtime environment.

What programming skills and experiences are useful when using the TypeScript SDK?

You can start working with the SDK with only TypeScript knowledge. Temporal abstracts much of the complexity of distributed systems, but to unlock its full potential, having a broad base of knowledge will help you design more efficient and resilient systems.

  • Core JavaScript or TypeScript knowledge
    • Required
      • JavaScript syntax and structure, including variable declarations using let, const, and var.
      • Basic data types, such as number, string, boolean, null, and undefined.
      • Operators and control statements.
      • Basic input/output (I/O).
      • Familiarity with defining classes, constructors, properties, and methods.
      • Knowledge of how to use import and export for module-based development, which is crucial for organizing larger Temporal applications.
      • Familiarity with function declarations, arrow functions, and function types.
      • Understanding of modern ECMAScript features such as promises and async/await.
      • Knowledge of how to configure TypeScript projects using tsconfig.json, especially if you need to adjust settings specific to your Temporal project or integrate with other tools.
    • Useful
      • Proficiency in TypeScript, including understanding type annotations, interfaces, and generics.
      • Familiarity with object-oriented programming concepts like inheritance, encapsulation, and polymorphism.
      • Understanding of composite types like Array<T>, Promise<T>, and { [key: string]: T}.
      • Basic understanding of decorators.
      • Familiarity with Node.js because the SDK uses the Node.js runtime.
  • Tools
    • Required
      • Package managers, such as npm, pnpm, or yarn.
      • An integrated development environment, such as Visual Studio Code (VS Code) or WebStorm, both of which also have built-in debuggers.
    • Useful
      • Testing tools, such as Jest or Mocha and Chai.
      • Source control systems (such as Git) and source control platforms (such as GitHub, GitLab, or Bitbucket).
  • Other useful knowledge
    • Testing and production
      • Unit testing, integration testing, debugging, and performance profiling tools.
      • CI/CD practices and tools.
    • Distributed systems
      • Event-driven architecture, eventual consistency, partitioning, and replication.
      • Stateful versus stateless processes.

Where can I find code samples?

Code samples are integrated into this developer’s guide. You can find those code samples in the temporalio/documentation-samples-typescript repository on GitHub.

Additional TypeScript code samples are in the temporalio/samples-typescript repository.

What are other resources for learning how to use the TypeScript SDK?

Further resources for learning how to use the SDK include the following:

Where can I get help with using the TypeScript SDK?

How to follow updates to the TypeScript SDK

How to contribute to the TypeScript SDK

The Temporal TypeScript SDK is MIT licensed, and contributions are welcome. Please review our contribution guidelines.