contentful-typescript-codegen icon indicating copy to clipboard operation
contentful-typescript-codegen copied to clipboard

Don't include Document if not needed

Open cjimmy opened this issue 4 years ago • 2 comments

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.

cjimmy avatar Mar 24 '21 01:03 cjimmy

I have noticed that too, would be great having types without unused import.

agrumason avatar Apr 06 '21 11:04 agrumason

+1. This is causing eslint to fail on the file for our project due to the unused import.

mikelehen avatar Sep 08 '21 17:09 mikelehen