Skip to content

Commit d5265f6

Browse files
committed
refactor: fix type issues
1 parent a0d10f9 commit d5265f6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

__tests__/ssr/app/App.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { defineComponent, computed } from '@vue/composition-api'
1+
import {
2+
createComponent as defineComponent,
3+
computed,
4+
} from '@vue/composition-api'
25
import { useStore } from './store'
36

47
export default defineComponent({

src/ssrPlugin.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { VueConstructor } from 'vue/types'
22
import { setActiveReq } from './rootStore'
3+
import { SetupContext } from '@vue/composition-api'
34

45
export const PiniaSsr = (vue: VueConstructor) => {
56
const isServer = typeof window === 'undefined'
@@ -13,9 +14,11 @@ export const PiniaSsr = (vue: VueConstructor) => {
1314

1415
vue.mixin({
1516
beforeCreate() {
17+
// @ts-ignore
1618
const { setup, serverPrefetch } = this.$options
1719
if (setup) {
18-
this.$options.setup = (props, context) => {
20+
// @ts-ignore
21+
this.$options.setup = (props: any, context: SetupContext) => {
1922
// @ts-ignore
2023
setActiveReq(context.ssrContext.req)
2124
return setup(props, context)

0 commit comments

Comments
 (0)