Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/heapdump/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// Definitions by: weekens <https://github.com/weekens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export function writeSnapshot(dumpFileName: string, callback: (err?: Error) => void): void;
export function writeSnapshot(dumpFileName?: string, callback?: (err?: Error, filename?: string) => void): void;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the callback always returns the name of the file, this should be (err: Error | undefined, filename: string) => void.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good rectification