On this page
Type safety
One owning calculator definition ties its identity and context to the scenario codec, report codec, expected errors and native executor. Scenarios and facts are nominal: a predeclared object for another calculator cannot widen the selected input type.
Raw numbers cannot stand in for Money. Signed Money requires a non-negative refinement for scenario inputs. A pay scenario supplies one supported period for its amounts. The sacrifice-aware scenario requires salarySacrifice; its definition is AuPayTakeHomeWithSacrificeCalculation. Native rule composition retains distinct GrossPay and TaxablePay identities and unprovided facts in its requirement channel.
Runtime validation
TypeScript checks relationships and required properties. Runtime Schemas check numeric ranges, exact decimals, extra keys and accounting relationships. A number variable such as 1.5 is rejected by the checked cents constructor at runtime.