Skip to content

Commit

Permalink
fix: export JsonLD and JsonLDFunc types
Browse files Browse the repository at this point in the history
Closes: #1363
  • Loading branch information
ymmooot committed Dec 11, 2024
1 parent 7144b70 commit 75794ec
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/nuxt-jsonld/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 1 addition & 0 deletions packages/nuxt-jsonld/src/runtime/composable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<UseHeadOptions, 'tagPosition'>;
export type { JsonLD, JsonLDFunc } from '../types';

export const useJsonld = (json: JsonLD | JsonLDFunc, options?: UseJsonldOptions) => {
if (!json) {
Expand Down
File renamed without changes.

0 comments on commit 75794ec

Please sign in to comment.