contentful-typescript-codegen
contentful-typescript-codegen copied to clipboard
Don't include Document if not needed
The codegen'd file included
import {Document} from '@contentful/rich-text-types'
even though none of my types needed it. In order to avoid TS errors without manual intervention (or a hack-y script to modify the file), I have to include the package @contentful/rich-text-types. Ideally, it would not automatically assume our schema includes RichText.
I have noticed that too, would be great having types without unused import.
+1. This is causing eslint to fail on the file for our project due to the unused import.