1 import type { CommentThreadState } from './CommentThreadState'
2 import type { CommentInterface } from './CommentInterface'
3 import type { ServerTime } from './ServerTime'
4 import type { CommentThreadPayload } from './CommentThreadPayload'
5 import type { CommentThreadType } from './CommentThreadType'
7 export type CommentThreadInterface = {
10 modifyTime: ServerTime
12 comments: CommentInterface[]
13 isPlaceholder: boolean
14 state: CommentThreadState
15 type: CommentThreadType
17 * We need a stable local ID to allow positioned threads to be
18 * keyed in a where the placeholder element for a thread is keyed
19 * with the same ID as the normal one to prevent react from creating
20 * a new DOM element. On thread creation, we use the ID of the placeholder
21 * for this and on subsequent reloads we just use the normal ID.
25 asPayload(): CommentThreadPayload