summaryrefslogtreecommitdiffhomepage
path: root/.rules/changelog/2026-03/28/07.md
blob: e982dc00c91c5029f33364a2a202c69ed2032f07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Fix 52 TypeScript strict-mode build errors

## Files Changed
- `src/chat-view.ts`
- `src/vault-context.ts`

## Changes

### `never` type in catch block (chat-view.ts, 4 errors)
- `currentBubble` was inferred as `never` inside the `catch` block because TypeScript loses track of closure-mutated `let` variables across `await` boundaries.
- Fixed by capturing into a local `const` with an explicit `as HTMLDivElement | null` type assertion.

### TS4111 index signature access (chat-view.ts, 46 errors)
- `noPropertyAccessFromIndexSignature` is enabled; properties on `Record<string, unknown>` must use bracket notation.
- Changed all dot-notation accesses (`args.file_path`, `args.operations`, `o.properties`, etc.) to bracket notation (`args['file_path']`, etc.) across:
  - `appendToolCall` (edit_file branch)
  - `showApprovalRequest` (edit_file, set_frontmatter, create_file branches)
  - `renderBatchDeleteApproval`
  - `renderBatchMoveApproval`
  - `renderBatchSetFrontmatterApproval`
  - `renderBatchEditApproval`

### TS4111 frontmatter tags (vault-context.ts, 2 errors)
- Changed `cache.frontmatter?.tags` to `cache.frontmatter?.['tags']` for the same index signature rule.