fix(hooks): [use-attrs] fix type error (#8558)

* fix(hooks): [use-attrs] fix type error
This commit is contained in:
zz 2022-07-10 18:02:40 +08:00 committed by GitHub
parent 2fce0f1d3b
commit 5399d7c882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,3 @@
// @ts-nocheck
import { computed, defineComponent } from 'vue'
import { mount } from '@vue/test-utils'
import { afterEach, describe, expect, it, vi } from 'vitest'
@ -21,7 +20,7 @@ const genComp = (
) => {
return defineComponent({
inheritAttrs,
props: {},
props: {} as Record<string, any>,
setup() {
const attrs = useAttrs({ excludeListeners, excludeKeys })
return () => (
@ -40,8 +39,6 @@ const _mount = (Comp: ReturnType<typeof genComp>) => {
<Comp
class={CLASS}
style={{ width: WIDTH }}
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
onClick={handleClick}
{...{ [TEST_KEY]: TEST_VALUE }}
/>