diff options
| author | Adam Malczewski <[email protected]> | 2026-03-28 06:24:09 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-28 06:24:09 +0900 |
| commit | 80b35f3a606753ba804445e120eb9a7f05afef85 (patch) | |
| tree | 4f8787fae670e86515baed54e00087ce3ef28da6 /.rules | |
| parent | 023be9086a2da18b4dbb5dd429b4db250fa098ad (diff) | |
| download | ai-pulse-obsidian-plugin-80b35f3a606753ba804445e120eb9a7f05afef85.tar.gz ai-pulse-obsidian-plugin-80b35f3a606753ba804445e120eb9a7f05afef85.zip | |
fix so that build with strict mode works
Diffstat (limited to '.rules')
| -rw-r--r-- | .rules/changelog/2026-03/28/07.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.rules/changelog/2026-03/28/07.md b/.rules/changelog/2026-03/28/07.md new file mode 100644 index 0000000..e982dc0 --- /dev/null +++ b/.rules/changelog/2026-03/28/07.md @@ -0,0 +1,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. |
