mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[newrelic] adds waitForIdle option to #shutdown (#42643)
* [newrelic] adds waitForIdle option to #shutdown * add contributor note
This commit is contained in:
3
types/newrelic/index.d.ts
vendored
3
types/newrelic/index.d.ts
vendored
@@ -6,6 +6,7 @@
|
||||
// Kyle Scully <https://github.com/zieka>
|
||||
// Kenneth Aasan <https://github.com/kennethaasan>
|
||||
// Jon Flaishans <https://github.com/funkswing>
|
||||
// Dylan Smith <https://github.com/dylansmith>
|
||||
// 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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user