From 71c0e59b29b849278a273ffbf4d260a6d3caba16 Mon Sep 17 00:00:00 2001 From: Paul Hawxby Date: Mon, 25 Mar 2019 16:40:35 +0000 Subject: [PATCH] Fix missing signal (#34002) --- types/http-graceful-shutdown/http-graceful-shutdown-tests.ts | 4 ++-- types/http-graceful-shutdown/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/http-graceful-shutdown/http-graceful-shutdown-tests.ts b/types/http-graceful-shutdown/http-graceful-shutdown-tests.ts index 2445635c67..6e5413fef3 100644 --- a/types/http-graceful-shutdown/http-graceful-shutdown-tests.ts +++ b/types/http-graceful-shutdown/http-graceful-shutdown-tests.ts @@ -6,8 +6,8 @@ const opts: GracefulShutdown.Options = { signals: "SIGINT SIGTERM", timeout: 1337, development: false, - onShutdown: () => { - console.log('fake shutdown handler'); + onShutdown: (signal) => { + console.log('fake shutdown handler', signal); return Promise.resolve(); }, finally: () => { diff --git a/types/http-graceful-shutdown/index.d.ts b/types/http-graceful-shutdown/index.d.ts index ba34246290..738711759a 100644 --- a/types/http-graceful-shutdown/index.d.ts +++ b/types/http-graceful-shutdown/index.d.ts @@ -15,7 +15,7 @@ declare namespace GracefulShutdown { signals?: string; timeout?: number; development?: boolean; - onShutdown?: () => Promise; + onShutdown?: (signal: string) => Promise; finally?: () => void; } }