-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch for Astro VS Code Plugin type errors #10562
Conversation
Adding 'as any' to suppress Astro VS Code extension complaining
🦋 Changeset detectedLatest commit: bf1c583 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thank you for contributing! I think the cast here are actually unsafe, and this PR has some overlap with #10561. I'll commit just a few small changes, and we'll get it merged. |
@@ -89,7 +89,7 @@ const highlighter = await getCachedHighlighter({ | |||
|
|||
const html = highlighter.highlight(code, typeof lang === 'string' ? lang : lang.name, { | |||
inline, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewers, those cast look suspicious, but there's actually already a bunch of said casts in the file. I don't really know why, perhaps @bluwy has more context having worked on Shiki recently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, not sure what happened, GitHub moved my comment.. but I'm talking about the as any
casts on lang
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have had these fixes all alang
Changes
Closes #10560
Suggestive changes to typing that seems to silence the errors generated by the Astro VS Code plugin in a fresh project setup with the
/examples/framework-react
example as outlined in #10560Testing
Tested in project, type annotation changes only
Docs
N/A