Skip to content

Commit 75794ec

Browse files
committed
fix: export JsonLD and JsonLDFunc types
Closes: #1363
1 parent 7144b70 commit 75794ec

File tree

3 files changed

+2
-0
lines changed

3 files changed

+2
-0
lines changed

packages/nuxt-jsonld/src/module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { resolve } from 'pathe';
22
import { defineNuxtModule, addPlugin, addImports } from '@nuxt/kit';
33
import type { Nuxt } from '@nuxt/schema';
44
import type { JsonLDFunc } from './types';
5+
export type { JsonLD, JsonLDFunc } from './types';
56

67
export type { UseJsonldOptions } from './runtime/composable';
78

packages/nuxt-jsonld/src/runtime/composable.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useHead, type UseHeadOptions } from '@unhead/vue';
44

55
const isFunc = (json: JsonLD | JsonLDFunc): json is JsonLDFunc => typeof json === 'function';
66
export type UseJsonldOptions = Pick<UseHeadOptions, 'tagPosition'>;
7+
export type { JsonLD, JsonLDFunc } from '../types';
78

89
export const useJsonld = (json: JsonLD | JsonLDFunc, options?: UseJsonldOptions) => {
910
if (!json) {

0 commit comments

Comments
 (0)