> ## Documentation Index
> Fetch the complete documentation index at: https://v0.x-docs.novu.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Typescript

export const EchoTerminal = () => {
  if (typeof document === "undefined") {
    return null;
  } else {
    const clientComponent = document.getElementById("nv-echo-terminal-snippet");
    if (clientComponent) {
      clientComponent.innerHTML = '<nv-echo-terminal></nv-echo-terminal>';
    }
    return <div id="nv-echo-terminal-snippet"></div>;
  }
};

Novu Framework was built and optimized for extreme focus on Developer Experience.
Our `@novu/framework` SDK is written in Typescript, and we recommend using Typescript for your own projects as well.

<EchoTerminal />

## Type Safe Workflow Payloads

When defining a [workflow payload](/framework/concepts/payload) schema, our SDK will automatically infer it to a Typescript interface.

```typescript theme={null}
import { workflow } from '@novu/framework';

const myWorkflow = workflow('new-signup', async ({ step, payload }) => {
	await step.email('send-email', () => {
        return {
            subject: 'Hello World',
            // The payload object here is type-safe
            body: `Hi ${payload.name}, welcome to our platform!`
        }
	});
}, {
	// JSON Schema for validation and type-safety. Zod, and others coming soon.
	// https://json-schema.org/draft-07/json-schema-release-notes
	payloadSchema: { properties: { name: { type: 'string' }}},
});
```

## Type Safe Steps

Similarly, when defining a [step](/framework/concepts/steps) schema, our SDK will automatically infer it to a Typescript interface.
