Fix any cases in md extension#269779
Merged
mjbvz merged 6 commits intomicrosoft:mainfrom Feb 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes unnecessary any type casts and consolidates type imports in the markdown language features extension. The changes aim to improve type safety by replacing any casts with more specific type annotations and removing redundant type imports.
Key changes:
- Consolidated Token type imports to use
MarkdownIt.Tokeninstead of separate imports - Replaced
anycasts with more specific type annotations likeunknownand proper interfaces - Updated package dependencies to newer versions
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/markdownEngine.ts |
Removed separate Token import, updated all Token references to use MarkdownIt.Token namespace, removed unnecessary any cast |
src/languageFeatures/diagnostics.ts |
Replaced any cast with unknown cast and proper Record type annotation |
src/client/protocol.ts |
Removed separate Token import, updated parse request type to use md.Token[] |
preview-src/index.ts |
Added proper State interface, removed multiple any casts, improved type safety |
package.json |
Updated morphdom and @types/markdown-it dependencies to newer versions |
notebook/index.ts |
Removed separate Token import, updated all Token references to MarkdownIt.Token, improved function signature types |
Files not reviewed (1)
- extensions/markdown-language-features/package-lock.json: Language not supported
dmitrivMS
previously approved these changes
Oct 3, 2025
Collaborator
Author
|
Seriously considering if we can switch off of webpack because I cannot seem to track down why it doesn't check the TS the same way as tsc despite me giving it the same tsconfig |
Member
|
esbuild all the way ✨ |
rzhao271
approved these changes
Feb 12, 2026
Fixed CI. Should be good now that markdown is using esbuild
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.
For #269213