isPage
Type guard to check if a record is a page.
function isPage(record?: UnknownRecord): record is TLPage;Example
const record = store.get("page:abc123");
if (isPage(record)) {
console.log(`Page name: ${record.name}`);
}Parameters
| Name | Description |
|---|---|
| The record to check |
Returns
record is TLPage;True if the record is a page, false otherwise
Prev
isDocumentNext
isPageId