diff --git a/types/newrelic/index.d.ts b/types/newrelic/index.d.ts index df8b734d70..85224a8392 100644 --- a/types/newrelic/index.d.ts +++ b/types/newrelic/index.d.ts @@ -6,6 +6,7 @@ // Kyle Scully // Kenneth Aasan // Jon Flaishans +// Dylan Smith // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // https://docs.newrelic.com/docs/agents/nodejs-agent/api-guides/nodejs-agent-api @@ -337,7 +338,7 @@ export const instrumentMessages: Instrument; */ export function shutdown(cb?: (error?: Error) => void): void; export function shutdown( - options?: { collectPendingData?: boolean; timeout?: number }, + options?: { collectPendingData?: boolean; timeout?: number; waitForIdle?: boolean }, cb?: (error?: Error) => void, ): void; diff --git a/types/newrelic/newrelic-tests.ts b/types/newrelic/newrelic-tests.ts index efa47f17c6..f987472236 100644 --- a/types/newrelic/newrelic-tests.ts +++ b/types/newrelic/newrelic-tests.ts @@ -109,6 +109,10 @@ newrelic.shutdown({ collectPendingData: true, timeout: 3000 }); newrelic.shutdown({ collectPendingData: true, timeout: 3000 }, err => { const error: Error | undefined = err; }); +newrelic.shutdown({ collectPendingData: true, timeout: 3000, waitForIdle: true }); +newrelic.shutdown({ collectPendingData: true, timeout: 3000, waitForIdle: true }, err => { + const error: Error | undefined = err; +}); newrelic.shutdown(err => { const error: Error | undefined = err; });