TSDoc Style Guide
Documentation standards and conventions.
SpineEditor docs describe contracts, invariants, and behavior. Keep prose minimal.
Rules
@packageDocumentationappears only in packageindex.ts.- The first line is a one-line summary.
@remarksdescribes invariants, behavior, and limits.- No section divider comments, no speculative prose.
- Keep public API docs implementation-aligned.
Anti-drift notes
TextSelectionis factory-constructed viatextSelection(anchor, head, options?).- Selection kinds are
"text" | "node" | "block". Posis a branded non-negative integer created viapos(value).- Tests must match implementation semantics exactly.