Skip to content

Commit

Permalink
fix(compiler-sfc): fix script setup ts helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 30, 2020
1 parent 8485cd4 commit 6e3abc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export function compileScript(

let propsType = `{}`
let emitType = `(e: string, ...args: any[]) => void`
let slotsType = `__Slots__`
let slotsType = `Slots`
let attrsType = `Record<string, any>`

let propsASTNode
Expand Down Expand Up @@ -662,7 +662,7 @@ export function compileScript(
// 7. finalize setup argument signature.
let args = ``
if (isTS) {
if (slotsType === '__Slots__') {
if (slotsType === 'Slots') {
helperImports.add('Slots')
}
const ctxType = `{
Expand Down Expand Up @@ -726,7 +726,7 @@ export function compileScript(
const runtimeProps = genRuntimeProps(typeDeclaredProps)
const runtimeEmits = genRuntimeEmits(typeDeclaredEmits)
s.append(
`export default __defineComponent__({${def}${runtimeProps}${runtimeEmits}\n setup\n})`
`export default defineComponent({${def}${runtimeProps}${runtimeEmits}\n setup\n})`
)
} else {
if (defaultExport) {
Expand Down

0 comments on commit 6e3abc8

Please sign in to comment.