✨ feat(mq-web): add inlayHints API support#1432
Merged
Conversation
Expose inlayHints function and InlayHint type for mq code inlay type hints. Update core and index exports.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds mq-web wrapper support for exposing inferred type inlay hints from the underlying WASM bindings, and expands diagnostics to optionally include type-checking results.
Changes:
- Export
inlayHintsfrommq-web’s public entrypoint and addInlayHintto exported types. - Extend
diagnostics()to accept an optionalenableTypeCheckflag and forward it to the WASM layer. - Wire up the WASM module interface to include the new
inlayHintsfunction.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/mq-web/src/index.ts | Updates public exports to include inlayHints and the InlayHint type. |
| packages/mq-web/src/core.ts | Adds the inlayHints() wrapper and extends diagnostics() with an optional type-check flag. |
|
|
||
| // Re-export everything from core and types | ||
| export { run, format, diagnostics, definedValues, toAst } from "./core.js"; | ||
| export { run, format, diagnostics, inlayHints, definedValues, toAst } from "./core.js"; |
There was a problem hiding this comment.
The package entrypoint still doesn’t re-export htmlToMarkdown and toHtml from core.ts, even though those functions exist and are documented as importable from mq-web in packages/mq-web/README.md. This means consumers following the README will get missing-export errors; consider adding them to this export list to keep the public API consistent.
Suggested change
| export { run, format, diagnostics, inlayHints, definedValues, toAst } from "./core.js"; | |
| export { | |
| run, | |
| format, | |
| diagnostics, | |
| inlayHints, | |
| definedValues, | |
| toAst, | |
| htmlToMarkdown, | |
| toHtml, | |
| } from "./core.js"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose inlayHints function and InlayHint type for mq code inlay type hints. Update core and index exports.