@teakit/money
@teakit/money is a TypeScript money-domain library being designed for precise amounts, currency-aware operations, explicit rounding, and safe serialization.
Guide
Use this page as the short human entry point. Keep v1 direction in docs/proposals/, deeper project knowledge in docs/knowledge/, durable decisions in docs/memory/, and agent-facing instructions in skills/.
Current State
The repository is being specialized from a TypeScript library template. The current source still contains placeholder example code while the v1 money API is being designed.
Do not generate public usage examples for proposed money APIs until they exist in src and have tests.
v1 Direction
- Model money as amount, currency, and scale, not display text.
- Use scaled integers instead of floating-point money.
- Reject unsafe currency mixing.
- Make rounding, allocation, parsing, and serialization policies explicit.
- Keep snapshots JSON-safe for APIs and databases.
- Teach AI coding agents the correct money patterns through compact docs and skills.
Project Contract
- Keep exported library code under
src. - Keep tests under
testsusingbun:test. - Keep reusable project knowledge under
docs/knowledge. - Keep durable project rules under
docs/memory. - Keep agent-facing usage notes under
skills. - Keep proposal-only APIs out of public usage docs.
LLMs
AI agents should start with LLMs, then open only the relevant source, test, or project documentation file.