Function: isTextBlock()
@providerprotocol/ai / @providerprotocol/ai / isTextBlock
Function: isTextBlock()
Section titled “Function: isTextBlock()”isTextBlock(
block):block is TextBlock
Defined in: src/types/content.ts:468
Type guard for TextBlock.
Parameters
Section titled “Parameters”The content block to check
Returns
Section titled “Returns”block is TextBlock
True if the block is a TextBlock
Example
Section titled “Example”if (isTextBlock(block)) { console.log(block.text);}