utilityfunctions.ts 383 B

12345678910111213141516171819
  1. function CalculateLateFees(daysLate: number): number {
  2. return daysLate * 0.25;
  3. }
  4. function MaxBooksAllowed(age: number): number {
  5. if (age < 12) {
  6. return 3;
  7. }
  8. else {
  9. return 10;
  10. }
  11. }
  12. // Since it is not exported, it will be private to the namespace.
  13. function privateFunc(): void {
  14. console.log('This is private...');
  15. }
  16. export { CalculateLateFees, MaxBooksAllowed };