瀏覽代碼

refactor: add comment for type guard in SelectablePage definition

Shun Miyazawa 8 月之前
父節點
當前提交
c8812ab54a
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      apps/app/src/features/openai/interfaces/selectable-page.ts

+ 1 - 0
apps/app/src/features/openai/interfaces/selectable-page.ts

@@ -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;
 };
 };