Skip to content

Commit 34985fe

Browse files
authored
feat(types/script-setup): add generic type to defineExpose (#5035)
1 parent f73547f commit 34985fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-core/src/apiSetupHelpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function defineEmits() {
118118
* This is only usable inside `<script setup>`, is compiled away in the
119119
* output and should **not** be actually called at runtime.
120120
*/
121-
export function defineExpose(exposed?: Record<string, any>) {
121+
export function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) {
122122
if (__DEV__) {
123123
warnRuntimeUsage(`defineExpose`)
124124
}

0 commit comments

Comments
 (0)