Skip to content

Commit 6e3abc8

Browse files
committed
fix(compiler-sfc): fix script setup ts helpers
1 parent 8485cd4 commit 6e3abc8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/compiler-sfc/src/compileScript.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ export function compileScript(
358358

359359
let propsType = `{}`
360360
let emitType = `(e: string, ...args: any[]) => void`
361-
let slotsType = `__Slots__`
361+
let slotsType = `Slots`
362362
let attrsType = `Record<string, any>`
363363

364364
let propsASTNode
@@ -662,7 +662,7 @@ export function compileScript(
662662
// 7. finalize setup argument signature.
663663
let args = ``
664664
if (isTS) {
665-
if (slotsType === '__Slots__') {
665+
if (slotsType === 'Slots') {
666666
helperImports.add('Slots')
667667
}
668668
const ctxType = `{
@@ -726,7 +726,7 @@ export function compileScript(
726726
const runtimeProps = genRuntimeProps(typeDeclaredProps)
727727
const runtimeEmits = genRuntimeEmits(typeDeclaredEmits)
728728
s.append(
729-
`export default __defineComponent__({${def}${runtimeProps}${runtimeEmits}\n setup\n})`
729+
`export default defineComponent({${def}${runtimeProps}${runtimeEmits}\n setup\n})`
730730
)
731731
} else {
732732
if (defaultExport) {

0 commit comments

Comments
 (0)