123456789101112131415161718192021 |
- namespace Utility {
- export namespace Fees {
- export function CalculateLateFees(daysLate: number): number {
- return daysLate * 0.25;
- }
- }
- export function MaxBooksAllowed(age: number): number {
- if (age < 12) {
- return 3;
- }
- else {
- return 10;
- }
- }
- // Since it is not exported, it will be private to the namespace.
- function privateFunc(): void {
- console.log('This is private...');
- }
- }
|