From c22be5b45b6829973a30f459dbceaa7a166a1993 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Sat, 19 Nov 2022 05:26:49 +0000 Subject: [PATCH] Add mime type --- lib/types/server/server.d.ts | 39 +++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/lib/types/server/server.d.ts b/lib/types/server/server.d.ts index 4036d6d7c..32c571e91 100644 --- a/lib/types/server/server.d.ts +++ b/lib/types/server/server.d.ts @@ -2,8 +2,21 @@ import * as http from 'http'; import * as zlib from 'zlib'; import { Root } from 'joi'; +import { Mimos } from '@hapi/mimos'; -import { Dependencies, PluginsListRegistered, Plugin, ServerRealm, ServerRegisterOptions, ServerRegisterPluginObject, ServerRegisterPluginObjectArray, DecorateName, DecorationMethod, HandlerDecorationMethod, PluginProperties } from '../plugin'; +import { + Dependencies, + PluginsListRegistered, + Plugin, + ServerRealm, + ServerRegisterOptions, + ServerRegisterPluginObject, + ServerRegisterPluginObjectArray, + DecorateName, + DecorationMethod, + HandlerDecorationMethod, + PluginProperties +} from '../plugin'; import { ReqRef, ReqRefDefaults, @@ -18,18 +31,26 @@ import { RulesProcessor, ServerRoute } from '../route'; -import { - Lifecycle, - ServerApplicationState, - Utils - } from '../utils'; +import { Lifecycle, ServerApplicationState, Utils } from '../utils'; import { ServerAuth } from './auth'; import { ServerCache } from './cache'; import { ServerEventsApplication, ServerEvents } from './events'; -import { ServerExtEventsObject, ServerExtEventsRequestObject, ServerExtType, ServerExtPointFunction, ServerExtOptions, ServerRequestExtType } from './ext'; +import { + ServerExtEventsObject, + ServerExtEventsRequestObject, + ServerExtType, + ServerExtPointFunction, + ServerExtOptions, + ServerRequestExtType +} from './ext'; import { ServerInfo } from './info'; import { ServerInjectOptions, ServerInjectResponse } from './inject'; -import { ServerMethod, ServerMethodOptions, ServerMethodConfigurationObject, ServerMethods } from './methods'; +import { + ServerMethod, + ServerMethodOptions, + ServerMethodConfigurationObject, + ServerMethods +} from './methods'; import { ServerOptions } from './options'; import { ServerState, ServerStateCookieOptions } from './state'; @@ -184,7 +205,7 @@ export class Server { * modified directly but only through the [mime](https://github.com/hapijs/hapi/blob/master/API.md#server.options.mime) server setting. * [See docs](https://github.com/hapijs/hapi/blob/master/API.md#-servermime) */ - mime: any; + mime: Mimos; /** * An object containing the values exposed by each registered plugin where each key is a plugin name and the values