prismicio / prismic-ts-codegen

A Prismic model-to-TypeScript-type generator.
Apache License 2.0
18 stars 6 forks source link

fix: use `ImageField<never>` rather than `ImageField<null>` #26

Closed angeloashmore closed 2 years ago

angeloashmore commented 2 years ago

Types of changes

Description

This PR changes the generated type for Image fields without thumbnails to use the latest @prismicio/types recommendation.

null will continue to work, but it is deprecated in @prismicio/types. Similarly, never was supported in previous versions of @prismicio/types, but it was not the recommended API. That recommendation has changed.

See https://github.com/prismicio/prismic-types/pull/46 for more details.

Checklist:

github-actions[bot] commented 2 years ago

size-limit report 📦

Path Size
dist/index.js 1.07 MB (-0.01% 🔽)
dist/index.cjs 1.08 MB (-0.01% 🔽)