Skip to content

Commit 0738962

Browse files
committed
docs(bundler-utils): clarify resource id and entry docs
1 parent 74b5da9 commit 0738962

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎packages/bundler-utils/src/module.types.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import type { SrcSetBackendImage } from './types.ts'
44
/**
55
* Resource id formatter function.
66
* @param width - Actual width of the image variant in pixels.
7-
* @param requestedWidth - Width as it was requested: absolute value or multiplier less than or equal to 1.
7+
* @param requestedWidth - Multiplier when the variant was requested with one, otherwise the actual width.
88
* @param format - Image variant format.
99
* @returns Resource id.
1010
*/
1111
export type ResourceIdFormatter = (width: number, requestedWidth: number, format: ImageFormat) => string
1212

1313
/**
14-
* Generated image variant entry of the module: the backend image
15-
* plus the resource id and the mime type, the runtime `SrcSetEntry` shape.
14+
* Generated image variant entry of the module: the backend image plus
15+
* the resource id and the mime type. Serialized to the runtime
16+
* `SrcSetEntry` shape in the module code.
1617
*/
1718
export interface SrcSetModuleEntry extends SrcSetBackendImage {
1819
/**

0 commit comments

Comments
 (0)