@@ -22,7 +22,6 @@ import type { Preset as UnenvPreset } from "unenv";
2222import type { UnimportPluginOptions } from "unimport/unplugin" ;
2323import type { BuiltinDriverName } from "unstorage" ;
2424import type { UnwasmPluginOptions } from "unwasm/plugin" ;
25- import type { DeepPartial } from "./_utils.ts" ;
2625import type {
2726 EventHandlerFormat ,
2827 NitroDevEventHandler ,
@@ -95,12 +94,12 @@ export interface NitroOptions extends PresetOptions {
9594 *
9695 * By default this feature will be enabled if there is at least one nitro plugin.
9796 */
98- runtimeHooks : boolean ;
97+ runtimeHooks ? : boolean ;
9998
10099 /**
101100 * Enable WebSocket support
102101 */
103- websocket : boolean ;
102+ websocket ? : boolean ;
104103 } ;
105104
106105 /**
@@ -157,15 +156,15 @@ export interface NitroOptions extends PresetOptions {
157156 tsconfigPaths ?: boolean ;
158157 } ;
159158 future : {
160- nativeSWR : boolean ;
159+ nativeSWR ? : boolean ;
161160 } ;
162161 serverAssets : ServerAssetDir [ ] ;
163162 publicAssets : PublicAssetDir [ ] ;
164163
165- imports : UnimportPluginOptions | false ;
164+ imports : Partial < UnimportPluginOptions > | false ;
166165 modules ?: NitroModuleInput [ ] ;
167166 plugins : string [ ] ;
168- tasks : { [ name : string ] : { handler : string ; description : string } } ;
167+ tasks : { [ name : string ] : { handler ? : string ; description ? : string } } ;
169168 scheduledTasks : { [ cron : string ] : string | string [ ] } ;
170169 virtual : Record < string , string | ( ( ) => string | Promise < string > ) > ;
171170 compressPublicAssets : boolean | CompressOptions ;
@@ -174,17 +173,17 @@ export interface NitroOptions extends PresetOptions {
174173 // Dev
175174 dev : boolean ;
176175 devServer : {
177- port : number ;
178- hostname : string ;
179- watch : string [ ] ;
176+ port ? : number ;
177+ hostname ? : string ;
178+ watch ? : string [ ] ;
180179 } ;
181180 watchOptions : ChokidarOptions ;
182181 devProxy : Record < string , string | ProxyServerOptions > ;
183182
184183 // Logging
185184 logging : {
186- compressedSizes : boolean ;
187- buildSuccess : boolean ;
185+ compressedSizes ? : boolean ;
186+ buildSuccess ? : boolean ;
188187 } ;
189188
190189 // Routing
@@ -207,26 +206,26 @@ export interface NitroOptions extends PresetOptions {
207206 /**
208207 * Prerender HTML routes within subfolders (`/test` would produce `/test/index.html`)
209208 */
210- autoSubfolderIndex : boolean ;
211- concurrency : number ;
212- interval : number ;
213- crawlLinks : boolean ;
214- failOnError : boolean ;
215- ignore : Array <
209+ autoSubfolderIndex ? : boolean ;
210+ concurrency ? : number ;
211+ interval ? : number ;
212+ crawlLinks ? : boolean ;
213+ failOnError ? : boolean ;
214+ ignore ? : Array <
216215 string | RegExp | ( ( path : string ) => undefined | null | boolean )
217216 > ;
218- ignoreUnprefixedPublicAssets : boolean ;
219- routes : string [ ] ;
217+ ignoreUnprefixedPublicAssets ? : boolean ;
218+ routes ? : string [ ] ;
220219 /**
221220 * Amount of retries. Pass Infinity to retry indefinitely.
222221 * @default 3
223222 */
224- retry : number ;
223+ retry ? : number ;
225224 /**
226225 * Delay between each retry in ms.
227226 * @default 500
228227 */
229- retryDelay : number ;
228+ retryDelay ? : number ;
230229 } ;
231230
232231 // Rollup
@@ -266,12 +265,12 @@ export interface NitroOptions extends PresetOptions {
266265 *
267266 * Default is `tsconfig.json` (`node_modules/.nitro/types/tsconfig.json`)
268267 */
269- tsconfigPath : string ;
268+ tsconfigPath ? : string ;
270269 } ;
271270 hooks : NestedHooks < NitroHooks > ;
272271 commands : {
273- preview : string ;
274- deploy : string ;
272+ preview ? : string ;
273+ deploy ? : string ;
275274 } ;
276275
277276 // Framework
@@ -289,7 +288,7 @@ export interface NitroOptions extends PresetOptions {
289288 */
290289export interface NitroConfig
291290 extends
292- DeepPartial <
291+ Partial <
293292 Omit <
294293 NitroOptions ,
295294 | "routeRules"
@@ -302,6 +301,7 @@ export interface NitroConfig
302301 | "_c12"
303302 | "serverEntry"
304303 | "renderer"
304+ | "output"
305305 >
306306 > ,
307307 C12InputConfig < NitroConfig > {
@@ -314,6 +314,7 @@ export interface NitroConfig
314314 serverDir ?: boolean | "./" | "./server" | ( string & { } ) ;
315315 serverEntry ?: string | NitroOptions [ "serverEntry" ] ;
316316 renderer ?: false | NitroOptions [ "renderer" ] ;
317+ output ?: Partial < NitroOptions [ "output" ] > ;
317318}
318319
319320// ------------------------------------------------------------
@@ -388,8 +389,7 @@ export interface NitroRuntimeConfigApp {
388389}
389390
390391export interface NitroRuntimeConfig {
391- app : NitroRuntimeConfigApp ;
392- nitro : {
392+ nitro ?: {
393393 envPrefix ?: string ;
394394 envExpansion ?: boolean ;
395395 routeRules ?: {
0 commit comments