3 ms·
Yes this is just ad hoc runtime type checking
by ants_everywhere 1y ago
Yes this is just ad hoc runtime type checking
- mewpmewp2 1y agoAlternative -> could just use something like Zod or have native stdlib Zod like type of thing to improve a lot on this type of edge case handling. Although if performance is key, then might question how much this constant parsing and validation would add on top, but in 99% cases probably wouldn't matter.