From 66b4973f83b95b82a19f350c5eeb9a9e148fbce5 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 10 Feb 2022 01:40:57 +0100 Subject: [PATCH] fix: expose types --- src/index.ts | 1 + src/types/{fetch.d.ts => fetch.ts} | 0 src/types/{index.d.ts => index.ts} | 0 src/types/{nitro.d.ts => nitro.ts} | 7 +++---- src/types/{shims.d.ts => shims.ts} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename src/types/{fetch.d.ts => fetch.ts} (100%) rename src/types/{index.d.ts => index.ts} (100%) rename src/types/{nitro.d.ts => nitro.ts} (91%) rename src/types/{shims.d.ts => shims.ts} (100%) diff --git a/src/index.ts b/src/index.ts index 2b368b96d7..9c9061cefb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,3 +3,4 @@ export * from './nitro' export * from './server/middleware' export * from './server/dev' export * from './options' +export * from './types' diff --git a/src/types/fetch.d.ts b/src/types/fetch.ts similarity index 100% rename from src/types/fetch.d.ts rename to src/types/fetch.ts diff --git a/src/types/index.d.ts b/src/types/index.ts similarity index 100% rename from src/types/index.d.ts rename to src/types/index.ts diff --git a/src/types/nitro.d.ts b/src/types/nitro.ts similarity index 91% rename from src/types/nitro.d.ts rename to src/types/nitro.ts index 9dda74990d..74082a7806 100644 --- a/src/types/nitro.d.ts +++ b/src/types/nitro.ts @@ -25,7 +25,7 @@ export interface NitroHooks { } type DeepPartial = T extends Record ? { [P in keyof T]?: DeepPartial | T[P] } : T -type NitroPreset = string | NitroConfig | ((input: NitroConfig) => NitroConfig) +// type NitroPreset = string | NitroConfig | ((input: NitroConfig) => NitroConfig) export interface NitroConfig extends DeepPartial { preset?: string @@ -40,7 +40,6 @@ export interface NitroOptions { buildDir: string generateDir: string publicDir: string - srcDir: string modulesDir: string[] entry: string @@ -88,7 +87,7 @@ export interface NitroOptions { } commands: { - preview: string | ((config: NitroContext) => string) - deploy: string | ((config: NitroContext) => string) + preview: string | ((nitro: Nitro) => string) + deploy: string | ((nitro: Nitro) => string) } } diff --git a/src/types/shims.d.ts b/src/types/shims.ts similarity index 100% rename from src/types/shims.d.ts rename to src/types/shims.ts