瀏覽代碼

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

Noel De Martin 1 年之前
父節點
當前提交
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