mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(schema): allow untyped keys in nuxt config (#3527)
This commit is contained in:
parent
398b311ad6
commit
33ffd8be0a
@ -4,7 +4,9 @@ import type { ResolvedConfig } from 'c12'
|
||||
type DeepPartial<T> = T extends Record<string, any> ? { [P in keyof T]?: DeepPartial<T[P]> | T[P] } : T
|
||||
|
||||
/** User configuration in `nuxt.config` file */
|
||||
export interface NuxtConfig extends DeepPartial<ConfigSchema> { }
|
||||
export interface NuxtConfig extends DeepPartial<ConfigSchema> {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/** Normalized Nuxt options available as `nuxt.options.*` */
|
||||
export interface NuxtOptions extends ConfigSchema {
|
||||
|
1
test/fixtures/basic/types.ts
vendored
1
test/fixtures/basic/types.ts
vendored
@ -75,7 +75,6 @@ describe('modules', () => {
|
||||
defineNuxtConfig({ sampleModule: { enabled: false } })
|
||||
// @ts-expect-error
|
||||
defineNuxtConfig({ sampleModule: { other: false } })
|
||||
// @ts-expect-error
|
||||
defineNuxtConfig({ undeclaredKey: { other: false } })
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user