Explorar o código

fix(types): support generic argument in setup context expose method (#8507)

Noel De Martin %!s(int64=2) %!d(string=hai) anos
pai
achega
635a59b96f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/runtime-core/src/component.ts

+ 1 - 1
packages/runtime-core/src/component.ts

@@ -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