Skip to content

Commit

Permalink
fix: add functions to scoped slots typing (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
healqq authored and eddyerburgh committed Nov 9, 2018
1 parent 22499a4 commit 8db0c20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/test-utils/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ interface MountOptions<V extends Vue> extends ComponentOptions<V> {
mocks?: object | false
parentComponent?: Component
slots?: Slots
scopedSlots?: Record<string, string>
scopedSlots?: Record<string, string | Function>
stubs?: Stubs | false,
attrs?: Record<string, string>
listeners?: Record<string, Function | Function[]>
Expand Down
6 changes: 6 additions & 0 deletions packages/test-utils/types/test/shallow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ shallowMount(ClassComponent, {
foo: [normalOptions, functionalOptions],
baz: ClassComponent
},
scopedSlots: {
scopedFoo: `<div>scopedFoo</div>`,
scopedBaz() {
return `<div>scopedBaz</div>`;
},
},
stubs: {
foo: normalOptions,
bar: functionalOptions,
Expand Down

0 comments on commit 8db0c20

Please sign in to comment.