ymmooot / nuxt-jsonld

A Nuxt.js module to manage JSON-LD in Vue component.
315 stars 25 forks source link

How do I import the JsonLD TypeScript type from 'nuxt-jsonld' #1363

Open leopoldkristjansson opened 9 months ago

leopoldkristjansson commented 9 months ago

I am wondering what the correct way to import the JsonLD or JsonLDFunc types are?

This does not work:

import type { JsonLD } from 'nuxt-jsonld'

This does, but is probably not the best way?

import type JsonLD from 'nuxt-jsonld/dist/types/index.d'

Thanks!

TheDutchCoder commented 6 months ago

You'll have to use import type { Thing } from 'schema-dts' or import type { Graph } from 'schema-dts', etc.