]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types): support generic argument in setup context expose method (#8507)
authorNoel De Martin <noel@noeldemartin.com>
Wed, 5 Jun 2024 15:36:52 +0000 (17:36 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Jun 2024 15:36:52 +0000 (23:36 +0800)
packages/runtime-core/src/component.ts

index 3481fc3385c77c9a40339982058714434b7f60ee..a4109efedf0e82d67dd136f2a75d7a54b4c38c09 100644 (file)
@@ -234,7 +234,7 @@ export type SetupContext<
       attrs: Data
       slots: UnwrapSlotsType<S>
       emit: EmitFn<E>
-      expose: (exposed?: Record<string, any>) => void
+      expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void
     }
   : never