Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: import types for @nuxt/telemetry and @nuxt/components #7626

Merged
merged 3 commits into from Jun 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/types/config/index.d.ts
@@ -1,3 +1,5 @@
import { ComponentsDir } from '@nuxt/components'

import { Transition } from '../app'
import { NuxtOptionsBuild } from './build'
import { NuxtOptionsCli } from './cli'
Expand Down Expand Up @@ -32,6 +34,7 @@ export interface NuxtOptions extends Configuration {
buildDir: string
buildModules: NuxtOptionsModule[]
cli: NuxtOptionsCli
components: boolean | Array<string | ComponentsDir>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also object format support (which may be used later on to provide more options

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally the options would be completely defined in @nuxt/components and just imported in @nuxt/types. I will propose a PR to do that if that sounds good to you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Just published types for both 🙈 Updating deps in a sec.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css: string[]
dev: boolean
dir: { [key in 'app' | 'assets' | 'layouts' | 'middleware' | 'pages' | 'static' | 'store']?: string }
Expand Down Expand Up @@ -64,6 +67,7 @@ export interface NuxtOptions extends Configuration {
server: NuxtOptionsServer
serverMiddleware: NuxtOptionsServerMiddleware[]
srcDir: string
telemetry: boolean
transition: Transition
'vue.config': NuxtOptionsVueConfiguration
watch: string[]
Expand Down