55// Minimum TypeScript Version: 4.2
66
77/// <reference types="node" />
8- import sharp = require( ' sharp' ) ;
9- import generateImageHTML = require( ' ./generate-html' ) ;
8+ import sharp = require( " sharp" ) ;
9+ import generateImageHTML = require( " ./generate-html" ) ;
1010
1111type Awaitable < T > = PromiseLike < T > | T ;
1212type WithImplicitCoercion < T > = T | { valueOf ( ) : T } ;
1313
1414declare namespace EleventyImage {
1515 type ImageSource = string | URL | Buffer ;
16- type ImageFormat = ' webp' | ' jpeg' | ' png' | ' svg' | ' avif' ;
17- type ImageFormatWithAliases = ImageFormat | ' jpg' | ' svg+xml' ;
16+ type ImageFormat = " webp" | " jpeg" | " png" | " svg" | " avif" ;
17+ type ImageFormatWithAliases = ImageFormat | " jpg" | " svg+xml" ;
1818
1919 type FormatHook = (
2020 this : MetadataEntry ,
@@ -25,7 +25,7 @@ declare namespace EleventyImage {
2525 /**
2626 * @default 'buffer'
2727 */
28- type ?: ' buffer' | ' json' | ' text' ;
28+ type ?: " buffer" | " json" | " text" ;
2929 /**
3030 * @default ".cache"
3131 */
@@ -56,14 +56,14 @@ declare namespace EleventyImage {
5656 * - `null` and `'auto'` represent the original image width.
5757 * @default [null]
5858 */
59- widths ?: ReadonlyArray < number | ' auto' | null > ;
59+ widths ?: ReadonlyArray < number | " auto" | null > ;
6060 /**
6161 * Controls the output image formats.
6262 * - `null and `'auto'` keep the original format.
6363 * - `svg` requires SVG input to work.
6464 * @default ['webp', 'jpeg']
6565 */
66- formats ?: ReadonlyArray < ImageFormatWithAliases | ' auto' | null > ;
66+ formats ?: ReadonlyArray < ImageFormatWithAliases | " auto" | null > ;
6767 /**
6868 * @default 10
6969 */
@@ -152,12 +152,12 @@ declare namespace EleventyImage {
152152 */
153153 filenameFormat ?:
154154 | ( (
155- id : string ,
156- src : string ,
157- width : number ,
158- format : string ,
159- options : Required < ImageOptions > ,
160- ) => string | null | undefined )
155+ id : string ,
156+ src : string ,
157+ width : number ,
158+ format : string ,
159+ options : Required < ImageOptions > ,
160+ ) => string | null | undefined )
161161 | null
162162 | undefined ;
163163
@@ -179,14 +179,14 @@ declare namespace EleventyImage {
179179 */
180180 urlFormat ?:
181181 | ( (
182- format : {
183- hash : string ;
184- src : string ;
185- width : number ;
186- format : string ;
187- } ,
188- options : Required < ImageOptions > ,
189- ) => string )
182+ format : {
183+ hash : string ;
184+ src : string ;
185+ width : number ;
186+ format : string ;
187+ } ,
188+ options : Required < ImageOptions > ,
189+ ) => string )
190190 | null ;
191191
192192 /**
@@ -290,7 +290,7 @@ declare namespace EleventyImage {
290290 function statsByDimensionsSync ( src : ImageSource , width : number , height : number , opts ?: ImageOptions ) : Metadata ;
291291
292292 function getFormats (
293- formats : string | ReadonlyArray < ImageFormatWithAliases | null | ' auto' > ,
293+ formats : string | ReadonlyArray < ImageFormatWithAliases | null | " auto" > ,
294294 autoFormat : ImageFormat ,
295295 ) : ImageFormat [ ] ;
296296 function getFormats (
@@ -300,7 +300,7 @@ declare namespace EleventyImage {
300300
301301 function getWidths (
302302 originalWidth : number ,
303- widths ?: ReadonlyArray < number | ' auto' | null > ,
303+ widths ?: ReadonlyArray < number | " auto" | null > ,
304304 allowUpscale ?: boolean ,
305305 ) : number [ ] ;
306306
@@ -311,7 +311,7 @@ declare namespace EleventyImage {
311311 isRemoteUrl : boolean ;
312312 options : Required < ImageOptions > ;
313313
314- cacheOptions ?: Required < ImageOptions [ ' cacheOptions' ] > ;
314+ cacheOptions ?: Required < ImageOptions [ " cacheOptions" ] > ;
315315
316316 constructor ( src : ImageSource , opts ?: ImageOptions ) ;
317317
0 commit comments