microsoft / rnx-kit

Modern, scalable tools. Exceptional developer experience.
https://microsoft.github.io/rnx-kit/
MIT License
1.46k stars 94 forks source link

fix(tools-shell): allow `once` functions to take arguments #3167

Closed tido64 closed 1 month ago

tido64 commented 1 month ago

Description

Allow once functions to take arguments

Test plan

n/a

tido64 commented 1 month ago

Looks good, though if I'm reading it right it does look like once<> won't work right with functions that return undefined as a result. Not related to this change, just an observation though maybe that is by design.

No, I think you're right. I've fixed it by adding NonNullable:

image