@loanscope/domain
v0.1.1
Published
Branded primitives (Money, Ratio, RatePct, Months), enums, and canonical types for LoanScope mortgage underwriting. Zero runtime dependencies.
Maintainers
Readme
@loanscope/domain
Branded primitive types (Money, Ratio, RatePct, Months, Units, Fico), enums (LoanType, LoanPurpose, Occupancy, PropertyType, ProgramKind, AmortizationType, Channel, etc.), and canonical model interfaces (ProductDefinition, Transaction, Scenario, Borrower, IncomeStream, ProgramRules) that together form the type-level contract for every other LoanScope package.
Zero runtime dependencies by design. The package is the kernel that every other LoanScope package consumes; it must remain pure types plus a small set of brand-constructor helpers (money(n), ratio(n), ratePct(n), months(n), assertNever).
Install
pnpm add @loanscope/domainUsage
import { money, ratio, LoanPurpose, type Transaction } from "@loanscope/domain";
const loanAmount = money(500_000);
const ltv = ratio(0.8);
const purpose = LoanPurpose.Purchase;Changelog
See CHANGELOG.md for per-package release history.
Part of the LoanScope monorepo
See the repository root for the full list of @loanscope/* packages, the underwriting engine, and the CLI.
License
MIT
