Skip to content

Commit eeeb6b6

Browse files
authored
chore: add proper types to OgImage Package.d.vue.ts workaround (#1217)
1 parent 62841f9 commit eeeb6b6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1-
declare const _default: any
1+
// This type declaration file is required to break a circular type resolution in vue-tsc.
2+
//
3+
// nuxt-og-image generates a type declaration (.nuxt/module/nuxt-og-image.d.ts) that imports
4+
// this component's type. This creates a cycle: nuxt.d.ts → nuxt-og-image.d.ts → Package.vue →
5+
// needs auto-import globals from nuxt.d.ts. Without this file, vue-tsc resolves the component
6+
// before the globals are available, so all auto-imports (computed, toRefs, useFetch, etc.) fail.
7+
8+
import type { DefineComponent } from 'vue'
9+
10+
declare const _default: DefineComponent<{
11+
name: string
12+
version: string
13+
primaryColor?: string
14+
}>
215

316
export default _default

0 commit comments

Comments
 (0)