From 75794ec60b3ce90a03e389d6288e43e91665e10a Mon Sep 17 00:00:00 2001 From: ymmooot Date: Wed, 11 Dec 2024 19:42:15 +0900 Subject: [PATCH] fix: export JsonLD and JsonLDFunc types Closes: #1363 --- packages/nuxt-jsonld/src/module.ts | 1 + packages/nuxt-jsonld/src/runtime/composable.ts | 1 + packages/nuxt-jsonld/src/types/{index.d.ts => index.ts} | 0 3 files changed, 2 insertions(+) rename packages/nuxt-jsonld/src/types/{index.d.ts => index.ts} (100%) diff --git a/packages/nuxt-jsonld/src/module.ts b/packages/nuxt-jsonld/src/module.ts index 2cb741c6..dfdd70ed 100644 --- a/packages/nuxt-jsonld/src/module.ts +++ b/packages/nuxt-jsonld/src/module.ts @@ -2,6 +2,7 @@ import { resolve } from 'pathe'; import { defineNuxtModule, addPlugin, addImports } from '@nuxt/kit'; import type { Nuxt } from '@nuxt/schema'; import type { JsonLDFunc } from './types'; +export type { JsonLD, JsonLDFunc } from './types'; export type { UseJsonldOptions } from './runtime/composable'; diff --git a/packages/nuxt-jsonld/src/runtime/composable.ts b/packages/nuxt-jsonld/src/runtime/composable.ts index 1c98ac59..4b174835 100644 --- a/packages/nuxt-jsonld/src/runtime/composable.ts +++ b/packages/nuxt-jsonld/src/runtime/composable.ts @@ -4,6 +4,7 @@ import { useHead, type UseHeadOptions } from '@unhead/vue'; const isFunc = (json: JsonLD | JsonLDFunc): json is JsonLDFunc => typeof json === 'function'; export type UseJsonldOptions = Pick; +export type { JsonLD, JsonLDFunc } from '../types'; export const useJsonld = (json: JsonLD | JsonLDFunc, options?: UseJsonldOptions) => { if (!json) { diff --git a/packages/nuxt-jsonld/src/types/index.d.ts b/packages/nuxt-jsonld/src/types/index.ts similarity index 100% rename from packages/nuxt-jsonld/src/types/index.d.ts rename to packages/nuxt-jsonld/src/types/index.ts