Skip to content
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

Merged
merged 6 commits into from Mar 26, 2024
Merged

Conversation

apetta
Copy link
Contributor

@apetta apetta commented Mar 26, 2024

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 #10560

Testing

Tested in project, type annotation changes only

Docs

N/A

Adding 'as any' to suppress Astro VS Code extension complaining
Copy link

changeset-bot bot commented Mar 26, 2024

🦋 Changeset detected

Latest 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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 26, 2024
@Princesseuh
Copy link
Member

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,
Copy link
Member

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?

Copy link
Member

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.

@Princesseuh Princesseuh linked an issue Mar 26, 2024 that may be closed by this pull request
1 task
Copy link
Contributor

@bholmesdev bholmesdev left a 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

@bholmesdev bholmesdev merged commit 348c1ca into withastro:main Mar 26, 2024
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type Errors in examples/framework-react on init in VS Code
3 participants