sanity-io / image-url

Tools to generate image urls from Sanity content
https://www.sanity.io/docs/presenting-images#mY9Be3Ph
MIT License
67 stars 23 forks source link

Change projectId and dataset to optional in client #31

Closed benedicteb closed 3 years ago

benedicteb commented 3 years ago

In order for SanityClienLike to correspond with the SanityClientConfi type these have to be optional. Otherwise it would produce type errors in other packages.

Going forward we might be able to solve this better by making the type of the returned interface change depending on whether you supply dataset and/or projectId.