diff --git a/src/core/index.ts b/src/core/index.ts index 57c4a871bc..238aa37397 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,4 +1,8 @@ -import type { NitroConfig } from "nitropack/types"; +import type { + NitroConfig, + NitroOpenAPIConfig, + NitroRouteConfig, +} from "nitropack/types"; // Core export { createNitro } from "./nitro"; @@ -50,10 +54,24 @@ export { } from "./scan"; /** @deprecated Use `NitroRuntimeConfig` from `nitropack/types` */ -export interface NitroRuntimeConfig {} +export interface NitroRuntimeConfig { + app: NitroRuntimeConfigApp; + nitro: { + envPrefix?: string; + envExpansion?: boolean; + routeRules?: { + [path: string]: NitroRouteConfig; + }; + openAPI?: NitroOpenAPIConfig; + }; + [key: string]: any; +} /** @deprecated Use `NitroRuntimeConfigApp` from `nitropack/types` */ -export interface NitroRuntimeConfigApp {} +export interface NitroRuntimeConfigApp { + baseURL: string; + [key: string]: any; +} /** @deprecated Directly import { ... } from "nitropack/types"; */ export type { diff --git a/src/types/config.ts b/src/types/config.ts index ea1fc509dc..b4daf82c3c 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -33,6 +33,7 @@ import type { NitroHooks } from "./hooks"; import type { NitroModuleInput } from "./module"; import type { NitroFrameworkInfo } from "./nitro"; import type { NitroOpenAPIConfig } from "./openapi"; +export type { NitroOpenAPIConfig } from "./openapi"; import type { NitroPreset } from "./preset"; import type { EsbuildOptions, NodeExternalsOptions } from "./rollup"; import type { RollupConfig } from "./rollup"; @@ -337,20 +338,6 @@ export type DatabaseConnectionConfigs = Record< // Runtime config -export interface NitroRuntimeConfigApp extends NitroTypesRuntimeConfigApp { - baseURL: string; - [key: string]: any; -} +export interface NitroRuntimeConfigApp extends NitroTypesRuntimeConfigApp {} -export interface NitroRuntimeConfig extends NitroTypeskRuntimeConfig { - app: NitroRuntimeConfigApp; - nitro: { - envPrefix?: string; - envExpansion?: boolean; - routeRules?: { - [path: string]: NitroRouteConfig; - }; - openAPI?: NitroOpenAPIConfig; - }; - [key: string]: any; -} +export interface NitroRuntimeConfig extends NitroTypeskRuntimeConfig {}