Sample for configuring a Temporal project with TypeScript and ES Modules.
Fundamental difference from CommonJS:
package.json
has"type": "module"
attribute.tsconfig.json
outputs inesnext
format.- Imports must include the
.js
file extension.
temporal server start-dev
to start Temporal Server.npm install
to install dependencies.npm run start.watch
to start the Worker.- In another shell,
npm run workflow
to run the Workflow.
The Workflow should return:
Hello, Temporal!