Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 181765f

Browse files
authored
fix(types): Pass Store type to RenderOptions/render function (#268)
1 parent 4316bd3 commit 181765f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎types/index.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ type Routes = any
4141
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4242
type Router = any
4343

44-
export interface RenderOptions<V extends Vue>
44+
export interface RenderOptions<V extends Vue,S=Store>
4545
// The props and store options special-cased by Vue Testing Library and NOT passed to mount().
4646
extends Omit<ThisTypedMountOptions<V>, 'store' | 'props'> {
4747
props?: object
48-
store?: Store
48+
store?: S
4949
routes?: Routes
5050
container?: Element
5151
baseElement?: Element
@@ -61,9 +61,11 @@ export type ConfigurationCallback<V extends Vue> =
6161
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6262
| ((localVue: typeof Vue, store: Store, router: Router) => void)
6363

64-
export function render<V extends Vue>(
64+
export function render<V extends Vue,S=Store>(
6565
TestComponent: VueClass<V> | ComponentOptions<V>,
66-
options?: RenderOptions<V>,
66+
// eslint-disable-next-line @typescript-eslint/ban-tslint-comment
67+
// tslint:disable-next-line no-unnecessary-generics
68+
options?: RenderOptions<V, S>,
6769
configure?: ConfigurationCallback<V>,
6870
): RenderResult
6971

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /