Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: stubs types #1773

Merged
merged 1 commit into from Sep 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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