Explorar el Código

improve: refine return type of findPageAndMetaDataByViewer function

Shun Miyazawa hace 4 meses
padre
commit
6049087c1d

+ 4 - 7
apps/app/src/server/service/page/find-page-and-meta-data-by-viewer.ts

@@ -63,13 +63,10 @@ export async function findPageAndMetaDataByViewer(
     isSharedPage?: boolean;
     basicOnly?: boolean;
   },
-): Promise<
-  | IDataWithRequiredMeta<
-      HydratedDocument<PageDocument>,
-      IPageInfoExt | IPageInfoBasic
-    >
-  | IDataWithRequiredMeta<null, IPageNotFoundInfo>
-> {
+): Promise<IDataWithRequiredMeta<
+  HydratedDocument<PageDocument> | null,
+  IPageInfoExt | IPageInfoBasic | IPageNotFoundInfo
+>> {
   const { pageId, path, user, isSharedPage = false, basicOnly = false } = opts;
 
   assert(pageId != null || path != null);