Skip to content

Commit

Permalink
feat(types/script-setup): add generic type to defineExpose (#5035)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelDeMartin authored Dec 6, 2021
1 parent f73547f commit 34985fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/apiSetupHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function defineEmits() {
* This is only usable inside `<script setup>`, is compiled away in the
* output and should **not** be actually called at runtime.
*/
export function defineExpose(exposed?: Record<string, any>) {
export function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) {
if (__DEV__) {
warnRuntimeUsage(`defineExpose`)
}
Expand Down

0 comments on commit 34985fe

Please sign in to comment.