Skip to content

Function: isDocumentBlock()

@providerprotocol/ai


@providerprotocol/ai / @providerprotocol/ai / isDocumentBlock

isDocumentBlock(block): block is DocumentBlock

Defined in: src/types/content.ts:519

Type guard for DocumentBlock.

ContentBlock

The content block to check

block is DocumentBlock

True if the block is a DocumentBlock

if (isDocumentBlock(block)) {
console.log(block.mimeType, block.title);
}