Skip to content

Commit 800e33e

Browse files
authored
Merge pull request #213 from Hagendorn/fix/missing-context-in-types
fix: add missing supported Svelte options to SvelteComponentOptions #212
2 parents 66c9f45 + 4cd7a7e commit 800e33e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

types/index.d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
// Definitions by: Rahim Alwer <https://github.com/mihar-22>
44

55
import {queries, Queries, BoundFunction, EventType} from '@testing-library/dom'
6-
import { SvelteComponent, ComponentProps } from 'svelte'
6+
7+
import { SvelteComponent, ComponentProps, ComponentConstructorOptions } from 'svelte'
78

89
export * from '@testing-library/dom'
910

10-
type SvelteComponentOptions<C extends SvelteComponent> = ComponentProps<C> | {props: ComponentProps<C>}
11+
type SvelteComponentOptions<C extends SvelteComponent> = ComponentProps<C> | Pick<ComponentConstructorOptions<ComponentProps<C>>, "anchor" | "props" | "hydrate" | "intro" | "context">
1112

1213
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
1314

0 commit comments

Comments
 (0)