update types for heapdump#23891
update types for heapdump#23891mishelen wants to merge 1 commit intoDefinitelyTyped:masterfrom mishelen:patch-1
Conversation
- all arguments are optional - callback also return name of file
| // 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; |
There was a problem hiding this comment.
If the callback always returns the name of the file, this should be (err: Error | undefined, filename: string) => void.
|
@mishelen Please address comments from the code reviewers. |
|
@mishelen Thank you for submitting this PR! 🔔 @weekens - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
|
@mishelen One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
|
I also wanted to make a PR on the typings for this library, but take a look at open PRs first. According to the source-code of In addition, according to the usage section of the README.md there is also the possibility to call the function without a filename. @Andy-MS should I create another PR for that? Do you @mishelen put into your PR? The source-code should be: export function writeSnapshot(dumpFileName?: string, callback?: (err: Error | null, filename: string) => void): void;
export function writeSnapshot(callback: (err: Error | null, filename: string) => void): void; |
|
Thanks for your contribution. This PR has unaddressed comments and can not be merged in at the time being. For housekeeping purposes we are closing stale PRs. If you'd still like to merge this code in, please open a new PR that has been merged and rebased with the |
see package usage