Просмотр исходного кода

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

Noel De Martin 1 год назад
Родитель
Сommit
635a59b96f
1 измененных файлов с 1 добавлено и 1 удалено
  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