Skip to content

Commit

Permalink
fix(types): return type should include props and emits keys
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusBorg committed Nov 6, 2022
1 parent 3522db3 commit 4c38321
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/createComposable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ export /* @__PURE__ */ function createComposableFromMixin<
E,
EE
>
): () => ToRefs<D> & ToRefs<ExtractComputedReturns<C>> & M {
): (() => ToRefs<D> & ToRefs<ExtractComputedReturns<C>> & M) & {
props: PropsOptions
emits: E
} {
// type Props = Readonly<ExtractPropTypes<PropsOptions>> & EmitsToProps<E>
// type VM = CreateComponentPublicInstance<
// Props,
Expand Down Expand Up @@ -231,7 +234,7 @@ export /* @__PURE__ */ function createComposableFromMixin<
props,
emits,
})
return composable as typeof composable & { props: Props; emits: E }
return composable as typeof composable & { props: PropsOptions; emits: E }
}

function createWatcher(
Expand Down

0 comments on commit 4c38321

Please sign in to comment.