Przeglądaj źródła

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

Noel De Martin 1 rok temu
rodzic
commit
635a59b96f
1 zmienionych plików z 1 dodań i 1 usunięć
  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