Skip to content

Commit 6cabf7f

Browse files
committed
fix preparing type helpers
1 parent e9fe51f commit 6cabf7f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/vnodeTransformers/stubComponentsTransformer.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
ComponentPropsOptions,
1818
ComponentObjectPropsOptions,
1919
Component,
20-
ComponentOptions
20+
AsyncComponentOptions
2121
} from 'vue'
2222
import { hyphenate } from '../utils/vueShared'
2323
import { matchName } from '../utils/matchName'
@@ -123,11 +123,14 @@ export const createStub = ({
123123
}
124124
})
125125

126-
const { __asyncLoader: asyncLoader } = type as ComponentOptions
126+
const { __asyncLoader: asyncLoader } = type as {
127+
__asyncLoader?: AsyncComponentOptions['loader']
128+
}
127129
if (asyncLoader) {
128130
asyncLoader().then(() => {
129131
registerStub({
130-
source: (type as ComponentOptions).__asyncResolved,
132+
source: (type as { __asyncResolved: ConcreteComponent | undefined })
133+
.__asyncResolved!,
131134
stub
132135
})
133136
})

0 commit comments

Comments
 (0)