Skip to content

Commit 8db0c20

Browse files
healqqeddyerburgh
authored andcommitted
fix: add functions to scoped slots typing (#1022)
1 parent 22499a4 commit 8db0c20

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: packages/test-utils/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ interface MountOptions<V extends Vue> extends ComponentOptions<V> {
132132
mocks?: object | false
133133
parentComponent?: Component
134134
slots?: Slots
135-
scopedSlots?: Record<string, string>
135+
scopedSlots?: Record<string, string | Function>
136136
stubs?: Stubs | false,
137137
attrs?: Record<string, string>
138138
listeners?: Record<string, Function | Function[]>

Diff for: packages/test-utils/types/test/shallow.ts

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ shallowMount(ClassComponent, {
3333
foo: [normalOptions, functionalOptions],
3434
baz: ClassComponent
3535
},
36+
scopedSlots: {
37+
scopedFoo: `<div>scopedFoo</div>`,
38+
scopedBaz() {
39+
return `<div>scopedBaz</div>`;
40+
},
41+
},
3642
stubs: {
3743
foo: normalOptions,
3844
bar: functionalOptions,

0 commit comments

Comments
 (0)