Skip to content

Commit 21a58e1

Browse files
committed
test: fix typing issues in vue and preact tests
1 parent be85bc3 commit 21a58e1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/__tests__/preact.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ test('smoke test for preact', async () => {
5757
}
5858
});
5959

60+
/**
61+
* @type {import('preact').FunctionComponent<{ components?: Record<string, any> }>}
62+
*/
6063
const Component = getMDXComponent(result.code, jsxComponentConfig)
6164

62-
/** @param {Preact.JSX.HTMLAttributes<HTMLSpanElement>} props */
65+
/** @type {Preact.FunctionComponent<{ children:Preact.ComponentChildren }>} props */
6366
const SpanBold = ({children}) => {
6467
return Preact.createElement('span', { className: "strong" }, children)
6568
}

src/__tests__/vue.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ test('smoke test for vue', async () => {
5252
'./demo.tsx': demoTsx
5353
}
5454
});
55+
/**
56+
* @type {Vue.FunctionalComponent<{ components?: Record<string, any> }>}
57+
*/
5558
const Component = getMDXComponent(result.code, jsxComponentConfig)
5659

5760

@@ -70,7 +73,7 @@ test('smoke test for vue', async () => {
7073
const WrappedComponent = Vue.defineComponent({
7174
setup() {
7275
return () => Vue.h(Component, {
73-
'components': { strong: Sp anBold }
76+
'components': { strong: SpanBold }
7477
})
7578
}
7679
})

0 commit comments

Comments
 (0)