Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Apr 30, 2024
1 parent 3fdd529 commit f8bbcc4
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 90 deletions.
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,14 @@
"typescript": "latest",
"vite": "latest",
"vitest": "latest"
},
"pnpm": {
"overrides": {
"@vue/runtime-dom": "alpha",
"@vue/shared": "alpha",
"@vue/compiler-dom": "alpha",
"@vue/compiler-sfc": "alpha",
"vue": "alpha"
}
}
}
4 changes: 2 additions & 2 deletions packages/language-core/lib/codegen/script/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ export function* generateScriptSetupOptions(
if (options.vueCompilerOptions.target >= 3.5) {
// https://github.com/vuejs/core/pull/10801
if (scriptSetupRanges.props.define?.typeArg) {
yield `__typeProps: typeof __VLS_typeProps,${newLine}`;
yield `__typeProps: __VLS_typeProps,${newLine}`;
}
if (scriptSetupRanges.emits.define?.typeArg) {
yield `__typeEmits: typeof ${scriptSetupRanges.emits.name ?? '__VLS_emit'},${newLine}`;
yield `__typeEmits: ${scriptSetupRanges.emits.name ?? '__VLS_emit'},${newLine}`;
}
}
}
162 changes: 75 additions & 87 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test-workspace/tsc/vue3/#3779/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ defineProps<{
</script>

<template>
<h1>{{ exactType(optionalBoolean, true as boolean) }}</h1>
<h1>{{ exactType(optionalBoolean, {} as boolean | undefined) }}</h1>
</template>

0 comments on commit f8bbcc4

Please sign in to comment.