Theoretically, it's possible to create custom component that takes a function as child. This is how Solid does it. But Astro doesn't emit types for the function so any argument is any. I can stand that even less than the awkward ternary syntax.
It's great when you post about issues with Windows and people assume you have no idea about Linux at all, much less having legitimate reasons to stick with Windows, or using a dual-boot setup, or running it in a VM, or using it only on some devices.