From 74e1b96e8d6f81135628c90a61ac6ac2584c3d4b Mon Sep 17 00:00:00 2001 From: Nwani Victory Date: Fri, 1 Nov 2024 19:15:14 +0000 Subject: [PATCH] fix: add src type to CloudinaryLoaderCldOptions interface (#552) # Description This PR will add the `src` type to `CloudinaryLoaderCldOptions` interface to fix the ts error being thrown from the `cloudinary-loader.ts` file. Fixes This will close #425 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Fix or improve the documentation - [ ] This change requires a documentation update # Checklist - [x] I have followed the contributing guidelines of this project as mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md) - [x] I have created an [issue](https://github.com/cloudinary-community/next-cloudinary/issues) ticket for this PR - [x] I have checked to ensure there aren't other open [Pull Requests](https://github.com/cloudinary-community/next-cloudinary/pulls) for the same update/change? - [x] I have performed a self-review of my own code - [x] I have run tests locally to ensure they all pass - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes needed to the documentation --------- Co-authored-by: Colby Fayock --- next-cloudinary/src/loaders/cloudinary-loader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next-cloudinary/src/loaders/cloudinary-loader.ts b/next-cloudinary/src/loaders/cloudinary-loader.ts index 40248ac5..d0806ff1 100644 --- a/next-cloudinary/src/loaders/cloudinary-loader.ts +++ b/next-cloudinary/src/loaders/cloudinary-loader.ts @@ -3,6 +3,7 @@ import { ImageProps } from 'next/image'; import { getCldImageUrl } from '../helpers/getCldImageUrl'; export interface CloudinaryLoaderCldOptions { + src: string } export interface CloudinaryLoaderLoaderOptions { @@ -53,6 +54,5 @@ export function cloudinaryLoader({ loaderOptions, imageProps, cldOptions, cldCon options.width = loaderOptions?.width; } - // @ts-ignore return getCldImageUrl(options, cldConfig); } \ No newline at end of file