Skip to content

refactor(superdoc): type four implicit-any params (SD-2867 phase B)#3065

Merged
caio-pizzol merged 2 commits into
mainfrom
caio/SD-2867-phase-b-implicit-any-params
May 1, 2026
Merged

refactor(superdoc): type four implicit-any params (SD-2867 phase B)#3065
caio-pizzol merged 2 commits into
mainfrom
caio/SD-2867-phase-b-implicit-any-params

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Stacked on #3064. Adds JSDoc @param annotations to four implicit-any function parameters in SuperDoc.js so they stop reporting as any under strict TS.

  • #init(config, container) β€” typed as (Config, HTMLElement) to match the constructor's call site (which already validates container instanceof HTMLElement).
  • #patchNaiveUIStyles β€” the document.createElement override gets @param {string} tagName so the inner tagName.toLowerCase() call typechecks.
  • setExceptionHandler callback β€” payload typed as unknown since the store contract isn't on the public surface; the handler just forwards to emit('exception', payload).
  • #log(...args) β€” args: unknown[] matches the underlying console.debug/log rest signature.

The Yjs metaMap.observe((event) => ...) call still has an implicit-any event; deferring that one because typing it cleanly requires importing YMapEvent and risks pulling Yjs ambient types into a separate type cascade.

No public surface change; internal-only typing.

Verified: pnpm --filter superdoc check:jsdoc clean; pnpm --filter superdoc build:es declaration audit clean; node tests/consumer-typecheck/typecheck-matrix.mjs 33 passed, 0 failed.

@caio-pizzol caio-pizzol requested a review from a team as a code owner May 1, 2026 21:08
@linear
Copy link
Copy Markdown

linear Bot commented May 1, 2026

Base automatically changed from caio/SD-2867-phase-b-implicit-any to main May 1, 2026 21:19
@caio-pizzol caio-pizzol merged commit 4641084 into main May 1, 2026
46 checks passed
@caio-pizzol caio-pizzol deleted the caio/SD-2867-phase-b-implicit-any-params branch May 1, 2026 21:19
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

πŸŽ‰ This PR is included in superdoc-cli v0.8.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

πŸŽ‰ This PR is included in superdoc-sdk v1.8.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

πŸŽ‰ This PR is included in @superdoc-dev/mcp v0.3.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 1, 2026

πŸŽ‰ This PR is included in superdoc v1.31.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 2, 2026

πŸŽ‰ This PR is included in @superdoc-dev/mcp v0.3.0-next.33

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 2, 2026

πŸŽ‰ This PR is included in @superdoc-dev/react v1.2.0-next.75

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 2, 2026

πŸŽ‰ This PR is included in vscode-ext v2.3.0-next.77

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 2, 2026

πŸŽ‰ This PR is included in superdoc-sdk v1.8.0-next.37

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 5, 2026

πŸŽ‰ This PR is included in vscode-ext v2.3.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 7, 2026

πŸŽ‰ This PR is included in @superdoc-dev/react v1.3.0

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant