refactor(superdoc): type four implicit-any params (SD-2867 phase B)#3065
Conversation
|
π This PR is included in superdoc-cli v0.8.0 The release is available on GitHub release |
|
π This PR is included in superdoc-sdk v1.8.0 |
|
π This PR is included in @superdoc-dev/mcp v0.3.0 The release is available on GitHub release |
|
π This PR is included in superdoc v1.31.0 The release is available on GitHub release |
|
π This PR is included in @superdoc-dev/mcp v0.3.0-next.33 The release is available on GitHub release |
|
π This PR is included in @superdoc-dev/react v1.2.0-next.75 The release is available on GitHub release |
|
π This PR is included in vscode-ext v2.3.0-next.77 |
|
π This PR is included in superdoc-sdk v1.8.0-next.37 |
|
π This PR is included in vscode-ext v2.3.0 |
|
π This PR is included in @superdoc-dev/react v1.3.0 The release is available on GitHub release |
Stacked on #3064. Adds JSDoc
@paramannotations to four implicit-any function parameters in SuperDoc.js so they stop reporting asanyunder strict TS.#init(config, container)β typed as(Config, HTMLElement)to match the constructor's call site (which already validatescontainer instanceof HTMLElement).#patchNaiveUIStylesβ thedocument.createElementoverride gets@param {string} tagNameso the innertagName.toLowerCase()call typechecks.setExceptionHandlercallback βpayloadtyped asunknownsince the store contract isn't on the public surface; the handler just forwards toemit('exception', payload).#log(...args)βargs: unknown[]matches the underlyingconsole.debug/logrest signature.The Yjs
metaMap.observe((event) => ...)call still has an implicit-anyevent; deferring that one because typing it cleanly requires importingYMapEventand risks pulling Yjs ambient types into a separate type cascade.No public surface change; internal-only typing.
Verified:
pnpm --filter superdoc check:jsdocclean;pnpm --filter superdoc build:esdeclaration audit clean;node tests/consumer-typecheck/typecheck-matrix.mjs33 passed, 0 failed.