Skip to content

Commit

Permalink
Merge pull request #58 from HubSpot/jm/fields-typo
Browse files Browse the repository at this point in the history
Fix typo in fields type gen doc
  • Loading branch information
j-malt authored May 20, 2024
2 parents b9539c8 + 8264c0c commit c51968c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/cms-dev-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Storybook is built with client components in mind, so components that cross isla

## Fields Type Generation

If you are using Typescript in your CMS React project, you can make use of the `--generateFieldTypes` argument of the dev server. This command will watch for changes to the fields object that is exported from module file and create a `.types.ts` file inside of the directory of the module. You can then import this module directly into your module component and use it in the generic `ModuleProps<T>` type. As an example, if this is your `fields.jsx` file:
If you are using Typescript in your CMS React project, you can make use of the `--generateFieldsTypes` argument of the dev server. This command will watch for changes to the fields object that is exported from module file and create a `.types.ts` file inside of the directory of the module. You can then import this module directly into your module component and use it in the generic `ModuleProps<T>` type. As an example, if this is your `fields.jsx` file:

```tsx
// components/modules/MyModule/fields.tsx
Expand Down

0 comments on commit c51968c

Please sign in to comment.