isPageId
See source codeType guard to check if a string is a valid TLPageId.
function isPageId(id: string): id is TLPageId
Example
if (isPageId('page:main')) {
// TypeScript knows this is a TLPageId
console.log('Valid page ID')
}
Parameters
Name | Description |
---|---|
|
The string to check |
Returns
id is TLPageId
True if the ID is a valid page ID, false otherwise
Prev
isDocumentNext
isShape