diff --git a/types/index.d.ts b/types/index.d.ts index db8ece7..10202fd 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,7 +1,6 @@ // Minimum TypeScript Version: 4.0 /* eslint-disable @typescript-eslint/no-explicit-any */ -import {EmitsOptions} from 'vue' import {MountingOptions} from '@vue/test-utils' import {queries, EventType, BoundFunctions} from '@testing-library/dom' // eslint-disable-next-line import/no-extraneous-dependencies @@ -22,7 +21,7 @@ export interface RenderResult extends BoundFunctions { debug: Debug unmount(): void html(): string - emitted(): EmitsOptions + emitted(): Record rerender(props: object): Promise } diff --git a/types/test.ts b/types/test.ts index a2459ba..5adf53a 100644 --- a/types/test.ts +++ b/types/test.ts @@ -84,6 +84,11 @@ export function testOptions() { }) } +export function testEmitted() { + const {emitted} = render(SomeComponent) + emitted().foo // $ExpectType unknown[] +} + /* eslint testing-library/prefer-explicit-assert: "off",