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

fix: update lit example to properly ignore error #6964

Merged
merged 1 commit into from
May 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions examples/framework-lit/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ import { MyCounter } from '../components/my-counter.js';
<Lorem />

{
/**
* Our VS Code extension does not currently properly typecheck attributes on Lit components
* As such, the following code will result in a TypeScript error inside the editor, nonetheless, it works in Astro!
*/
(
/**
* Our editor tooling does not currently properly typecheck attributes on imported Lit components. As such, without a
* pragma directive telling TypeScript to ignore the error, the line below will result in an error in the editor.
* Nonetheless, this code works in Astro itself!
*/
// @ts-expect-error
<CalcAdd num={0} />
)
}
{/** @ts-expect-error */}
<CalcAdd num={0} />
</body>
</html>