class UserService {
    users = [];
    addUser(user) {
        this.users.push(user);
    }
    findUserById(id) {
        return this.users.find(u => u.id === id);
    }
    getAllUsers() {
        return this.users;
    }
}
const service = new UserService();
service.addUser({ id: 1, name: "John", email: "john@example.com" });
const user = service.findUserById(1);
if (user) {
    console.log(user.name);
}
const anotherService = new UserService();
//# sourceMappingURL=test-typescript-sample.js.map