Skip to content

Commit

Permalink
refactor: stubs types
Browse files Browse the repository at this point in the history
  • Loading branch information
cexbrayat committed Sep 16, 2022
1 parent 288d3a5 commit 43bc117
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/stubs.ts
Expand Up @@ -31,7 +31,7 @@ export type CustomCreateStub = (params: {

interface StubOptions {
name: string
type?: ConcreteComponent
type?: VNodeTypes | typeof Teleport
renderStubDefaultSlot?: boolean
}

Expand Down Expand Up @@ -89,7 +89,7 @@ export const createStub = ({

return defineComponent({
name: name || anonName,
props: componentOptions.props || {},
props: (componentOptions as ConcreteComponent).props || {},
// fix #1550 - respect old-style v-model for shallow mounted components with @vue/compat
// @ts-expect-error
model: componentOptions.model,
Expand Down Expand Up @@ -171,7 +171,7 @@ export function stubComponents(
return [
createStub({
name: 'transition',
type: type as any,
type,
renderStubDefaultSlot: true
}),
props,
Expand All @@ -186,7 +186,7 @@ export function stubComponents(
return [
createStub({
name: 'transition-group',
type: type as any,
type,
renderStubDefaultSlot: true
}),
props,
Expand All @@ -201,7 +201,7 @@ export function stubComponents(
return [
createStub({
name: 'teleport',
type: type as any,
type,
renderStubDefaultSlot: true
}),
props,
Expand Down

0 comments on commit 43bc117

Please sign in to comment.