NuxtN
Nuxt2y ago
Emanuel

Nuxt 3 Modules provide Types to Nuxt Applications

What is the recommended way to provide types from a nuxt 3 module to a Nuxt App so that the App can import it using something like import type someType from "@company/myModule"?

Ways I found:
  1. export all types inside the module.ts
  2. wrap the type exports into a export/declare module "@company/myModule"
Was this page helpful?