import type { CommentThread, NormalizedCommentThread, PropertyDeclaration } from 'modern-idoc'; import type { Element2D } from './Element2D'; import { CoreObject } from '../../../core'; /** * 元素上的评论线程集合。内部按 `threadId` 作动态键存储(仿 {@link Meta}), * 从而能像其它子属性一样被 CRDT 逐线程映射为 Y.Map 项(并发新增不同线程天然合并)。 * 对外 `toJSON` 输出 idoc 规范的 `CommentThread[]` 数组形态。 */ export declare class Element2DComments extends CoreObject { parent: Element2D; [key: string]: any; constructor(parent: Element2D); getPropertyDeclarations(): Record; getPropertyDeclaration(key: string): PropertyDeclaration | undefined; /** 接受 CommentThread[](按 thread.id 归键)或已归键的对象。 */ setProperties(value?: CommentThread[] | Record): this; /** 序列化为 idoc 规范的线程数组(过滤已删除留下的空位)。 */ toJSON(): NormalizedCommentThread[]; isValid(): boolean; }