element-book
Version:
An [`element-vir`](https://npmjs.com/package/element-vir) drop-in element for building, testing, and demonstrating a collection of elements (or, in other words, a design system).
18 lines (17 loc) • 583 B
TypeScript
import { type BookEntryType } from './book-entry-type.js';
import { type BookElementExample, type BookPage } from './book-page/book-page.js';
import { type BookRoot } from './book-root.js';
/**
* All possible book entries.
*
* @category Internal
*/
export type BookEntry = BookPage | BookRoot | BookElementExample;
/**
* Check if the input is a book entry of the given type.
*
* @internal
*/
export declare function isBookEntry<const SpecificType extends BookEntryType>(entry: unknown, entryType: SpecificType): entry is Extract<BookEntry, {
entryType: SpecificType;
}>;