dohomi / storyblok-generate-ts

Generates TypeScript interface types based on Storyblok component file
MIT License
102 stars 33 forks source link

Unused import when generated via cli #27

Closed plumber-dhaval closed 1 year ago

plumber-dhaval commented 1 year ago

In the latest version when i generate via cli i get an unused import at the top of the file. This did not happen in prior versions.

The unused import is: import {StoryblokStory} from 'storyblok-generate-ts'

schaschjan commented 1 year ago

The StoryblokStory type is required in modeling relations between content types. Your Storyblok project does not seem to use any, that is why the import remains unused. There could be checked if there are any relations in the project, and if not omitting the import. However I find the effort for implementing this not really worth it, but your contribution would be welcomed.

dohomi commented 1 year ago

any PR is welcome, I just don't have a component structure without StoryblokStory so I haven't seen the unused import..