-
-
Notifications
You must be signed in to change notification settings - Fork 608
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
getThreads
is necessary to load the "Threads" but the interface does not accept Promise response, so it does not seem easy to include this part with REST:
abstract getThread(threadId: string): ThreadData; |
A REST example implementation is provided but it does not include the getThreads
part:
https://github.com/TypeCellOS/BlockNote/blob/ac322a1aa38fd48e64afdf7cfaebb10a6b77c364/packages/core/src/comments/threadstore/yjs/RESTYjsThreadStore.ts
Based on that:
BlockNote/packages/core/src/comments/threadstore/yjs/YjsThreadStoreBase.ts
Lines 29 to 35 in ac322a1
public getThreads(): Map<string, ThreadData> { | |
const threadMap = new Map<string, ThreadData>(); | |
this.threadsYMap.forEach((yThread, id) => { | |
threadMap.set(id, yMapToThread(yThread)); | |
}); | |
return threadMap; | |
} |
Request
Could we change the interface to accept promise response with getThreads
?
Thx!
Bonus
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request