Skip to content

P35: strict checkjs for web-ai/doctor.mjs#36

Merged
lidge-jun merged 2 commits into
mainfrom
chore/strict-migration-p35
May 5, 2026
Merged

P35: strict checkjs for web-ai/doctor.mjs#36
lidge-jun merged 2 commits into
mainfrom
chore/strict-migration-p35

Conversation

@lidge-jun
Copy link
Copy Markdown
Owner

P35: web-ai/doctor.mjs strict checkjs

VERDICT-B per-file // @ts-check + JSDoc. No runtime change.

  • 9 functions JSDoc'd
  • FeatureDefinition typedef, PROVIDER_HOSTS as Readonly<Record<string, Set>>
    featureMap
  • Append to tsconfig.checkjs-dom.json
  • All 4 gates

lidge-jun and others added 2 commits May 6, 2026 06:26
Annotate doctor.mjs (215 lines) with // @ts-check + JSDoc. Add to
tsconfig.checkjs-dom.json. No runtime change.

- FeatureDefinition typedef
- PROVIDER_HOSTS typed Readonly<Record<string, Set<string>>>
- 9 functions JSDoc'd; loose options as Record<string, any>
 string[] when passing feature.selectors to selectorMatchSummary/domHashAround (preserves runtime exactly)
- Cast unknown err in catch
- Cast EditorContract to any when passed as featureMap
- All 4 gates pass

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Restore summarizeSessionForDoctor to 1-arg signature; cast at call site
- Replace catch-block local 'e' binding with inline /** @type {any} */ casts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lidge-jun lidge-jun merged commit 7084e17 into main May 5, 2026
2 checks passed
@lidge-jun lidge-jun deleted the chore/strict-migration-p35 branch May 6, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant