Closed michaelfig closed 1 month ago
Hi @michaelfig , are you sure this is correctness preserving? I thought TS void
was a don't care that could admit and ignore any value, not just primitives.
void
in a union type can have unintended consequences. I'm a little rusty on the exact problems, but I remember something about it erasing other types in the union in some cases (possibly only for return types)
Here is a TS issue with more info: https://github.com/microsoft/TypeScript/issues/42709
Here is a TS issue
Thanks for the pointer. Indeed, I was holding things wrong, and corrected the problem by improving the typing of the functions I wrote that I wanted to be compatible with PureData
.
Closing.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@endo/pass-style@1.4.0
for the project I'm working on.void
is a TypeScript abstraction that reduces to a flavour ofundefined
when compiled to JS. It should be treated as a Primitive.Without that, I get typing errors when trying to use
PureData
from@endo/pass-style
:Here is the diff that solved my problem:
This issue body was partially generated by patch-package.