浏览代码

(chore): Update getAllPages typescript (#5908)

* Update getAllPages typescript

* Optionally add updatedAt to PageEntity
Scott Block 3 年之前
父节点
当前提交
d15fb1c56a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      libs/src/LSPlugin.ts

+ 2 - 1
libs/src/LSPlugin.ts

@@ -196,6 +196,7 @@ export interface PageEntity {
   children?: Array<PageEntity>
   format?: 'markdown' | 'org'
   journalDay?: number
+  updatedAt?: number
 }
 
 export type BlockIdentity = BlockUUID | Pick<BlockEntity, 'uuid'>
@@ -622,7 +623,7 @@ export interface IEditorProxy extends Record<string, any> {
 
   renamePage: (oldName: string, newName: string) => Promise<void>
 
-  getAllPages: (repo?: string) => Promise<any>
+  getAllPages: (repo?: string) => Promise<PageEntity[] | null>
 
   prependBlockInPage: (
     page: PageIdentity,