chore: make types pass in vapor directive tests

This commit is contained in:
Evan You 2024-12-10 19:41:29 +08:00
parent 5648dda0c0
commit 7f3b883aea
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
2 changed files with 6 additions and 1 deletions

View File

@ -6,8 +6,11 @@ import {
setClass, setClass,
setDOMProp, setDOMProp,
template, template,
// @ts-expect-error
vModelDynamic, vModelDynamic,
// @ts-expect-error
vModelSelect, vModelSelect,
// @ts-expect-error
withDirectives, withDirectives,
} from '../../src' } from '../../src'
import { makeRender } from '../_utils' import { makeRender } from '../_utils'

View File

@ -3,7 +3,9 @@ import {
createComponent, createComponent,
on, on,
template, template,
// @ts-expect-error
vShow, vShow,
// @ts-expect-error
withDirectives, withDirectives,
} from '../../src' } from '../../src'
import { nextTick, ref } from 'vue' import { nextTick, ref } from 'vue'
@ -70,7 +72,7 @@ describe.todo('directive: v-show', () => {
const { host } = define({ const { host } = define({
render() { render() {
const n1 = t1() const n1 = t1()
const n2 = createComponent(Child, [], null, true) const n2 = createComponent(Child, null, null, true)
withDirectives(n2, [[vShow, () => visible.value]]) withDirectives(n2, [[vShow, () => visible.value]])
on(n1 as HTMLElement, 'click', () => handleClick) on(n1 as HTMLElement, 'click', () => handleClick)
return [n1, n2] return [n1, n2]