Add TypeScript example of the same accounting pattern to the project
Related to #5
Add TypeScript version of the accounting pattern with tests.
-
Customer.ts: Implement
Customerclass with methodsgetName,getEntry,post, andbalance. -
Entry.ts: Implement
Entryclass with propertiesentryDate,entryType, andamount. -
EntryType.ts: Implement
EntryTypeclass with static propertiesBASE_USAGEandSERVICE. -
EventType.ts: Implement
EventTypeclass with static propertiesUSAGEandSERVICE. -
MonetaryAmount.ts: Implement
MonetaryAmountclass with propertiescurrencyandamount. -
MultiplyByRatePostingRule.ts: Implement
MultiplyByRatePostingRuleclass extendingPostingRule. -
PostingRule.ts: Implement
PostingRuleclass with abstract methodcalculateAmount. -
Quantity.ts: Implement
Quantityclass with propertyamount. -
ServiceAgreement.ts: Implement
ServiceAgreementclass with methodsaddPostingRule,getPostingRule, andpost. -
TemporalCollection.ts: Implement
TemporalCollectionclass with methodsputandget. -
AcceptanceTest.ts: Implement acceptance tests for TypeScript version.
-
AnnualServiceFeeRule.ts: Implement
AnnualServiceFeeRuleclass extendingPostingRule. -
CustomerTest.ts: Implement unit tests for
Customerclass. -
EntryTest.ts: Implement unit tests for
Entryclass. -
MonetaryAmountTest.ts: Implement unit tests for
MonetaryAmountclass. -
TemporalCollectionTest.ts: Implement unit tests for
TemporalCollectionclass.
For more details, open the Copilot Workspace session.