Skip to content

Commit c1e1119

Browse files
committed
Add test components param type annotations
1 parent cdaab93 commit c1e1119

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ test('components', async function (t) {
493493
toJsxRuntime(h('b#x'), {
494494
...production,
495495
components: {
496+
/**
497+
* @param {{id: unknown}} props
498+
*/
496499
b(props) {
497500
// Note: types for this are working.
498501
assert(props.id === 'x')
@@ -541,6 +544,9 @@ test('components', async function (t) {
541544
...production,
542545
passNode: true,
543546
components: {
547+
/**
548+
* @param {{node: unknown}} props
549+
*/
544550
b(props) {
545551
assert.ok(props.node)
546552
return 'a'
@@ -559,6 +565,9 @@ test('components', async function (t) {
559565
toJsxRuntime(h('b'), {
560566
...production,
561567
components: {
568+
/**
569+
* @param {{node: unknown}} props
570+
*/
562571
b(props) {
563572
assert.equal(props.node, undefined)
564573
return 'a'

0 commit comments

Comments
 (0)