Pārlūkot izejas kodu

improve(api): types & typos

charlie 3 gadi atpakaļ
vecāks
revīzija
85aeba99ab
2 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 2 1
      libs/src/LSPlugin.ts
  2. 1 1
      src/main/logseq/api.cljs

+ 2 - 1
libs/src/LSPlugin.ts

@@ -555,7 +555,7 @@ export interface IEditorProxy extends Record<string, any> {
   ) => Promise<Array<PageEntity> | null>
 
   /**
-   * Create an uuid string for specific block id(uuid)
+   * Create a unique UUID string which can then be assigned to a block.
    * @added 0.0.8
    */
   newBlockUUID: () => Promise<string>
@@ -574,6 +574,7 @@ export interface IEditorProxy extends Record<string, any> {
       before: boolean
       sibling: boolean
       isPageBlock: boolean
+      customUUID: string
       properties: {}
     }>
   ) => Promise<BlockEntity | null>

+ 1 - 1
src/main/logseq/api.cljs

@@ -476,7 +476,7 @@
                         (util/format "Illegal custom block UUID pattern (%s)." custom-uuid))))
               (when (db-model/query-block-by-uuid custom-uuid)
                 (throw (js/Error.
-                        (util/format "Custom block UUID existed (%s)." custom-uuid)))))
+                        (util/format "Custom block UUID already exists (%s)." custom-uuid)))))
           block-uuid (if isPageBlock nil (uuid block-uuid-or-page-name))
           block-uuid' (if (and (not sibling) before block-uuid)
                         (let [block (db/entity [:block/uuid block-uuid])