refactor(superdoc): widen ExportParams.fieldsHighlightColor to string | null (SD-2828)#3107
Conversation
… | null (SD-2828) The runtime defaults this field to `null` when the consumer omits it, forwards that `null` through to `Editor.exportDocx` (which already types it as `string | null`), and on through the converter. The previous public typedef narrowed to `string`, so consumers passing the runtime-equivalent `null` failed strict-mode typechecks. Adds a consumer fixture covering the three valid shapes (string, null, omitted) plus a strict `Equal<A,B>` assertion so a future re-narrowing surfaces as a CI failure.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.37 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.3.0-next.81 |
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.79 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-cli v0.8.0-next.55 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.30.0-next.38 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.40 |
|
🎉 This PR is included in superdoc-cli v0.9.0 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.32.0 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/mcp v0.4.0 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/react v1.3.0 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.4.0 |
|
🎉 This PR is included in superdoc-sdk v1.9.0 |
The runtime defaults `fieldsHighlightColor` to `null` when the consumer omits it, forwards that `null` straight through to `Editor.exportDocx` (which already types it as `string | null`), and on through the converter. The previous public typedef narrowed to `string`, so consumers passing the runtime-equivalent `null` failed strict-mode typechecks on a value the runtime accepts.
Three follow-on changes:
Why now: penultimate item on the SD-2828 closeout list, after provider widening (#3101) and SearchMatch publicization (#3105). No runtime change.
Verified: consumer matrix 41/41, check:jsdoc clean, build:es declaration audit clean, SuperDoc.test.js 79/79.