fix(schema): exclude functions from DeepPartial (#6176)

This commit is contained in:
Daniel Roe 2022-07-27 14:04:14 +01:00 committed by GitHub
parent 1230268a7b
commit 12ebe3aeb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ export default {
* Properties that will be set directly on `Vue.config` for vue@2. * Properties that will be set directly on `Vue.config` for vue@2.
* *
* @see [vue@2 Documentation](https://v2.vuejs.org/v2/api/#Global-Config) * @see [vue@2 Documentation](https://v2.vuejs.org/v2/api/#Global-Config)
* @type {import('vue/types/vue').VueConfiguration} * @type {typeof import('vue/types/vue').VueConfiguration}
* @version 2 * @version 2
*/ */
config: { config: {
@ -23,7 +23,7 @@ export default {
/** /**
* Options for the Vue compiler that will be passed at build time * Options for the Vue compiler that will be passed at build time
* @see [documentation](https://vuejs.org/api/application.html#app-config-compileroptions) * @see [documentation](https://vuejs.org/api/application.html#app-config-compileroptions)
* @type {import('@vue/compiler-core').CompilerOptions} * @type {typeof import('@vue/compiler-core').CompilerOptions}
* @version 3 * @version 3
*/ */
compilerOptions: {} compilerOptions: {}
@ -164,7 +164,7 @@ export default {
* Options to pass directly to `vue-meta`. * Options to pass directly to `vue-meta`.
* *
* @see [documentation](https://vue-meta.nuxtjs.org/api/#plugin-options). * @see [documentation](https://vue-meta.nuxtjs.org/api/#plugin-options).
* @type {import('vue-meta').VueMetaOptions} * @type {typeof import('vue-meta').VueMetaOptions}
* @version 2 * @version 2
*/ */
vueMeta: null, vueMeta: null,
@ -173,7 +173,7 @@ export default {
* Set default configuration for `<head>` on every page. * Set default configuration for `<head>` on every page.
* *
* @see [documentation](https://vue-meta.nuxtjs.org/api/#metainfo-properties) for specifics. * @see [documentation](https://vue-meta.nuxtjs.org/api/#metainfo-properties) for specifics.
* @type {import('vue-meta').MetaInfo} * @type {typeof import('vue-meta').MetaInfo}
* @version 2 * @version 2
*/ */
head: { head: {

View File

@ -1,7 +1,7 @@
import { ConfigSchema } from '../../schema/config' import { ConfigSchema } from '../../schema/config'
import type { ResolvedConfig } from 'c12' import type { ResolvedConfig } from 'c12'
type DeepPartial<T> = T extends Record<string, any> ? { [P in keyof T]?: DeepPartial<T[P]> } : T type DeepPartial<T> = T extends Function ? T : T extends Record<string, any> ? { [P in keyof T]?: DeepPartial<T[P]> } : T
/** User configuration in `nuxt.config` file */ /** User configuration in `nuxt.config` file */
export interface NuxtConfig extends DeepPartial<Omit<ConfigSchema, 'vite'>> { export interface NuxtConfig extends DeepPartial<Omit<ConfigSchema, 'vite'>> {