You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm about 80% sure this is not an actual bug, but rather the fact that my knowledge of typescript is very patchy. Please bear with me :)
context: I wanted to add my own local provider to unpic. I have an endpoint that produces thumbnails on the fly, accepting just width and height from the url and rescaling the image. In prod, my images live on imagekit; this provider would handle things in the dev environment.
I've followed the instructions and made my own subclass of Operations, Options, generator and parser for Operations. I'm struggling with defining an URLExtractor<"local">, as the parametrized type is the ImageCdn union defined in unpic itself. I can't seem to be able to modify it via typescript module augmentation - I'm either using it incorrectly or there's something missing.
Would you please be able to add a minimal example of this to the documentation? Or add it here, and I'll happily update the docs :)
Thanks!
The text was updated successfully, but these errors were encountered:
I'm about 80% sure this is not an actual bug, but rather the fact that my knowledge of typescript is very patchy. Please bear with me :)
context: I wanted to add my own local provider to unpic. I have an endpoint that produces thumbnails on the fly, accepting just width and height from the url and rescaling the image. In prod, my images live on imagekit; this provider would handle things in the dev environment.
I've followed the instructions and made my own subclass of Operations, Options, generator and parser for Operations. I'm struggling with defining an
URLExtractor<"local">
, as the parametrized type is theImageCdn
union defined in unpic itself. I can't seem to be able to modify it via typescript module augmentation - I'm either using it incorrectly or there's something missing.Would you please be able to add a minimal example of this to the documentation? Or add it here, and I'll happily update the docs :)
Thanks!
The text was updated successfully, but these errors were encountered: