|
@@ -4,6 +4,7 @@ import type { IPageForItem } from '~/interfaces/page';
|
|
|
|
|
|
|
|
export type SelectablePage = Partial<IPageHasId> & { path: string }
|
|
export type SelectablePage = Partial<IPageHasId> & { path: string }
|
|
|
|
|
|
|
|
|
|
+// type guard
|
|
|
export const isSelectablePage = (page: IPageForItem): page is SelectablePage => {
|
|
export const isSelectablePage = (page: IPageForItem): page is SelectablePage => {
|
|
|
return page.path != null;
|
|
return page.path != null;
|
|
|
};
|
|
};
|