UNPKG

@lovebowls/leaguejs

Version:

A framework-agnostic JavaScript library for managing leagues, teams, and matches

31 lines (30 loc) 919 B
export class Team { /** * Create a new Team * @param {Object} data - Team data * @param {string} data._id - Unique identifier for the team * @param {string} [data.name] - Name of the team (defaults to _id if not provided) * @param {Date} [data.createdAt] - Creation date (defaults to current date) * @param {Date} [data.updatedAt] - Last update date (defaults to current date) */ constructor(data: { _id: string; name?: string | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; }); _id: string; name: string; createdAt: Date; updatedAt: Date; /** * Update team details * @param {Object} updates - Updated team details */ update(updates: Object): void; /** * Convert team to JSON * @returns {Object} - JSON representation of the team */ toJSON(): Object; }