Skip to content

Commit

Permalink
Add workaround for types bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Apr 23, 2023
1 parent 05db6fc commit 7768f22
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions config.types.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
import { Config } from './config'

// Provide custom type information for config, overriding the default empty types.
// TODO: Remove this as soon as https://github.com/nuxt/framework/issues/1785 is resolved.
interface NuxtIconModuleOptions {
size?: string | false
class?: string
aliases?: { [alias: string]: string }
}

declare module '@nuxt/schema' {
// Provide custom type information for config, overriding the default empty types.
// TODO: Remove this as soon as https://github.com/nuxt/framework/issues/1785 is resolved.
// eslint-disable-next-line @typescript-eslint/no-empty-interface -- Don't know how to reexport in a module declariation
interface RuntimeConfig extends Config {}

// Workaround for bug in icon modules
// TODO: Remove this as soon as https://github.com/nuxt-modules/icon/pull/63 is merged/resolved.
interface AppConfig {
nuxtIcon?: NuxtIconModuleOptions
}
}

// Provide custom type information for page metadata
Expand Down

0 comments on commit 7768f22

Please sign in to comment.