From e19f3cad8489f625f4303d2f7f3255e9aa7fd049 Mon Sep 17 00:00:00 2001 From: KCM Date: Mon, 16 Mar 2026 15:25:19 -0500 Subject: [PATCH 1/4] chore: strip types when using ts. --- playwright/app.spec.ts | 21 +++++++++++++++++++++ src/app.js | 7 ++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/playwright/app.spec.ts b/playwright/app.spec.ts index 8a13532..52392d5 100644 --- a/playwright/app.spec.ts +++ b/playwright/app.spec.ts @@ -8,6 +8,11 @@ const waitForInitialRender = async (page: Page) => { await expect(page.locator('#cdn-loading')).toHaveAttribute('hidden', '') } +const setComponentEditorSource = async (page: Page, source: string) => { + const editorContent = page.locator('.component-panel .cm-content').first() + await editorContent.fill(source) +} + test('renders default playground preview', async ({ page }) => { await waitForInitialRender(page) @@ -49,6 +54,22 @@ test('renders in react mode with css modules', async ({ page }) => { await expect(previewItems.first()).toContainText('apple') }) +test('transpiles TypeScript annotations in component source', async ({ page }) => { + await waitForInitialRender(page) + + await page.getByLabel('ShadowRoot (open)').uncheck() + await setComponentEditorSource( + page, + [ + 'const Button = ({ label }: { label: string }): unknown => ', + 'const App = () => - +
+ + +
+
+ + +