Skip to content

Conversation

@rwe
Copy link
Contributor

@rwe rwe commented Nov 4, 2022

Minor (internal) type fixes. In current main, the types incorrect: for example getRawProcessList specifies a callback that can accept either IProcessInfo[] | IProcessTreeNode, which none of them do.

This straightens it out, along with some related minor cleanups.

rwe added 4 commits November 4, 2022 15:34
This is a no-op, since the parameter was never given differently than
its default value, other than in recursive contexts.

That parameter was counter-abstract and only coincidentally common
between buildProcessTree and filterProcessList. If the value were ever
to be changeable, it should be as a bound parameter on the supplied
transform, e.g. `(pid, list) => buildProcessTree(pid, list, 320)`

Didn't belong on getRawProcessList.
The types here were confused: the *callback* can be given `undefined`,
due to the intermediate transforms ("filter") returning that value if
the root pid could not be found.
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Nice change 👍

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Thanks @rwe 👍

@Tyriar Tyriar added this to the 0.2.0 milestone Nov 9, 2022
@Tyriar Tyriar requested a review from rzhao271 November 9, 2022 15:47
@Tyriar Tyriar self-assigned this Nov 9, 2022
@Tyriar Tyriar merged commit 561c7e2 into microsoft:main Nov 9, 2022
@Tyriar Tyriar modified the milestones: 0.2.0, 0.4.0 Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants