Skip to content

Commit 43bc117

Browse files
committed
refactor: stubs types
1 parent 288d3a5 commit 43bc117

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/stubs.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export type CustomCreateStub = (params: {
3131

3232
interface StubOptions {
3333
name: string
34-
type?: ConcreteComponent
34+
type?: VNodeTypes | typeof Teleport
3535
renderStubDefaultSlot?: boolean
3636
}
3737

@@ -89,7 +89,7 @@ export const createStub = ({
8989

9090
return defineComponent({
9191
name: name || anonName,
92-
props: componentOptions.props || {},
92+
props: (componentOptions as ConcreteComponent).props || {},
9393
// fix #1550 - respect old-style v-model for shallow mounted components with @vue/compat
9494
// @ts-expect-error
9595
model: componentOptions.model,
@@ -171,7 +171,7 @@ export function stubComponents(
171171
return [
172172
createStub({
173173
name: 'transition',
174-
type: type as any,
174+
type,
175175
renderStubDefaultSlot: true
176176
}),
177177
props,
@@ -186,7 +186,7 @@ export function stubComponents(
186186
return [
187187
createStub({
188188
name: 'transition-group',
189-
type: type as any,
189+
type,
190190
renderStubDefaultSlot: true
191191
}),
192192
props,
@@ -201,7 +201,7 @@ export function stubComponents(
201201
return [
202202
createStub({
203203
name: 'teleport',
204-
type: type as any,
204+
type,
205205
renderStubDefaultSlot: true
206206
}),
207207
props,

0 commit comments

Comments
 (0)