In most languages you could probably solve this problem with a class. But wrapping all your numbers in a class with runtime consequences, just for a bit of extra type safety, feels quite extreme.
Vouching for Ty. Been working with him on brainblocks.io for the last few years, the guy is a solid engineer, leader, and a fast learner. Had a fantastic experience working with him!