improve(api): types & typos

This commit is contained in:
charlie
2022-08-22 21:36:50 +08:00
committed by Tienson Qin
parent 7e3610077b
commit 85aeba99ab
2 changed files with 3 additions and 2 deletions

View File

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

View File

@@ -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])