mirror of
https://github.com/samiyev/puaros.git
synced 2025-12-28 07:16:53 +05:00
Add test structure: - Unit tests for BaseEntity - Unit tests for Guards utility - Test fixtures with code samples - Integration and unit test directories
16 lines
342 B
TypeScript
16 lines
342 B
TypeScript
export function add(a: number, b: number): number {
|
|
return a + b;
|
|
}
|
|
|
|
export const multiply = (a: number, b: number): number => {
|
|
return a * b;
|
|
};
|
|
|
|
export class Calculator {
|
|
public divide(a: number, b: number): number {
|
|
if (b === 0) {
|
|
throw new Error('Division by zero');
|
|
}
|
|
return a / b;
|
|
}
|
|
} |