Add JSDoc, Type Guards, and Response Aliases
masterYou can enhance your generated types using optional renderers:
- JSDoc (
-d, --jsdoc): Adds documentation comments to fields, skeletons, and entries. - Type Guards (
-g, --typeguard): Adds runtime predicate functions (e.g.,isTypeAnimal) to check if an entry matches a specific content type. - Response Aliases (
-r, --response): Adds convenience type aliases for common response modifier combinations (e.g.,TypeAnimalWithoutLinkResolutionResponse). Note that these aliases apply to the top-level entry type only; linked entries remain typed using standardcontentful.jspatterns.
cf-content-types-generator ./contentful-export.json -o src/@types/generated --jsdoc --typeguard --response