Skip to content

Commit

Permalink
fix: typing legacy capi defineComponent (#994)
Browse files Browse the repository at this point in the history
* fix: typing legacy capi `defineComponent`

* refactor:  Import `ComputedRef` as type-only

* refactor: separate type-only imports
  • Loading branch information
konkarin authored Dec 1, 2023
1 parent 14a9143 commit e6b5c5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/bridge/src/runtime/capi.legacy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defu } from 'defu'
import { ComputedRef, computed, getCurrentInstance as getVM, isReactive, isRef, onBeforeMount, onServerPrefetch, reactive, ref, set, shallowRef, toRaw, toRefs, watch } from 'vue'
import type { ComputedRef } from 'vue'
import { computed, defineComponent as defineComponentVue, getCurrentInstance as getVM, isReactive, isRef, onBeforeMount, onServerPrefetch, reactive, ref, set, shallowRef, toRaw, toRefs, watch } from 'vue'
import type { Route } from 'vue-router'
import type { Nuxt2Context } from '@nuxt/bridge-schema'
import { useNuxtApp } from './nuxt'
Expand Down Expand Up @@ -217,7 +218,7 @@ const getHeadOptions = (options) => {
return { head }
}

export const defineComponent = (options) => {
export const defineComponent: typeof defineComponentVue = (options) => {
if (!('head' in options)) { return options }

return {
Expand Down

0 comments on commit e6b5c5d

Please sign in to comment.