From 93143f1963671f7537e5ed4415a262b8d8d8a5fc Mon Sep 17 00:00:00 2001 From: Chris Bargren Date: Tue, 26 Sep 2017 11:26:42 -0700 Subject: [PATCH] Fix type definitions for Hapi load configuration property (#19949) Any or all of the properties in the load configuration object can be defined. --- types/hapi/index.d.ts | 6 +++--- types/hapi/v12/index.d.ts | 6 +++--- types/hapi/v15/index.d.ts | 6 +++--- types/hapi/v8/index.d.ts | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/types/hapi/index.d.ts b/types/hapi/index.d.ts index 01e8675a29..f996967691 100644 --- a/types/hapi/index.d.ts +++ b/types/hapi/index.d.ts @@ -724,11 +724,11 @@ export interface ConnectionConfigurationServerDefaults { /** connection load limits configuration where: */ load?: { /** maximum V8 heap size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxHeapUsedBytes: number; + maxHeapUsedBytes?: number; /** maximum process RSS size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxRssBytes: number; + maxRssBytes?: number; /** maximum event loop delay duration in milliseconds over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxEventLoopDelay: number; + maxEventLoopDelay?: number; }; /** plugin-specific configuration which can later be accessed via connection.settings.plugins. Provides a place to store and pass connection-specific plugin configuration. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between connection.settings.plugins which is used to store configuration values and connection.plugins which is meant for storing run-time state. */ plugins?: PluginSpecificConfiguration; diff --git a/types/hapi/v12/index.d.ts b/types/hapi/v12/index.d.ts index 8cbfaff2cf..55df6194c9 100644 --- a/types/hapi/v12/index.d.ts +++ b/types/hapi/v12/index.d.ts @@ -102,11 +102,11 @@ declare module "hapi" { /** connection load limits configuration where: */ load?: { /** maximum V8 heap size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxHeapUsedBytes: number; + maxHeapUsedBytes?: number; /** maximum process RSS size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxRssBytes: number; + maxRssBytes?: number; /** maximum event loop delay duration in milliseconds over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxEventLoopDelay: number; + maxEventLoopDelay?: number; }; /** plugin-specific configuration which can later be accessed via connection.settings.plugins. Provides a place to store and pass connection-specific plugin configuration. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between connection.settings.plugins which is used to store configuration values and connection.plugins which is meant for storing run-time state. */ plugins?: any; diff --git a/types/hapi/v15/index.d.ts b/types/hapi/v15/index.d.ts index b7a4510483..f08e72d817 100644 --- a/types/hapi/v15/index.d.ts +++ b/types/hapi/v15/index.d.ts @@ -125,11 +125,11 @@ export interface IConnectionConfigurationServerDefaults { /** connection load limits configuration where: */ load?: { /** maximum V8 heap size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxHeapUsedBytes: number; + maxHeapUsedBytes?: number; /** maximum process RSS size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxRssBytes: number; + maxRssBytes?: number; /** maximum event loop delay duration in milliseconds over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxEventLoopDelay: number; + maxEventLoopDelay?: number; }; /** plugin-specific configuration which can later be accessed via connection.settings.plugins. Provides a place to store and pass connection-specific plugin configuration. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between connection.settings.plugins which is used to store configuration values and connection.plugins which is meant for storing run-time state. */ plugins?: any; diff --git a/types/hapi/v8/index.d.ts b/types/hapi/v8/index.d.ts index 762b9eb198..e7d71c8ca0 100644 --- a/types/hapi/v8/index.d.ts +++ b/types/hapi/v8/index.d.ts @@ -88,11 +88,11 @@ export interface IConnectionConfigurationServerDefaults { /** connection load limits configuration where: */ load?: { /** maximum V8 heap size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxHeapUsedBytes: number; + maxHeapUsedBytes?: number; /** maximum process RSS size over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxRssBytes: number; + maxRssBytes?: number; /** maximum event loop delay duration in milliseconds over which incoming requests are rejected with an HTTP Server Timeout (503) response. Defaults to 0 (no limit). */ - maxEventLoopDelay: number; + maxEventLoopDelay?: number; }; /** plugin-specific configuration which can later be accessed via connection.settings.plugins. Provides a place to store and pass connection-specific plugin configuration. plugins is an object where each key is a plugin name and the value is the configuration. Note the difference between connection.settings.plugins which is used to store configuration values and connection.plugins which is meant for storing run-time state. */ plugins?: any;