UNPKG

officekit

Version:

A toolkit to represent and visualize office spaces. It also provides functionality to simulate usage of offices, and calculate a score given a fitness function. It also have functionatlity for automatic allocation of offices using a genetic algorithm.

40 lines (39 loc) 1.3 kB
import type { Person } from './Person'; /** * Represents a collection of people that can be managed and queried. * Provides functionality for adding, retrieving, and analyzing people and their team associations. * Implements Iterator pattern to allow iteration over the collection. */ export declare class People { map: Map<string, Person>; constructor(); /** * Adds a person to the collection. * @param person - The person object to add to the collection. */ add(person: Person): void; /** * Checks if the collection has a person with the specified ID. * @param id - The ID of the person to check for. * @returns True if a person with the specified ID exists, false otherwise. */ has(id: string): boolean; /** * Retrieves a person from the collection by their ID. * @param id - The ID of the person to retrieve. * @returns The person object if found, undefined otherwise. */ get(id: string): Person | undefined; getRandom(): any; getTeamStats(): Map<string, number>; getAllocations(): Map<string, number>; [Symbol.iterator](): { next: () => { value: Person; done: boolean; } | { done: boolean; value?: undefined; }; }; }