Terminating a workflow

Can we terminate a running workflow through code., If yes how can we achieve it using TypeScript sdk?

Using the TS SDK client API, you can make a handle on your Workflow, then call terminate() on it.

For example:

client.workflow.getHandle('my-workflow-id').terminate();