Function: isImageBlock()
@providerprotocol/ai / @providerprotocol/ai / isImageBlock
Function: isImageBlock()
Section titled “Function: isImageBlock()”isImageBlock(
block):block is ImageBlock
Defined in: src/types/content.ts:502
Type guard for ImageBlock.
Parameters
Section titled “Parameters”The content block to check
Returns
Section titled “Returns”block is ImageBlock
True if the block is an ImageBlock
Example
Section titled “Example”if (isImageBlock(block)) { console.log(block.mimeType, block.width, block.height);}