# Updated JS Client for end-to-end type safety

[date: 2025-10-10T11:46:07.309+02:00]

The DatoCMS JavaScript client is now fully type-safe. Records (the missing piece that wasn't) are also generated directly from your project’s schema.

(Video content)

This gives you real autocomplete and compile-time safety across your project.

(Video content)

No docs were opened in the making of this demo.

The CLI bridges your schema and repo perfectly. Run a single command to generate types, and if your schema changes, rerun it to keep your code perfectly in sync.

Terminal window

```bash
$ npx datocms schema:generate schema.ts
```

The client also ships with new utilities to simplify record management, like `duplicateBlockRecord()`, `inspectItem()`, and `mapBlocksInNonLocalizedFieldValue()` to handle nested blocks, relations, and localized fields automatically.

**Quick Links:**

-   [CMA Client Package](https://github.com/datocms/js-rest-api-clients/tree/main/packages/cma-client)
-   [Configuring the CLI Docs](https://www.datocms.com/docs/cli.md)
    
-   [Using the JS Client Docs](https://www.datocms.com/docs/content-management-api/using-the-nodejs-clients.md)
-   [Type-safe Development with TypeScript Docs](https://www.datocms.com/docs/content-management-api/resources/item.md#type-safe-development-with-typescript)
    
-   [Announcement post on the blog](https://www.datocms.com/blog/records-finally-typed.md)