summaryrefslogtreecommitdiff
path: root/examples/framework-lit/src
diff options
context:
space:
mode:
authorGravatar Erika <3019731+Princesseuh@users.noreply.github.com> 2023-05-02 16:37:41 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-02 16:37:41 +0200
commit8dd43db93f9466b50f8b635c693589c86ef762e3 (patch)
treea8a464e0d8aa4691f329d222683be7be7a93b947 /examples/framework-lit/src
parent5371efe42950be7b17739d99ae017b50b6ad459a (diff)
downloadastro-8dd43db93f9466b50f8b635c693589c86ef762e3.tar.gz
astro-8dd43db93f9466b50f8b635c693589c86ef762e3.tar.zst
astro-8dd43db93f9466b50f8b635c693589c86ef762e3.zip
fix: update lit example to properly ignore error (#6964)
Diffstat (limited to 'examples/framework-lit/src')
-rw-r--r--examples/framework-lit/src/pages/index.astro15
1 files changed, 9 insertions, 6 deletions
diff --git a/examples/framework-lit/src/pages/index.astro b/examples/framework-lit/src/pages/index.astro
index 1c7b45ce8..a351b8248 100644
--- a/examples/framework-lit/src/pages/index.astro
+++ b/examples/framework-lit/src/pages/index.astro
@@ -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>