mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-18 14:41:25 +00:00
Merge branch 'main' into docs/kit
This commit is contained in:
commit
2674ef281b
@ -150,9 +150,9 @@ It is also possible to type your runtime config manually:
|
|||||||
declare module 'nuxt/schema' {
|
declare module 'nuxt/schema' {
|
||||||
interface RuntimeConfig {
|
interface RuntimeConfig {
|
||||||
apiSecret: string
|
apiSecret: string
|
||||||
public: {
|
|
||||||
apiBase: string
|
|
||||||
}
|
}
|
||||||
|
interface PublicRuntimeConfig {
|
||||||
|
apiBase: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// It is always important to ensure you import/export something when augmenting a type
|
// It is always important to ensure you import/export something when augmenting a type
|
||||||
|
3
packages/nuxt/config.d.ts
vendored
3
packages/nuxt/config.d.ts
vendored
@ -2,4 +2,5 @@ import type { NuxtConfig } from 'nuxt/schema'
|
|||||||
import type { DefineConfig, InputConfig, UserInputConfig, ConfigLayerMeta } from 'c12'
|
import type { DefineConfig, InputConfig, UserInputConfig, ConfigLayerMeta } from 'c12'
|
||||||
export { NuxtConfig } from 'nuxt/schema'
|
export { NuxtConfig } from 'nuxt/schema'
|
||||||
|
|
||||||
export declare const defineNuxtConfig: DefineConfig<NuxtConfig, ConfigLayerMeta>
|
export interface DefineNuxtConfig extends DefineConfig<NuxtConfig, ConfigLayerMeta> {}
|
||||||
|
export declare const defineNuxtConfig: DefineNuxtConfig
|
||||||
|
3
packages/nuxt/types.d.ts
vendored
3
packages/nuxt/types.d.ts
vendored
@ -1,12 +1,13 @@
|
|||||||
/// <reference types="nitropack" />
|
/// <reference types="nitropack" />
|
||||||
export * from './dist/index'
|
export * from './dist/index'
|
||||||
|
|
||||||
|
import type { DefineNuxtConfig } from 'nuxt/config'
|
||||||
import type { SchemaDefinition, RuntimeConfig } from 'nuxt/schema'
|
import type { SchemaDefinition, RuntimeConfig } from 'nuxt/schema'
|
||||||
import type { H3Event } from 'h3'
|
import type { H3Event } from 'h3'
|
||||||
import type { NuxtIslandContext, NuxtIslandResponse, NuxtRenderHTMLContext } from './dist/core/runtime/nitro/renderer'
|
import type { NuxtIslandContext, NuxtIslandResponse, NuxtRenderHTMLContext } from './dist/core/runtime/nitro/renderer'
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
const defineNuxtConfig: typeof import('nuxt/config')['defineNuxtConfig']
|
const defineNuxtConfig: DefineNuxtConfig
|
||||||
const defineNuxtSchema: (schema: SchemaDefinition) => SchemaDefinition
|
const defineNuxtSchema: (schema: SchemaDefinition) => SchemaDefinition
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user