UNPKG

symref

Version:

Static code checker for AI code agents (Windsurf, Cline, etc.)

31 lines 995 B
import { NotificationType } from './types.js'; export class UserService { constructor(notificationService) { this.notificationService = notificationService; this.users = new Map(); } addUser(user) { this.users.set(user.id, user); this.notificationService.notify({ type: NotificationType.USER_ADDED, message: `New user ${user.name} has been added`, userId: user.id }); } getUser(id) { return this.users.get(id); } updateUserEmail(id, newEmail) { const user = this.users.get(id); if (user) { const updatedUser = { ...user, email: newEmail }; this.users.set(id, updatedUser); this.notificationService.notify({ type: NotificationType.USER_UPDATED, message: `User ${user.name}'s email has been updated`, userId: id }); } } } //# sourceMappingURL=UserService.js.map