-
-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The TypeScript types for TCollabThread in @hocuspocus/provider are inaccurate. The date fields (createdAt, updatedAt, deletedAt, and resolvedAt) are typed as number, but the collaboration service returns ISO 8601 strings for these fields.
As a result, I cannot parse these dates correctly in TypeScript without ugly casts (e.g. thread.createdAt as unknown as string).
Steps to reproduce the bug
- Using the Tiptap Comments extension, create a new thread.
- Retrieve the threads using the
subscribeToThreadsfunction from@tiptap-pro/extension-comments. - In the callback, observe the data values of the
threadsitems withconsole.logor the debugger. - Note that the date fields are strings, and not numbers as typed.
Expected behavior
I expect the data to match the specified type.
Screenshot, video, or GIF
Environment?
- operating system: macOS
- browser: Firefox 137.0.2
- mobile/desktop: Desktop
- Hocuspocus version: 2.15.2
Additional context
We are using Collaboration Server 3.46.3 (on-premises).
I'm not sure whether to file this bug against Hocuspocus or the Collaboration Server.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
