> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Types: editor: Comments and protection

## `Comment`

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `anchor?` | `readonly number[]` | The note box's `x:Anchor`: column, px offset, row, px offset of its top-left, then its bottom-right. |
| `author` | `string` | |
| `c` | `number` | |
| `fill?` | `string` | The note box's own fill and border (`"none"` for no border), as `#rrggbb`. |
| `frame?` | `{ height: number; left: number; top: number; width: number }` | The box in points from the sheet's top-left, for a note with no anchor. |
| `r` | `number` | |
| `runs` | `TextRun[]` | |
| `shown?` | `boolean` | A note shown on the sheet (Show/Hide Note), not only on hover. |
| `stroke?` | `string` | |
| `text` | `string` | |
| `thread?` | `{ entries: { author: string; date: string; text: string }[]; resolved: boolean }` | Set on a threaded comment: its posts, oldest first. |

## `CommentEntry`

One post of a comment thread; `date` is ISO 8601.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `author` | `string` | |
| `date` | `string` | |
| `id` | `string` | |
| `text` | `string` | |

## `CommentThread`

A cell's comment and its replies, oldest first.

Import from `@reductoai/xlsx/editor`.

| Name | Type | Description |
| - | - | - |
| `entries` | `CommentEntry[]` | |
| `id` | `string` | |
| `resolved` | `boolean` | |

## `ProtectCommand`

Not exported by name. You get it from the API.

```ts theme={null}
type ProtectCommand = { options?: WorksheetProtectionOptions; password?: string; type: "protectSheet" } | { password?: string; type: "unprotectSheet" } | { password?: string; type: "protectWorkbook" } | { password?: string; type: "unprotectWorkbook" }
```
